AllenNeuralDynamics / aind-watchdog-service

Data staging service that prepares acquistion data for cloud upload to Amazon S3 and Code Ocean processing.
https://allenneuraldynamics.github.io/aind-watchdog-service/
MIT License
2 stars 1 forks source link

Build pin aind data schemas models #49

Closed bruno-f-cruz closed 3 months ago

bruno-f-cruz commented 3 months ago

This PR updates the watchdog to be compatible with aind-data-schemas-models >=0.4. This update will break compatibility with versions prior to 0.4 since the previous "_abbreviation_map" has now been renamed to "abbreviation_map" and ophys is no longer a valid modality as it has been superseded by pophys.

Closes #48

bruno-f-cruz commented 3 months ago

This one would greatly benefit from merging https://github.com/AllenNeuralDynamics/aind-data-schema-models/pull/61 as it would ensure that current rigs running under the old ophys modality would still work.

bruno-f-cruz commented 3 months ago

I decided to also patch it at the level of the watchdog by creating a functional BeforeValidator that coerces ophys into pophys. It is not pretty but since aind-transfer-models also uses its own validation for modalities, seems like the easiest solution for now. We can keep the validation for now and eventually remove it if people indeed stop using it