question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with autosummary toctree option?

See original GitHub issue

I’m currently using jupyter-book and sphinx.ext.autosummary (with great success!). I’m also trying to use the :toctree: option in autosummary to let the table serve as a toctree, and so that sphinx-autogen will generate stub files for each item in the tree. It’s actually working great and i get the desired result (which is an autogenerated “subtree” extension of my _toc.yml based on the class names in a given module).

```{eval-rst}
.. autosummary::
   :toctree: _autosummary

   item_a
   item_b
```

The only niggle I’m running into at the moment is a slew of warnings in my build logs for all of stubs created by jupyter-book:

WARNING: Found a content page that is not in _toc.yml: _autosummary/_______.rst

best I can tell, it’s because these these autogenerated stubs aren’t getting injected into app.config["globaltoc"] … but I can’t tell if there’s anything I should be doing to fix it, or if this is a legitimate feature request. (If I add the _autosummary stubs to the exclude_pattern, the warnings go away, but then so too do the corresponding docs).

Describe the solution you’d like

I’d like to be able to use the sphinx.ext.autosummary directive with the :toctree: option without having to manually specify each of the autogenerated *.rst stub files in my _toc.yml, and without getting all of the Warnings in my logs.

thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Dec 20, 2020

thanks for the feedback @tlambert03 we will try to have a look at some point, it may well be that we have to “special case” these auto-generated files

0reactions
tlambert03commented, Dec 22, 2020

hm. either way. I kinda like the option of having a warning by default, but an opt-out pattern would be nice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sphinx autosummary does not use labels in toctree
I have found out where this whole issues is coming from. The cause isn't in the toctree but the titles of each rst...
Read more >
sphinx.ext.autosummary – Generate autodoc summaries
This extension generates function/method/attribute summary lists, similar to those output e.g. by Epydoc and other API doc generation tools.
Read more >
Configuration — Sphinx-Gallery 0.11.1-git documentation
autosummary takes the option toctree which is where the rst files are saved and template which is the file that describes how the...
Read more >
sphinx.ext.autosummary – Generate autodoc summaries
sphinx.ext.autosummary – Generate autodoc summaries · If you want the autosummary table to also serve as a toctree entry, use the toctree option,...
Read more >
Custom templates with autosummary - Google Groups
autosummary template feature works fine for me. ... want a very slightly modified module.rst template, which will add :toctree:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found