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

Intersphinx references in code snippets #103

Open
bdice opened this issue Oct 28, 2020 · 3 comments
Open

Intersphinx references in code snippets #103

bdice opened this issue Oct 28, 2020 · 3 comments

Comments

@bdice
Copy link
Member

bdice commented Oct 28, 2020

Issue Description

The sphinx-gallery package automatically adds intersphinx references to all Jupyter notebooks / input files that it renders. Example: https://sphinx-gallery.github.io/stable/configuration.html#link-to-documentation

It would be very helpful if we could enable automatic intersphinx references in all code snippets (doctest-style snippets in method docstrings and rST blocks like .. code-block:: python).

I don't currently know of a way to do this, but it may be possible with sphinx-gallery or another tool.

@redeboer
Copy link

Incidentally ran into this issue while googling. Seems that the new sphinx-codeautolink does the job!

@bdice
Copy link
Member Author

bdice commented Jan 30, 2022

@redeboer Wow! Thanks for letting us know! I will give it a try!

@bdice
Copy link
Member Author

bdice commented Apr 23, 2022

I added sphinx-codeautolink to signac-dashboard. I found that it wasn't as helpful for signac or signac-flow. The structure of our docs and their code examples is pretty incomplete, meaning that there aren't many (any?) helpful links. We would need to revise the documentation examples to be fully executable snippets (including imports, etc.) in order to see a benefit from this.

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

2 participants