-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sphinx emits lots of warnings when building docs #911
Comments
FYI: I fixed the 1st line reference issue for Lines 16 to 21 in 64ec94d
Lines 103 to 111 in 64ec94d
and I also noticed that they show up for gallery examples in the tooltip popup, so I removed it from the Kimber soiling example here too: pvlib-python/docs/examples/plot_greensboro_kimber_soiling.py Lines 1 to 30 in 64ec94d
|
Thanks for the heads up! I'll leave those alone/merge them in from master when #910 is merged. |
Thanks!
Should we bump sphinx instead of (or in addition to) pinning docutils?
Is it the first line that matters or the first sentence or the first paragraph? #912 seems to take a few different approaches. |
+1 I just noticed yesterday that Sphinx is pinned at v1.8.5, which IMO is pretty old. I don't think this a usability concern because only for builders would care about this, so probably zero users would be affected by updating Sphinx to the newest version which is like 2.something I think. I think it's okay to pin Sphinx and docutils after we confirm they are rendered to our satisfaction. |
Sorry for delayed reply. Pinning sphinx at 1.8.5 was decided in #833 (comment) because sphinx 2.0+ (at the time) rendered references poorly. I haven't tested it since then, so it could be that the most recent sphinx has improved reference formatting. I'll play around with that tonight.
At first I thought that it was the first paragraph that mattered, but I realized halfway through that autodoc is only pulling the first English sentence (or at least something that looks like the first sentence). So I think second sentence, first paragraph is fine for references. |
Thanks for the clarification. I guess the paragraph/sentence distinction wouldn't matter if we decided to follow pep 257. |
Running with the most recent sphinx (2.4.3) and docutils (0.16) still produces the reference format seen in #833. After trying it out for a bit, I think the CSS override necessary to get it looking nice again would be pretty unpleasant and I wouldn't want to maintain it. However, sphinx 2.0+ does allow use of the original HTML4 writer use in sphinx 1.8.5, which produces good output with the newest sphinx/docutils. The docutils warning is gone, but another has popped up:
It's fixed as of readthedocs/sphinx_rtd_theme#728, but unfortunately there hasn't been a release since the merge (readthedocs/sphinx_rtd_theme#739) so isn't available on pypi. I think this warning doesn't break the build, even with
I don't really have a preference for Option 2 vs 3. Curious what others think. |
Yikes what a mess. Thanks for the research! I’m ok with either 2 or 3. |
I'd say let's do option 2 for now and revisit after sphinx_rtd_theme cuts a new release. From reading through their issue log, it seems like the next release is focused on improving support for sphinx 2+ anyway so it should be a good time to bump our sphinx version. |
Sphinx currently emits a few types of warnings when building the docs, none are really a big deal but it clutters the output and makes #909 less effective. I'll open a PR shortly to address:
Docutils warning
I'm not 100% sure what this one is, but I assume it is related to the newest version of docutils deprecating something and sphinx hasn't caught up yet. example
I'll play around with pinning the docutils version and see if that fixes it.
Improper RST in gallery example
The I-V curve example generates
WARNING: Title underline too short.
because the page title got updated without extending the underline (my bad). Easy fix. linkFirst-line references
The first lines of docstrings get orphaned when they are copied into the API Reference docs page and Sphinx emits a bunch of warnings about it: example
There were a few votes in #909 to remove references from first lines of docstrings to prevent these warnings. If nobody objects, I'll move references into the second part of the docstring, for instance:
Current:
New:
This is related to #837 but that's a much bigger job and I'd rather not tackle it right now.
The text was updated successfully, but these errors were encountered: