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

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

Open
JoeZiminski opened this issue Apr 29, 2024 · 2 comments
Open

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

JoeZiminski opened this issue Apr 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@JoeZiminski
Copy link
Member

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
Copy link
Member

niksirbi commented Apr 30, 2024

See neuroinformatics-unit/movement#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 JoeZiminski changed the title Add PyDantic-style validation to all public functions Add PyDantic/attrs-style validation to all public functions Apr 30, 2024
@JoeZiminski
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants