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

Common XRC: Modify parameters and composite devices #806

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

olliesilvester
Copy link
Contributor

@olliesilvester olliesilvester commented Feb 11, 2025

Part of #794

  • Add a general feature_dependant_config function to FeatureFlags, which handles configuration relying on the live feature settings. and is done before the XRC kicks off
  • Add detector_params to SpecifiedThreeDGridScan, using a dictionary mapping beamline to detector size. This means SpecifiedThreeDGridScan is not abstract so can be used by other beamlines wanting to do XRC
  • Start moving device composites to a separate file - this is just to avoid circular imports
  • (TODO) also move a few small bits to common

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 91.45299% with 10 lines in your changes missing coverage. Please review.

Project coverage is 86.89%. Comparing base (2aff797) to head (7026f5e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #806      +/-   ##
==========================================
- Coverage   86.94%   86.89%   -0.06%     
==========================================
  Files         102      104       +2     
  Lines        6969     6988      +19     
==========================================
+ Hits         6059     6072      +13     
- Misses        910      916       +6     
Components Coverage Δ
i24 SSX 72.84% <ø> (ø)
hyperion 96.33% <95.65%> (+<0.01%) ⬆️
other 96.29% <85.41%> (-0.34%) ⬇️

@olliesilvester olliesilvester marked this pull request as ready for review February 11, 2025 14:05


@pydantic.dataclasses.dataclass(config={"arbitrary_types_allowed": True})
class HyperionFlyScanXRayCentreComposite:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not immediately obvious but we get circular imports without moving this

GridscanParamConstants,
HardwareConstants,
)

"""Parameter models in this file are abstract. They should be inherited by a top-level model"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this no longer true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR adds detector_params to SpecifiedThreeDGridScan, so this class isn't abstract anymore

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.

2 participants