You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Link the README's own files absolutely, kept local in the docs (issue btclib-org/.github#1851) - #481
The README is the package's PyPI page, and PyPI does not resolve relative links, so its 10 links to the tree's own files were dead there. They now link absolutely to https://github.com/btclib-org/ecc/blob/main/<path>, as section 2 of the organization standard asks. Read the Docs keeps them local: RootFileLinks in docs/source/conf.py turns a BLOB link to an included file back into that page, as in the pilot. The hooks follow the standard: local-link-prefix exempts README.md, and readme-absolute-link refuses a relative link there. The pilot was PR btclib-org/bip39-slip39#224.
Evidence
Check
Result
Suite, hooks
exit 0; 15719 passed, coverage 100%
sphinx-build -n -W, href grep, check_included_links.py at 5be4b0f
exit 0 each (control with the base conf.py: exit 1)
…tclib-org/.github#1851)
README.md is the package's page on PyPI, which resolves no relative
link against the tree, so its "./SECURITY.md" and the like were dead
there. Section 2 of the organization standard asks the root README.md
to link a file of its own tree as
https://github.com/btclib-org/ecc/blob/main/<path>, and its
`## Contributing` paragraph carries that form too.
The documentation renders some of those files as pages. RootFileLinks
in docs/source/conf.py now turns a link to BLOB plus the path of a file
a *_link.md shim includes, on any page, into the xref myst makes from a
relative link to that page, a fragment included, as
btclib-org/bip39-slip39#224 did there. A link to a file no shim
includes, such as ARCHITECTURE.md, stays a link to GitHub.
check_included_links.py, which docs.yml runs at its pin, refuses a
built page left linking an included file at BLOB.
tests/docs_conf_test.py runs the transform on hand-made doctrees; it
executes conf.py, so the `test` group gains sphinx, with the `docs`
group's marker and bound.
.pre-commit-config.yaml takes section 4's pair: `local-link-prefix`
excludes README.md, and `readme-absolute-link` refuses a relative link
there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ferdinando Ametrano <ferdinando@ametrano.net>
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Documentation
Updated README links to point directly to the corresponding GitHub documents.
Documentation pages now resolve GitHub file links to included documents as in-page references, preserving link text and anchors. Links to files not included in the documentation remain external.
Added validation for links in the root README, allowing tree-relative paths without a ./ or ../ prefix.
The root README now uses absolute GitHub URLs for document links, and pre-commit checks its link destinations. The documentation transform converts qualifying GitHub BLOB links to included files into document cross-references. Tests cover these conversions and links that remain external.
Changes: README and documentation links
Layer / File(s)
Summary
Root README link policy .pre-commit-config.yaml, README.md
The pre-commit configuration adds a check for non-fragment, non-scheme links in the root README. Document links in the README now use absolute GitHub URLs.
GitHub BLOB link resolution docs/source/conf.py, pyproject.toml, tests/docs_conf_test.py
RootFileLinks converts BLOB references to included files into document cross-references and preserves anchors and link content. Tests cover matching relative links, links to unincluded or nonexistent files, and links outside the configured BLOB prefix. The test dependency group adds a Python-version-marked Sphinx requirement.
Reviewing files that changed from the base of the PR and between c49be59 and 995624f.
Files ignored due to path filters: 1
uv.lock is excluded by !**/*.lock
Files selected for processing: 5
.pre-commit-config.yaml
README.md
docs/source/conf.py
pyproject.toml
tests/docs_conf_test.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
non-blocking: pyproject.toml:141. The comment says the test group's sphinx copies the marker and the bound of docs's (line 178), but no test keeps the two equal. tests/pyproject_test.py already has this kind of test for an extra and its group, so a row there would close it. The finding is left to the author.
Not checked: the readme-absolute-link pattern was not run, because grep -P was not available to me. A plain search found no relative link destination left in README.md. Also not run: the suite, sphinx-build -n -W, check_included_links.py and the readme_renderer render that the body cites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The README is the package's PyPI page, and PyPI does not resolve relative links, so its 10 links to the tree's own files were dead there. They now link absolutely to
https://github.com/btclib-org/ecc/blob/main/<path>, as section 2 of the organization standard asks. Read the Docs keeps them local:RootFileLinksindocs/source/conf.pyturns aBLOBlink to an included file back into that page, as in the pilot. The hooks follow the standard:local-link-prefixexempts README.md, andreadme-absolute-linkrefuses a relative link there. The pilot was PR btclib-org/bip39-slip39#224.Evidence
sphinx-build -n -W, href grep,check_included_links.pyat 5be4b0ftests/docs_conf_test.pyreadme_renderer[md]merge-treewith currentorigin/mainexits 0The fresh review in the other client did not run. Codex answers: "ERROR: Your workspace is out of credits. Add credits to continue."
🤖 Generated with Claude Code