-
Notifications
You must be signed in to change notification settings - Fork 13
[ENH]: Adopt Pydantic for schema validation #364
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
===========================================
+ Coverage 91.64% 100.00% +8.35%
===========================================
Files 146 1 -145
Lines 5862 1 -5861
Branches 934 0 -934
===========================================
- Hits 5372 1 -5371
+ Misses 318 0 -318
+ Partials 172 0 -172
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
fraimondo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks promising. Though there are some changes that go against the easy-to-use QA:
-
Many parameters were
str or list of str. Now they are lists. This adds the unnecessary burden to add a list in the YAMLs where the most common use case is to use a single element. -
some parameters were
str or Pathand now they have to be Paths. This also makes it more complicated for users to define code. This can easily be validated later on and not with pydantic. Same forHttpUrl -
I think there's an issue with the
datadirwhich now will be part of the meta due to missing it's_. Also, there was a reason why it was not calledfulldirin the datababber, butdatadir, on purpose. -
Some enums might add validation to pydantic, but will restraint the extensibility of junifer. E.g. DataType, ConfoundFormat, etc... These should be dynamic, as I might want to add some of them in an extension, without modifying junifer code.
Since there are 197 files changed, and many changes happen because of the first item. I will review more later with the next changes.
5831270 to
f9e207c
Compare
…taType or list of DataType
All of them should be reverted now, let me know if you find any stray ones.
Not at all, users can keep passing
The introduction of
Has been addressed in the specific comment.
The reason was to keep it in sync with non-datalad based datagrabbers and is already taken care of internally via introduction of
Has been addressed in specific comments. |
Are you requiring a new dataset or marker?
Which feature do you want to include?
We want to be able to validate the yaml so we avoid issues like #296
How do you imagine this integrated in junifer?
Use pydantic and validate the yaml.
Do you have a sample code that implements this outside of junifer?
No response
Anything else to say?
No response