Trouble documenting a module called rst

Thomas Kluyver avatarThomas Kluyver created an issue

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.

Comments (1)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.