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

Trouble documenting a module called rst #1309

Closed
shimizukawa opened this issue Jan 3, 2015 · 1 comment
Closed

Trouble documenting a module called rst #1309

shimizukawa opened this issue Jan 3, 2015 · 1 comment

Comments

@shimizukawa
Copy link
Member

We have a module in IPython called rst (it's a rst exporter for IPython notebooks). I'm including that in a list using the autosummary extension, like so:

.. autosummary::
   :toctree: generated

   ...
   IPython.nbconvert.exporters.rst
   ...

However, because .rst is the file extension for source files, the table of contents is looking for a document named IPython.nbconvert.exporters. This results in several warnings during the build:

reading sources... [100%] whatsnew/version1.0                                              
source/api/generated/gen.txt:3: WARNING: toctree references unknown document u'api/generated/IPython.nbconvert.exporters'
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/takluyver/Code/ipython/docs/source/api/generated/IPython.nbconvert.exporters.rst.rst:: WARNING: document isn't included in any toctree
...
done
preparing documents... done
writing output... [100%] whatsnew/version1.0                                               
<autosummary>:None: WARNING: toctree contains reference to nonexisting document u'api/generated/IPython.nbconvert.exporters'
None:None: WARNING: toctree contains reference to nonexisting document u'api/generated/IPython.nbconvert.exporters'
writing additional files... genindex py-modindex search interactive/htmlnotebook

The toctree directive has a similar issue, but there I can work around it by doubling up the last part ....rst.rst. Doing that in the autosummary directive breaks the link to the module.

I initially saw this in 1.1.3, but I've just reproduced it with my up-to-date Sphinx checkout, which describes itself as 1.2b3.


@shimizukawa
Copy link
Member Author

From Georg Brandl on 2013-11-27 19:20:33+00:00

Don't strip file extension from names in autosummary directive.

Fixes issue #1309.

→ <<cset 05e3d7e>>

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant