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

Proposal: bids.ext namespace for extension packages #817

Closed
effigies opened this issue Feb 16, 2022 · 2 comments
Closed

Proposal: bids.ext namespace for extension packages #817

effigies opened this issue Feb 16, 2022 · 2 comments

Comments

@effigies
Copy link
Collaborator

In #814, bids.reports is being moved out of pybids and into a separate pybids-reports package. Ideally it would still be importable through bids.reports, but the problem is that third-party "namespace packages" are only well defined in an empty module.

In particular, if either pybids or pybids-reports is installed in editable mode (pip install -e), then import resolution of modules in bids.* is ill-defined and needs some hacks to make work that then interfere with our default imports like bids.BIDSLayout.

If we create bids.ext as a defined location for namespace packages, then we can configure both pybids and any extensions to properly handle any installation setup (i.e., any configuration of editable and full installations). This is at the cost of making these extensions a little less integrated, but maybe that's a good thing. And we could consider having a registry of extensions such that, if bids.ext.reports exists, then it is imported into bids as bids.reports.

@tsalo
Copy link
Member

tsalo commented Feb 17, 2022

I like this idea. I would also like to propose moving analysis to an extension package. I don't think this on its own will reduce pybids all that much, but if we also work on streamlining BIDSLayout (e.g., via proposals in bids-standard/pybids-light#1), then it could be a useful step.

@effigies
Copy link
Collaborator Author

I'm okay with moving analysis out, but I suspect it will be hard to graft onto an alternative BIDSLayout object, so we'll probably have multiple layout APIs around, including a legacy one that maybe only FitLins uses. Just a guess, though.

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

No branches or pull requests

2 participants