Is your feature request related to a problem? Please describe.
Right now, we are storing our Jupyter Notebook examples with the output committed, in a subfolder under examples/. There are a few issues with this:
- tracked output means each Notebook changes every time it is run. In addition to obscuring line contribution totals (which I have probably benefited from, hah!) it more importantly leads to merge conflicts. For example, I just had to wade through several dozen merge conflicts, none of which involved input, just to rebase a PR to the main. This is a barrier to potential developers, especially when it can take awhile to get PRs reviewed and merged.
- tracked output also means that output from individual's computers, including things like absolute file paths, are getting published in our docs.
- this is a bit more trivial, but this kind of setup also adds some extra friction for any users wanting to view the examples-- they have to click through a few different pages and then wait for the notebook to render, which can take several seconds and sometimes fails, etc.
Describe the solution you'd like
Other projects such as geopandas and xarray store their example notebooks in the docs folder, with no output committed. The notebooks are then rendered when the docs are built into something nice like this
Describe alternatives you've considered
There are probably a number of ways to do this. I haven't used the gallery functionality in nbsphinx (which I believe geopandas is using), but I do use nbsphinx in other projects. The general workflow I've used is
- having a general test module that executes all notebooks in an examples folder each time the tests are run, and also as part of the documentation build workflow
- after the notebooks are executed, nbsphinx renders them into html as part of the documentation
Open to ideas on how best to address this, and happy to help with whatever we decide on.
Is your feature request related to a problem? Please describe.
Right now, we are storing our Jupyter Notebook examples with the output committed, in a subfolder under
examples/. There are a few issues with this:Describe the solution you'd like
Other projects such as geopandas and xarray store their example notebooks in the docs folder, with no output committed. The notebooks are then rendered when the docs are built into something nice like this
Describe alternatives you've considered
There are probably a number of ways to do this. I haven't used the gallery functionality in nbsphinx (which I believe geopandas is using), but I do use nbsphinx in other projects. The general workflow I've used is
Open to ideas on how best to address this, and happy to help with whatever we decide on.