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

[Feature] Align validation methods across NIU projects #124

Open
JoeZiminski opened this issue Sep 28, 2023 · 1 comment
Open

[Feature] Align validation methods across NIU projects #124

JoeZiminski opened this issue Sep 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@JoeZiminski
Copy link
Member

JoeZiminski commented Sep 28, 2023

Currently validation in spikewrap is done in a few (suboptimal) ways, for example on the class and in quick and dirty argument validator method. Some checks are basic on the type / expected value of public argument inputs, others are on things like if folders passed really exist.

Speaking with @lauraporta who also spent a lot of time thinking about best ways to check that user-pased inputs valid, and @niksirbi who I recall is using a nice package, the name of which I forgot.

Anyway, putting this issue here as at some point, depending on how specific validation needs are for each project, we could try and align validation code.

@JoeZiminski JoeZiminski added the enhancement New feature or request label Sep 28, 2023
@niksirbi
Copy link
Member

There are basically two popular Python libraries for validation, pydantic & attrs.

For movement I started using pydantic, but later switched to attrs for various reasons.
For references, see the 3 blog posts mentioned under this issue.

@JoeZiminski JoeZiminski changed the title [Feature] Align validation methods across NUI projects [Feature] Align validation methods across NIU projects Oct 10, 2023
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