Closed billbrod closed 3 weeks ago
And use importlib
for the mplstyle file
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.
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.
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
close with PR #216
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.