bids-standard / pybids

Python tools for querying and manipulating BIDS datasets.
https://bids-standard.github.io/pybids/
MIT License
219 stars 122 forks source link

Consider moving `reports` to its own repository #801

Open tsalo opened 2 years ago

tsalo commented 2 years ago

The reports module is sort of disconnected from the rest of pybids, and I was thinking that it might be a good idea to move it to its own package (e.g., bids-standard/pybids-reports). I brought this idea up in today's BIDS maintainers meeting, and our decision was to open an issue to give users the opportunity to weigh in on this idea.

A bit of context:

effigies commented 2 years ago

Assuming it is decided to break things out...

Would it make sense to do it as a namespace package, so it would still be imported as bids.reports? This is how we're doing pydra task packages which get imported under pydra.tasks.<package>.

We might be able to do something clever on our end, so that attempting to import without the package installed raises an informative error:

>>> from bids import reports
ImportError("Please install the pybids-reports package with pip")

That should help smooth out any transition, especially if you're able to maintain the API for a few versions at least.

tsalo commented 2 years ago

I like that idea!

Remi-Gau commented 2 years ago

FYI: I will be playing around with using "mustache" templates to better separate code and boilerplate text in the report module.

For now I am sandboxing things in this repo.

https://github.com/Remi-Gau/bids-methods/blob/main/Demo.ipynb

tsalo commented 2 years ago

I've created https://github.com/bids-standard/pybids-reports and will try to get the packaging and current code cleaned up.