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

[ENH] rudimentary support for nimads #763

Merged
merged 38 commits into from Mar 15, 2023
Merged

Conversation

jdkent
Copy link
Member

@jdkent jdkent commented Jan 26, 2023

taking over #628 to just implement reading the studysets without running workflows.
references #218 .

Changes proposed in this pull request:

  • this is really just a minimal representation to work with the upload process
  • will add more functionality with more pull requests.

@jdkent
Copy link
Member Author

jdkent commented Jan 31, 2023

note to self: generate an example of how I want annotations to work.

@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Patch coverage: 74.53% and project coverage change: -0.51 ⚠️

Comparison is base (c30add5) 88.85% compared to head (4f08818) 88.34%.

❗ Current head 4f08818 differs from pull request most recent head 7d2a540. Consider uploading reports for the commit 7d2a540 to get more accurate results

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     
Impacted Files Coverage Δ
nimare/nimads.py 72.29% <72.29%> (ø)
nimare/io.py 95.43% <100.00%> (+0.28%) ⬆️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jdkent jdkent requested review from tsalo and adelavega March 14, 2023 16:38
Copy link
Member

@adelavega adelavega left a 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):
Copy link
Member

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

Copy link
Member Author

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

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?

Copy link
Member Author

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

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

Copy link
Member Author

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.

@jdkent jdkent changed the title Split/nimads [ENH] rudimentary support for nimads Mar 15, 2023
@jdkent jdkent merged commit 08cbfad into neurostuff:main Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants