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

Possible bug in Sphinx? #595

Merged
merged 1 commit into from
Jan 10, 2013
Merged

Possible bug in Sphinx? #595

merged 1 commit into from
Jan 10, 2013

Conversation

embray
Copy link
Member

@embray embray commented Dec 27, 2012

Assigning this to 0.2 for now since I just created this bug, but I'm not sure what the quickest resolution will be.

If you look at the latest docs (http://docs.astropy.org/en/latest/) you'll see that in 3febebd I added a link on the index to "What's New in Astropy 0.2". I added it as a heading just so that it pops out more, but the problem is that now it shows up under the page's table of contents on the sidebar as "whatsnew-0.2". Really it shouldn't show up there at all.

According to the Sphinx documentation I should be able to add :tocdepth: 2 to the top of the page to control this, and indeed that works as expected and should solve the problem. Except when I do that and rebuild the docs I get a bunch of these warnings:

/bray/sc1/root/src/astropy/astropy/docs/changelog.rst:: WARNING: document isn't included in any toctree
/bray/sc1/root/src/astropy/astropy/docs/configs/index.rst:: WARNING: document isn't included in any toctree
/bray/sc1/root/src/astropy/astropy/docs/coordinates/index.rst:: WARNING: document isn't included in any toctree
/bray/sc1/root/src/astropy/astropy/docs/cosmology/index.rst:: WARNING: document isn't included in any toctree
/bray/sc1/root/src/astropy/astropy/docs/creditsandlicense.rst:: WARNING: document isn't included in any toctree
/bray/sc1/root/src/astropy/astropy/docs/development/building_packaging.rst:: WARNING: document isn't included in any toctree
<...and so on...>

This makes no sense, as those pages are included in TOCs on the main index, and those TOCs are still being rendered just fine. So I think that has to be a bug.

In the meantime, does anyone have any better ideas for displaying this link in such a way that it pops out a bit?

@ghost ghost assigned embray Dec 27, 2012
@embray
Copy link
Member Author

embray commented Dec 27, 2012

Yup, fairly certain this is a bug in Sphinx, or at least I was able to fix it. I might be able to create a workaround as an extension...

…' link can be rendered as a heading, but not appear in the sidebar TOC. Also adds a small sphinx extension to work around the bug I seem to have found in Sphinx. Will make a bug report to Sphinx describing the issue.
@embray
Copy link
Member Author

embray commented Dec 27, 2012

@embray
Copy link
Member Author

embray commented Jan 2, 2013

Any comments on this? Will this conflict with #597 at all?

@astrofrog
Copy link
Member

It looks like the sphinx pull request was merged - does this resolve the issue completely, or only partially? Is the present pull request still needed?

@embray
Copy link
Member Author

embray commented Jan 2, 2013

The fix to Sphinx fully resolved the issue afaict. But this workaround is still necessary to work around the issue--most of us aren't using the bleeding-edge version of Sphinx.

@embray
Copy link
Member Author

embray commented Jan 2, 2013

"this workaround is still necessary to work around the issue" Wow that was horribly tautological. Time for me to eat lunch I think.

@astrofrog
Copy link
Member

This seems fine to me, fee free to merge.

embray added a commit that referenced this pull request Jan 10, 2013
@embray embray merged commit a1ecb56 into astropy:master Jan 10, 2013
@embray embray deleted the issue-595 branch January 10, 2013 00:32
embray added a commit that referenced this pull request Jan 25, 2013
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
astrofrog pushed a commit to astropy/sphinx-astropy that referenced this pull request Jan 29, 2018
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

Successfully merging this pull request may close these issues.

2 participants