Skip to content

Need to fix up sphinx warnings, etc.#231

Merged
keflavich merged 5 commits into
astropy:masterfrom
keflavich:sphinx-warnings
Jan 11, 2014
Merged

Need to fix up sphinx warnings, etc.#231
keflavich merged 5 commits into
astropy:masterfrom
keflavich:sphinx-warnings

Conversation

@keflavich

Copy link
Copy Markdown
Contributor

Sphinx gives a boatload of warnings each time we build (e.g. https://travis-ci.org/astropy/astroquery/jobs/11808153). These don't cause any major problems I'm aware of, but they should still be cleaned up

@keflavich

Copy link
Copy Markdown
Contributor Author

Oh yeah, this was pointed out in #229

@keflavich

Copy link
Copy Markdown
Contributor Author

Down to 2 warnings:

None:None: WARNING: toctree contains reference to nonexisting document 'api/astropy.config.configuration.ConfigurationItem'
<autosummary>:None: WARNING: toctree contains reference to nonexisting document 'api/astropy.config.configuration.ConfigurationItem'

@eteq, @astrofrog - is there something genuinely missing, or should I find a way to drop this intersphinx link?

@keflavich

Copy link
Copy Markdown
Contributor Author

https://travis-ci.org/keflavich/astroquery/jobs/16460532

ERROR: Unknown interpreted text role "python".: I thought :python: was supposed to intersphinx to the python module of that name?

/home/travis/build/keflavich/astroquery/docs/gama.rst:87: ERROR: Error in "automod-diagram" directive:
no content permitted.

.. automod-diagram:: astroquery.gama
    :private-bases:

No idea.

/home/travis/build/keflavich/astroquery/docs/sdss.rst:77: WARNING: toctree references unknown document u'api/astropy.config.configuration.ConfigurationItem'
at least this one occurs locally too

@eteq

eteq commented Jan 10, 2014

Copy link
Copy Markdown
Member

@keflavich re: the configuration item stuff: I noticed similar warnings while doing #269 - there it was caused by an import of ConfigurationItem at the top of a module that doesn't have an __all__. Then automodapi thinks ConfigurationItem is actually supposed to be documented by astropy, which of course is incorrect. The solution is either to add an __all__ (which of course shouldn't have ConfigurationItem), or do del ConfigurationItem after you define all the items. See the change I made in astroquery/fermi/__init__.py in the diff of #269 .

re: Unknown interpreted text role "python". - where did you see that :python: is to be used in this way? I've never used that - it should just work to link the same as you would anything else: e.g. str will automatically intersphinx to python's str constructor if its in your intersphinx dictionary - see http://sphinx-doc.org/tutorial.html#intersphinx . (And astropy's intersphinx is set up this way, so astroquery should have it already in there).

re: no content permitted - I think that's because there's a missing colon at the end of :no-inheritance-diagram in gama.rst - it goes away if I add the colon locally.

Running locally, I also noticed some Unknown section Example warnings. I think that's because it should be "Examples", not "Example".

@eteq

eteq commented Jan 10, 2014

Copy link
Copy Markdown
Member

After posting that, I realized it was probably easier to just fix them, since I went to the trouble of finding the issues. So keflavich#5 has a commit that leads to all the warnings going away, at least locally for me. So @keflavich, maybe merge that and see if the tests pass here?

@keflavich

Copy link
Copy Markdown
Contributor Author

Thanks @eteq, I'll try the merge and test locally. You've caught a lot of small things that are caused by astroquery's mixed heritage (i.e., many independent committers). I didn't know about the ConfigurationItem issue, though.

@eteq

eteq commented Jan 11, 2014

Copy link
Copy Markdown
Member

Oh, I totally understand the cause - that's why I turned on the sphinx test in astropy in the first place - its about the only way to keep people honest about it :).

Apparently the test runs in your repo too - keflavich#5 is passing (and includes the sphinx build), so that probably means if you merge it this will be good to go too.

Documentation fixes to eliminate sphinx warnings
@eteq

eteq commented Jan 11, 2014

Copy link
Copy Markdown
Member

Hooray, it worked!

keflavich added a commit that referenced this pull request Jan 11, 2014
Need to fix up sphinx warnings, etc.
@keflavich keflavich merged commit 41837e6 into astropy:master Jan 11, 2014
@keflavich keflavich deleted the sphinx-warnings branch January 11, 2014 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants