Keep every README link working on the package page - #87
Merged
Merged
Conversation
pyproject sets `readme = "README.md"`, so the README is also the PyPI description. PyPI renders it standalone with no base URL, so a relative path resolves against pypi.org and 404s, while GitHub resolves the same path against the repository. A relative link therefore looks correct in review and is dead on the package page. Four were relative: the three docs links I added with the API reference yesterday, and LICENSE, which predates them. The intro's ocf-pki-laundry link was already absolute, which is the trace of someone hitting this before. All four are absolute now. Nothing was broken in public: v0.1.17 predates the docs commit, so the three new links have never been published. They would have shipped with the next release. A test walks every link in the README and holds three rules: no relative paths, an absolute link into this repository must point at a file that exists, and an intra-document anchor must match a heading. Verified by reintroducing each fault in turn. The shipped sdist's PKG-INFO, which is what PyPI renders, now carries 28 links and no relative ones.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pyprojectsetsreadme = "README.md", so the README is also the package's PyPI description. PyPI renders it standalone with no base URL, so a relative path resolves against pypi.org and 404s. GitHub resolves the same path against the repository, which is why a relative link looks correct in review and is dead on the package page.Four were relative: the three
docs/links I added with the API reference in #86, andLICENSE, which predates them. The intro'socf-pki-laundrylink was already absolute, which is the trace of someone hitting this before.Nothing is broken in public.
v0.1.17ise0b4843and the #86 merge came after it, so the three new links have never been published. They would have shipped with the next release.The guard
A test walks every link in the README and holds three rules:
I checked it by reintroducing each fault in turn and watching the test fail on each.
The third rule matters for the README split discussed separately: the one intra-document link here points at Part 2, and moving that section would break it silently, since GitHub renders the page and simply does not scroll.
Validation
797 tests pass on Python 3.11, 3.12, 3.13 and 3.14, and on the dependency floor. The shipped sdist's
PKG-INFO, which is the text PyPI renders, carries 28 markdown links and no relative ones.