Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customize calc namespace to have most used function at the top level #375

Merged
2 commits merged into from
Oct 15, 2024

Conversation

vespos
Copy link
Contributor

@vespos vespos commented Sep 15, 2023

Description

Make calc namespace more useful.

Motivation and Context

The scientist wants the most used calc function to be readily accessible under the calc namespace.
Note: still waiting on more input from the scientists regarding which functions they want.

How Has This Been Tested?

In xpp3

Where Has This Been Documented?

Screenshots (if appropriate):

Pre-merge checklist

  • Code works interactively (a real hutch config file can be loaded)
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@vespos vespos requested a review from ZLLentz September 15, 2023 22:42
@tangkong
Copy link
Contributor

I believe these tests were failing due to pcdscalc not being updated on condaforge yet, so I'm giving them a kick

@vespos vespos requested a review from klauer September 22, 2023 00:55
be_lens=collect_functions(['pcdscalc.be_lens_calcs']),
common=collect_functions(['pcdscalc.common']),
diffraction=collect_functions(['pcdscalc.diffraction']),
xray=collect_functions(['pcdscalc.xray'])
xray=collect_functions(['pcdscalc.xray']),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't pcdscalc.xray new? collect_functions will try to import it and raise if I understand correctly. That means it probably should have similar handling as funcs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I think we need to be consistent here: either everything in this module retains backwards compatibility with old versions as implemented above, OR we jettison all of this complexity and simply update the dependency pin on pcdscalc.

Copy link
Contributor Author

@vespos vespos Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have a strong preference here. This module is widely underutilized across the hutches at the moment, so I dont think it will create much chaos to just move forward with a dependency update

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think either way is totally reasonable

@ZLLentz ZLLentz mentioned this pull request Oct 15, 2024
7 tasks
@ZLLentz ZLLentz closed this pull request by merging all changes into pcdshub:master in b978c6e Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants