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] set pybids config #174

Merged
merged 1 commit into from
Sep 20, 2024
Merged

[ENH] set pybids config #174

merged 1 commit into from
Sep 20, 2024

Conversation

Remi-Gau
Copy link
Collaborator

In rare instances you can get the following puzzling crash.

Brought to my attention by @victoris93

Traceback (most recent call last):
  File "/usr/local/bin/giga_connectome", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/giga_connectome/run.py", line 127, in main
    workflow(args)
  File "/usr/local/lib/python3.9/site-packages/giga_connectome/workflow.py", line 81, in workflow
    subj_data, _ = utils.get_bids_images(
  File "/usr/local/lib/python3.9/site-packages/giga_connectome/utils.py", line 81, in get_bids_images
    subj_data = {
  File "/usr/local/lib/python3.9/site-packages/giga_connectome/utils.py", line 82, in <dictcomp>
    dtype: layout.get(**layout_get_kwargs, **query)
  File "/usr/local/lib/python3.9/site-packages/bids/layout/layout.py", line 629, in get
    raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'desc' is not a recognized entity. If you're sure you want to impose this constraint, set invalid_filters='allow'.

This PR adds a regression test (uses nilearn generate fake bids data function for set up) and a fix of the pybids config to solve the issue.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.21%. Comparing base (eb9a18f) to head (e6140bd).
Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #174      +/-   ##
==========================================
+ Coverage   94.03%   94.21%   +0.18%     
==========================================
  Files          18       18              
  Lines         754      761       +7     
==========================================
+ Hits          709      717       +8     
+ Misses         45       44       -1     
Files with missing lines Coverage Δ
giga_connectome/tests/test_utils.py 100.00% <100.00%> (ø)
giga_connectome/utils.py 94.33% <ø> (+0.94%) ⬆️

@Remi-Gau Remi-Gau merged commit 4c2d14e into bids-apps:main Sep 20, 2024
17 checks passed
@Remi-Gau Remi-Gau deleted the desc branch September 20, 2024 08:13
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.

1 participant