-
Notifications
You must be signed in to change notification settings - Fork 340
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
Increase the strictness of the tox
environment for building documentation
#1587
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1587 +/- ##
=======================================
Coverage 97.21% 97.21%
=======================================
Files 83 83
Lines 7961 7961
=======================================
Hits 7739 7739
Misses 222 222
Continue to review full report at Codecov.
|
Oh, good. Only 959 lines of warnings this time. 😐 (Fortunately, though, most of them are the same warning but just repeated.) |
These were causing warnings
For some reason it is not working in nitpicky doc builds, but I haven't been able to figure out why.
tox
environment for building documentation
I think this is the first time I've gotten a nitpicky doc build to work without errors! 🥲 |
:orphan: | ||
|
||
`plasmapy.particles.particle_collections` | ||
========================================= | ||
|
||
.. currentmodule:: plasmapy.particles.particle_collections | ||
|
||
.. automodapi:: plasmapy.particles.particle_collections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had only been missing for approximately 4.2 × 107 seconds!
@@ -59,7 +59,7 @@ Deprecations and Removals | |||
`~plasmapy.particles.ionization_state.IonizationState.charge_numbers`. (`#1136 <https://github.com/plasmapy/plasmapy/pull/1136>`__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a future thought... Do we want to keep this CHANGELOG.rst
? It feels like we're just duplicating the information. To me it makes more sense to remove this file and rename docs/whatsnew
-> docs/changelog
, and only have the changelog in one location. The only reason I see to keep CHANGELOG.rst
is if towncrier
forces us to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I'm wondering about having the separate whatsnew pages for each of the releases, and then having a main changelog page that doesn't duplicate the information, but rather does a .. include::
directive for each of the whatsnew pages. I find it useful to have a full changelog page as well as the separate whatsnew pages (which we can link to in release announcements), though we have a couple of options that would work well. In any case, we'll gain some experience with towncrier
in the next few days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used .. include::
in the past, but I've been moving away from it because is presents a potential security hole. I don't think it's a big deal in our usage, but still...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's best to avoid potential security holes even if it doesn't seem like it'll affect us. I'll link to this comment in #1595 as a post-release thing to think about or create an issue on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to review this as one of the last PRs for the 0.8.0
release. I think a lot of these changes would also be a part of #1597.
changelog/1531.trivial.rst
Outdated
Reduced execution time by avoiding calculations with units while keeping | ||
unit validation. Added :file:`plasmapy/utils/units_definitions.py` to | ||
precompute units. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry does not make sense on it's own. There is no context. Reduced execution timing of what? What is units_definitions.py
? Also, this seems like two separate changelog entries.
changelog/1587.doc.rst
Outdated
Increased the strictness of the ``build_docs`` tox_ environment so that | ||
broken reST_ links now emit warnings which are then treated as errors, | ||
removed the ``build_docs_nitpicky`` tox_ environment, and updated the | ||
|documentation guide| accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly add something about fixing all links that were failing under nitpicky
. This could be added to this entry or as its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nearly there. Just need to address those few comments I had and then we're all good.
Prior to this pull request, our documentation builds would pass when there were typos like
plsmapy.formulary
. Because of this, we ended up with a bunch of broken reST links that built up over time. I ended up doing some large PRs to fix these (e.g., #1207, #1257, and #1509).This PR enables the
-n
option forsphinx-build
in thebuild_docs
environment fortox
. This will cause warnings to be emitted when there are broken reST links. The-W
flag (which was already present) made it so that the build would fail in case of any warnings. Having the-n
option enabled will prevent the situation where broken reST links get passed through silently.This is a follow-up on #1206.