neuroinformatics-unit / datashuttle

Tool for the creation, validation and transfer of neuroscience project folders.
https://datashuttle.neuroinformatics.dev/
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Add `PyDantic`/`attrs`-style validation to all public functions #380

Open JoeZiminski opened 5 months ago

JoeZiminski commented 5 months ago

It would be nice to properly validate all inputs to public functions. This could be done following the movement way.

Currently this is done ad-hoc in datashuttle e.g. #375. This should be reworked to be centralised in a argument-validation module.

niksirbi commented 5 months ago

See https://github.com/neuroinformatics-unit/movement/issues/24 and the linked articles to make an informed decision on PyDantic vs attrs. They both do very similar things, but int he end I went with attrs for movement.

JoeZiminski commented 5 months ago

Thanks @niksirbi I think it makes sense to follow your lead, also good for consistency across NIU repos.