Skip to content

docs(readme): link absolutely for the registries - #41

Merged
michen00 merged 3 commits into
mainfrom
docs/absolute-links-for-registries
Sep 9, 2026
Merged

docs(readme): link absolutely for the registries#41
michen00 merged 3 commits into
mainfrom
docs/absolute-links-for-registries

Conversation

@michen00

@michen00 michen00 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

What changes, and why

Both manifests set readme = 'README.md', so this file is the project description on PyPI and on crates.io. PyPI's renderer passes a relative href through without rewriting it, so every relative link in the README resolves against https://pypi.org/project/markdown-prose-hooks/ rather than against the repository.

Checked against the published description rather than inferred from the source:

$ curl -sS https://pypi.org/pypi/markdown-prose-hooks/json | ...
  description_content_type: text/markdown
  relative link targets left in the description: 10
    #a-run-of-paragraphs-by-comment-pair
    #one-paragraph-by-comment
    CONTRIBUTING.md
    LICENSE
    SECURITY.md
    corpus/README.md
    docs/benchmarks.ipynb
    docs/rust-port-design.md

Eight file targets, live on the 0.4.0 page: the whole Documentation list, both badge targets (PRs-welcome and License), and the benchmark link in the opening section. A consumer arriving from pip install follows each of them to a 404.

The eight are now absolute blob/main/ URLs — the form crates.io already generates for them, and the form GitHub renders unchanged — so one file serves all three surfaces. The two in-page anchors stay relative, because they resolve inside whichever page renders them.

The trade-off, stated: a link followed from an older release's PyPI page now shows current main rather than the tree that release shipped. That is the better of the two failures — a stale-but-present page against a 404 — and it is what the mirror readmes already do (mirrors/py/README.md:7 links upstream absolutely for the same reason).

This is worth landing before the next release, since the next publish is what refreshes the description.

Corpus

The corpus is the specification, and both implementations answer to it. Tick what applies.

  • This changes no behavior the corpus specifies.
  • This changes what gets joined, and a case in corpus/ pins the new behavior. The case was written first and failed first.
  • The change makes the tool join more than it did. The section above says what it will not eat.

Checks

  • make check passes, or make test does and this touches no Rust.

make tidy — markdownlint, prettier and both spell gates — plus unwrap-markdown-prose-py --fail-on-change README.md. One Markdown file; no relative file target remains.

`readme = 'README.md'` in both manifests makes this file the project
description on PyPI and on crates.io, and PyPI passes a relative href
through without rewriting it. So every relative link in this file
resolved against the project page there rather than against the
repository, and the live 0.4.0 description carries eight of them: the
whole Documentation list, both badge targets, and the benchmark link in
the opening section. A consumer arriving from `pip install` followed
each of them to a page that does not exist.

The eight are now absolute, which is the form crates.io already
generates for them and which GitHub renders unchanged, so one file
serves all three surfaces. The two in-page anchors stay relative
because they resolve inside whichever page is rendering them.

The cost is that a link followed from an older release's page shows the
current `main` rather than the tree that release shipped. That is the
better failure: a stale-but-present page against a 404, and the mirror
readmes already link upstream this way for the same reason.

Found by checking the published description rather than the source:
the PyPI JSON for 0.4.0 lists all eight targets with
`description_content_type: text/markdown`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Use absolute README links across package registries

🐞 Bug fix 📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Converts eight README file links to absolute GitHub URLs for registry compatibility.
• Ensures documentation resolves consistently on GitHub, PyPI, and crates.io.
Diagram

graph TD
  PY["pyproject.toml"] --> R["README.md"] --> P["PyPI Page"] --> G["GitHub Files"]
  C["Cargo.toml"] --> R --> X["crates.io Page"] --> G
  R --> H["GitHub README"] --> G
Loading
High-Level Assessment

Using absolute GitHub URLs is the simplest reliable approach for one README rendered by GitHub, PyPI, and crates.io. Release-pinned links would require updating every URL per release, while a generated registry-specific README would introduce unnecessary duplication and publishing complexity; linking to current main is preferable to leaving historical registry pages with 404s.

Files changed (1) +8 / -8

Other (1) +8 / -8
README.mdReplace registry-breaking relative file links +8/-8

Replace registry-breaking relative file links

• Replaces eight relative badge and documentation link occurrences with absolute GitHub blob URLs. The links now resolve from package registry descriptions while remaining valid on GitHub; in-page anchors remain relative.

README.md

@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.40%. Comparing base (37f80e1) to head (989363c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   87.40%   87.40%           
=======================================
  Files           3        3           
  Lines         691      691           
=======================================
  Hits          604      604           
  Misses         87       87           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The readme tells a consumer to move their `rev:` pin to follow a newer
release, and no document said where to read what changed between the
version they hold and the one they are moving to. The releases page is
the only record -- generated from the merged pull requests, since
nothing here writes a changelog -- and it was named nowhere: not in this
file, not in SECURITY.md, CONTRIBUTING.md or either mirror readme.

So the Documentation list gains it, beside the four documents that were
already there. It belongs at the top of that list rather than the
bottom, because moving a pin is the most common thing a consumer of this
repository does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI 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.

🟢 Approval recommended

The change is limited to README link targets and cleanly resolves registry rendering issues without affecting tool behavior.

Pull request overview

This PR updates the repository README (which is used as the project description on PyPI and crates.io) to avoid broken navigation from those registries by converting file-relative links into absolute GitHub blob/main/ URLs.

Changes:

  • Replace README links to repository files (e.g., CONTRIBUTING, LICENSE, SECURITY, docs) with absolute GitHub URLs so they resolve correctly on PyPI/crates.io.
  • Add a “Releases” entry to the Documentation section to provide a stable, registry-friendly changelog pointer.
File summaries
File Description
README.md Converts relative file links to absolute GitHub URLs so the README renders with working links on PyPI and crates.io.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@michen00
michen00 merged commit 61821db into main Sep 9, 2026
26 checks passed
@michen00
michen00 deleted the docs/absolute-links-for-registries branch September 9, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants