jupyter / jupyter-sphinx

Sphinx extension for rendering of Jupyter interactive widgets.
https://jupyter-sphinx.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
188 stars 65 forks source link

jupyter-sphinx generate a "jupyter_execute" folder #215

Closed 12rambau closed 1 year ago

12rambau commented 1 year ago

I run the following code to build my documentation:

sphinx-build -b html docs/source build

and in one of my file there is the following cell to execute:

.. jupyter-execute:: 

   import pygadm 

   gdf = pygadm.get_items(name="Singapore", content_level=1)
   gdf.plot(cmap = "viridis")

For a reason I can't explain building the documentation creates a jupyter_execute folder at the root of my lib. Am I missing a parameter or is it a bug ? I would expect this to end-up in the build folder.

If an example is needed, you can find the example here: https://github.com/12rambau/pygadm

akhmerov commented 1 year ago

Thanks for reporting, I can confirm that this is a bug.

12rambau commented 1 year ago

the error was coming from me. I stopped using the make html command from docs source but instead used sphinx-build -b html docs/source build from the repository root. As the outputdir is automatically deteted from your side it wasn't working: https://github.com/jupyter/jupyter-sphinx/blob/1bb7d916d8ade01ce30d74cdf6cf343bec6236ec/jupyter_sphinx/utils.py#L91

Now that I run the more appropriate:

sphinx-build -b html docs/source docs/build/html

It works as expected.

Sorry for the noise