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

Remove alias for DetectorParams.override_run_number #775

Open
DiamondJoseph opened this issue Sep 5, 2024 · 2 comments
Open

Remove alias for DetectorParams.override_run_number #775

DiamondJoseph opened this issue Sep 5, 2024 · 2 comments

Comments

@DiamondJoseph
Copy link
Contributor

To maintain compatibility with GDA and Hyperion,DetectorParams.override_run_number has an alias of run_number.

When changes between those systems can be orchestrated, a small nicety would be to have this field named override_run_number everywhere, to make it clear what the purpose of the field is and why it is optional.

Acceptance Criteria

  • Specific criteria that will be used to judge if the issue is fixed
@DominicOram
Copy link
Contributor

It may also be that setting run_number externally is not required. We should think about and discuss this with scientists though.

@DiamondJoseph
Copy link
Contributor Author

The added test actually revealed this inconsistency in Pydantic2 alias handling, so if we ever serialise the DetectorParams, and require deserialising where run_number is used, we have to det_params.model_dump(by_alias=True). If we only ever deserialise, we are consistent with prior behaviour.

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

No branches or pull requests

2 participants