Skip to content

[Doc] Turn on nitpicky mode - #46103

Merged
can-anyscale merged 2 commits into
ray-project:masterfrom
peytondmurray:39658-turn-on-nitpicky-mode
Jun 24, 2024
Merged

can-anyscale merged 2 commits into
ray-project:masterfrom
peytondmurray:39658-turn-on-nitpicky-mode

Conversation

@peytondmurray

@peytondmurray peytondmurray commented Jun 17, 2024 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

This PR prevents developers from breaking internal sphinx references by causing the docs build to fail if a broken reference is found.

Previously, broken references would simply be rendered as inline code but now they will raise an exception during the build process. It will be the responsibility of the developer who changes/adds/removes APIs or documentation to ensure the documentation is updated accordingly.

Furthermore, single backticks (`) will now default to just being rendered as code; previously Sphinx considered anything in single backticks a reference. Most developers who touch documentation are familiar with markdown rather than RST, and use single backticks to denote code although it is not valid RST syntax for code (RST uses double backticks). As a result, there are many many places in the documentation that use single backticks to mean code, and it would be impractical to expect contributors to adhere strictly to RST syntax when everyone is used to markdown. So instead we modify the default_role to eliminate this problem entirely, and treat anything in single backticks as code.

Related issue number

Closes #39658. Currently blocked by #46102; will mark this as ready once that PR is merged.

Checks

@peytondmurray
peytondmurray force-pushed the 39658-turn-on-nitpicky-mode branch from afc2a47 to ba4a641 Compare June 20, 2024 19:18
@peytondmurray peytondmurray added docs An issue or change related to documentation go add ONLY when ready to merge, run all tests labels Jun 20, 2024
@peytondmurray
peytondmurray marked this pull request as ready for review June 20, 2024 20:13
@peytondmurray
peytondmurray requested a review from a team as a code owner June 20, 2024 20:13

@can-anyscale can-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for working on this

Comment thread doc/source/conf.py Resolved
Comment thread doc/source/conf.py Resolved
Comment thread doc/source/conf.py Resolved

@can-anyscale can-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@can-anyscale
can-anyscale merged commit 4819eec into ray-project:master Jun 24, 2024
@can-anyscale

Copy link
Copy Markdown
Contributor

can-anyscale added a commit that referenced this pull request Jun 25, 2024
can-anyscale added a commit that referenced this pull request Jun 25, 2024
ronny-anyscale added a commit that referenced this pull request Aug 3, 2026
Five days on from the last refresh, 3 of 26 inventories had drifted. All 26
downloaded cleanly; only these three changed:

  python        3.14   +4  / -0   (PyErr_Display and its params)
  transformers  main   +12 / -0   (GraniteMoeSWA* model docs)
  pydantic      -      +0  / -33

Refreshing at this point rather than at merge time is deliberate. The snapshots
only need to be current when resolution flips from live fetches to the committed
files, and that happens the moment this merges -- which, with `go` already on, is
not a moment we control. A doc PR merged during the staleness window is built
against live inventories, so a cross-reference to a symbol upstream shipped in
the interim passes there and would only fail once master starts resolving from
disk.

The pydantic removals are the silent direction this change exists to catch:
pydantic dropped its re-exported pydantic-core internals (pydantic.main and
pydantic.plugin SchemaSerializer/SchemaValidator/ValidationError,
pydantic.types.PydanticCustomError, __pydantic_core_version__). Verified that
nothing under doc/source or python/ray references any of the 33, so no
cross-reference goes dead here; separately, conf.py's nitpick_ignore_regex
carries a blanket ("py:class", ".*") from #46103, so class references are not
what a -W build would have caught anyway.

Signed-off-by: Ronny Roland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc] Fix broken links in Ray docs - turn on nitpicky mode

2 participants