DiamondLightSource / dodal

Ophyd devices and other utils that could be used across DLS beamlines
Apache License 2.0
2 stars 8 forks source link

Remove alias for DetectorParams.override_run_number #775

Open DiamondJoseph opened 2 months ago

DiamondJoseph commented 2 months ago

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

DominicOram commented 2 months ago

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

DiamondJoseph commented 2 months ago

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.