flatironinstitute / nemos

NEural MOdelS, a statistical modeling framework for neuroscience.
https://nemos.readthedocs.io/
MIT License
78 stars 7 forks source link

Do something else with `examples_utils` code? #158

Closed billbrod closed 3 weeks ago

billbrod commented 4 months ago

Currently, we have a folder of examples_utils, which contains some code leftover from the workshop(s) we ran, including downloading data and plotting. Should think more carefully about what to do with them (downloading data, in particular, should probably be changed to using pooch, see this plenoptic PR and the FENS workshop). And the plotting code could potentially be made more general.

billbrod commented 4 months ago

And use importlib for the mplstyle file

BalzaniEdoardo commented 4 months ago

importlib is pretty cool, we should use it! For what it concerns the plotting utils, is there a way to include the script when downloading the notebook/script generated by mkdocs-gallery? It is a bit annoying that people cannot run the notebook without downloading extra utils.

billbrod commented 4 months ago

Agreed that it's annoying and ideally people won't have to download anything else. I think the mplstyle file and data downloading should be moved into the main code. For the plotting code, I think we'll need to think: for some of them, it may be worth generalizing them a little and including in the main code. For others that are too example-specific, ideally they'd be in the notebook but hidden, but I can't find a way to do that in mkdocs-gallery (or sphinx-gallery, for that matter). It's probably worth poking around other packages, to see what they do, and asking around.

billbrod commented 1 month ago

Edoardo figured out how to get collapsible blocks using the ??? syntax, but those cells don't get run, so it doesn't solve this problem. what we want is something like the hide-input tag from myst-nb

BalzaniEdoardo commented 3 weeks ago

close with PR #216