Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecated dependency sphinx-nbexamples to nbsphinx #230

Closed
Jacob-Stevens-Haas opened this issue Jul 14, 2022 · 2 comments
Closed
Assignees

Comments

@Jacob-Stevens-Haas
Copy link
Member

Is your feature request related to a problem? Please describe.

In looking to update sphinx's conf.py for notebook examples moved in #203, I discovered that the sphinx extension sphinx-nbexamples has been deprecated.

Describe the solution you'd like

Out with the old and in with the new

Describe alternatives you've considered

If this takes more than an hour or two I'll table it for the future.

Additional context

This might obviate the need to update binder links. All depends on whether configuration of nbsphinx and sphinx-nbexamples allows us to keep the same URL with the newer directory structure.

@Jacob-Stevens-Haas Jacob-Stevens-Haas self-assigned this Jul 14, 2022
@Jacob-Stevens-Haas
Copy link
Member Author

Aha. sphinx-nbexamples is incompatible with the new example format in #203. It is due to a bug in Gallery.recursive_preprocess(), where directories are walked incorrectly and the iterator exits early. As that extension is deprecated, it won't be patched.

@Jacob-Stevens-Haas
Copy link
Member Author

Jacob-Stevens-Haas commented Jul 14, 2022

Not sure if nbsphinx supports our use case. Another solution would be to patch the issue with sphinx_nbexamples in a fork. Also worth looking at MyST-NB

Jacob-Stevens-Haas added a commit that referenced this issue Jul 18, 2022
Solves #230, replacing sphinx_nbexamples with nbsphinx

nbsphinx only works with notebooks in docs/, so copy examples/ to
docs/examples when building docs.  We lose the gallery, however.

Edit examples/README.rst to allow links to work from github to github,
but when docs built, links go from docs to docs.
Jacob-Stevens-Haas added a commit that referenced this issue Jul 18, 2022
Solves #230, replacing sphinx_nbexamples with nbsphinx

nbsphinx only works with notebooks in docs/, so copy examples/ to
docs/examples when building docs.  We lose the gallery, however.

Edit examples/README.rst to allow links to work from github to github,
but when docs built, links go from docs to docs.
jpcurbelo pushed a commit to jpcurbelo/pysindy_fork that referenced this issue Apr 30, 2024
Solves dynamicslab#230, replacing sphinx_nbexamples with nbsphinx

nbsphinx only works with notebooks in docs/, so copy examples/ to
docs/examples when building docs.  We lose the gallery, however.

Edit examples/README.rst to allow links to work from github to github,
but when docs built, links go from docs to docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant