-
Notifications
You must be signed in to change notification settings - Fork 58
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
[ENH] rudimentary support for nimads #763
Conversation
note to self: generate an example of how I want annotations to work. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #763 +/- ##
==========================================
- Coverage 88.85% 88.34% -0.51%
==========================================
Files 39 40 +1
Lines 4405 4566 +161
==========================================
+ Hits 3914 4034 +120
- Misses 491 532 +41
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
Looks good! I was mostly thinking out loud in my comments, with respect to minimizing maintenance burdens in the future, but this looks functional.
# ----------------------------------------------------------------------------- | ||
|
||
|
||
def download_file(url): |
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.
Minor comment: I'm not sure this function is that useful since you only use it twice (below).
Maybe you could make this more useful and use it throughout
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.
yeah, my threshold for wanting to write a function was pretty low, it's possible other examples could be downloaded down the line using this function.
# Directly to NiMARE Dataset | ||
# ----------------------------------------------------------------------------- | ||
# Alternatively, you can convert the NiMADS json files directly to a NiMARE Dataset object | ||
# if you wish to skip using the nimads studyset object directly. |
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.
When does it make sense to use the Studyset object directly?
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.
I consider this the first step towards replacing the nimare dataset object with the nimads studyset object, right now there is not much benefit besides the representation/terms being more consistent (e.g., analysis is called contrast in a nimare dset). but eventually, a user should be able to use a studyset object with all the estimators and have it work.
} | ||
|
||
|
||
class Point: |
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.
My only concern here is that this is sort of "hard coded". Should be fine for now but ideally this structure could be autogenerated from somewhere else?
I wonder if there's any way to auto generate an object given a JSON Schema
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.
yep: https://docs.pydantic.dev/datamodel_code_generator/.
this can be an issue for a refactor.
taking over #628 to just implement reading the studysets without running workflows.
references #218 .
Changes proposed in this pull request: