Skip to content

docs: add nitpicks#16482

Closed
nstarman wants to merge 1 commit into
astropy:mainfrom
nstarman:fix-docs
Closed

docs: add nitpicks#16482
nstarman wants to merge 1 commit into
astropy:mainfrom
nstarman:fix-docs

Conversation

@nstarman
Copy link
Copy Markdown
Member

@nstarman nstarman commented May 22, 2024

Fixes #16481.

There's going to be a lot of nitpicks added. IDK why #15852 seemed to trigger new sphinx complaints.
But more strangely, if you look at the build history of RTD after #15852 was merged it worked just fine. It was only after #16475 was merged that RTD started complaining. But #16475 doesn't appear to be related.

This is a brittle solution.

@nstarman nstarman added this to the v7.0.0 milestone May 22, 2024
@github-actions github-actions Bot added the Docs label May 22, 2024
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@nstarman nstarman force-pushed the fix-docs branch 3 times, most recently from 4508538 to 95d4aa5 Compare May 22, 2024 03:48
@nstarman nstarman changed the title docs: add nitpick docs: add nitpicks May 22, 2024
@nstarman nstarman force-pushed the fix-docs branch 2 times, most recently from 3db4715 to 9aecfe1 Compare May 22, 2024 04:42
@mhvk
Copy link
Copy Markdown
Contributor

mhvk commented May 22, 2024

Gosh, this is pretty awful. Given the strange build history, is it instead sphinx version dependent? Might it be better to just revert? (I.e., #16481)

@nstarman
Copy link
Copy Markdown
Member Author

nstarman commented May 22, 2024

Gosh, this is pretty awful.

Yeah, not great. Maybe more :noindex: on the other links from #15852 would actually fix this. I can investigate later.

Given the strange build history, is it instead sphinx version dependent?

Perhaps. Where in RTD can we see what version it was picking up?

Might it be better to just revert?

I hope not. What #15852 was doing was good. It would be a shame to revert that because of public API confusion.
In my many repos I have never suffered these issues with Sphinx nor RTD. There are some structural differences: PEP8 compliance and sphinx configuration.
Perhaps we can ameliorate the Sphinx issues by turning nitpicky off? Noticed by @eerovaher in #15852 (comment)

My suggestion would be to merge this PR then figure out how to revert THIS PR by either :noindex: additions or nitpicky settings.

@eerovaher
Copy link
Copy Markdown
Member

#15852 removed link targets in our documentation (by adding the :noindex: instructions), but the documentation build succeeded in the pull request because it could find the link targets in the latest build of main. Likewise, the documentation build for 642fbc9 could still look up the link targets from the previous build, so it wasn't until the build for 642fbc9 had finished that the link targets became inaccessible. Similar problems occurred twice in December (#15698 and #15715). I don't fully understand every detail that contributes to the problem, but it apparently it has something to do with

astropy/docs/conf.py

Lines 112 to 114 in f3e40c0

intersphinx_mapping.update(
{
"astropy-dev": ("https://docs.astropy.org/en/latest/", None),

The fix attempted here is not good because the documentation is now lacking links that were there before (compare the documentation for this pull request with the documentation for 6.1.0).

@nstarman might have identified the correct fix in #16473, but I don't expect that to be applied quickly, so in the short term we will have to merge #16481.

@pllim
Copy link
Copy Markdown
Member

pllim commented May 22, 2024

👎 to disable nitpicky. It has been useful in the past to catch real problems. Disabling it would be throwing out baby with the bath water.

@pllim
Copy link
Copy Markdown
Member

pllim commented May 22, 2024

Where in RTD can we see what version it was picking up?

You have to click on "raw log" link on the build job page to see everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants