Skip to content

Intersphinx references in code snippets #103

Open

Description

@bdice

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.

Activity

  1. redeboer commented on Jan 30, 2022

    @redeboer

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

  2. bdice commented on Jan 30, 2022

    @bdice
    MemberAuthor

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

  3. bdice commented on Apr 23, 2022

    @bdice
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions