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: Allow passing a database_path to create a BIDSLayout #788

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

oesteban
Copy link
Member

Resolves: #786.

@oesteban
Copy link
Member Author

Works locally:

230311-00:34:47,353 nipype.workflow INFO:
         [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
230311-00:34:47,359 nipype.workflow INFO:
         [Node] Finished "metadata", elapsed time 0.005727s.

This node used to take ~50s on the main thread and ~80s on workers.

@oesteban oesteban requested a review from effigies March 10, 2023 23:44
@oesteban oesteban marked this pull request as ready for review March 10, 2023 23:44
@effigies
Copy link
Member

Don't you need to hook it up to something?

@oesteban
Copy link
Member Author

What do you mean?

From pybids, this doesn't require anything specific other than a release supporting database_path. From MRIQC/xPreps just to set the config.execution.bids_database_dir (or wherever name that config has) at workflow definition

@oesteban
Copy link
Member Author

It'd be prudent to deprecate the layout member of the interface though - it can only be used with the linear plugging of nipype

oesteban added a commit to nipreps/mriqc that referenced this pull request Mar 11, 2023
There's no need to index the BIDS folder repeatedly with each of these
interfaces.

Requires: nipreps/niworkflows#788.
oesteban added a commit to nipreps/mriqc that referenced this pull request Mar 11, 2023
There's no need to index the BIDS folder repeatedly with each of these
interfaces.

Requires: nipreps/niworkflows#788.
@effigies
Copy link
Member

Sorry, I thought this was on mriqc.

@effigies effigies merged commit c2b8e0f into master Mar 11, 2023
@effigies effigies deleted the fix/786-read-bids-meta branch March 11, 2023 17:30
oesteban added a commit to nipreps/mriqc that referenced this pull request Mar 12, 2023
There's no need to index the BIDS folder repeatedly with each of these
interfaces.

Requires: nipreps/niworkflows#788.
effigies added a commit that referenced this pull request Mar 24, 2023
1.7.7 (March 24, 2023)

Patch release that optimizes BIDS metadata handling by reusing cached index databases.

* ENH: Allow passing a ``database_path`` to create a ``BIDSLayout`` (#788)
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.

ReadSidecarJSON always indexes the layout (or breaks)
2 participants