Skip to content

Fix README links for PyPI rendering#191

Merged
wyli merged 1 commit into
mainfrom
fix-pypi-readme-links
Jun 16, 2026
Merged

Fix README links for PyPI rendering#191
wyli merged 1 commit into
mainfrom
fix-pypi-readme-links

Conversation

@wyli

@wyli wyli commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace repo-relative README links with absolute GitHub URLs so PyPI long descriptions do not render broken links
  • add a package metadata test that rejects relative README links in future releases

Testing

  • python -m pytest -q -o addopts='' tests/unit/test_package_data.py
  • python -m ruff check tests/unit/test_package_data.py
  • python -m black --check tests/unit/test_package_data.py
  • python -m pytest -q -o addopts='' tests/unit
  • git diff --check

AI-assisted: Created with Codex/GPT at the user's request.

Summary by CodeRabbit

  • Documentation

    • Updated GitHub links in the Contributing section to use main-branch absolute references instead of relative paths, improving documentation stability across distribution formats.
  • Tests

    • Added validation to ensure all links in the packaged README are compatible with PyPI rendering and contain no invalid relative link references.

Use absolute GitHub URLs for repo-local README links so PyPI long descriptions do not render broken relative links. Add a metadata test to prevent future relative README links from being shipped.

Co-authored-by: Codex <noreply@openai.com>
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@wyli wyli requested a review from jcfr June 15, 2026 16:46
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The head commit changed during the review from 63e236b to 5ed9285.

Walkthrough

The Contributing section of README.md replaces relative file links with absolute GitHub main-branch URLs for CONTRIBUTING.md and .github/CI.md. A new test in tests/unit/test_package_data.py scans all Markdown link targets in README.md and fails if any relative (non-anchor, non-URL, non-mailto) links are found.

Changes

README PyPI Link Fix and Enforcement

Layer / File(s) Summary
README Contributing section: relative → absolute links
README.md
Replaces relative Markdown paths for CONTRIBUTING.md and .github/CI.md with absolute GitHub main-branch URLs in the Contributing section.
PyPI link validation test
tests/unit/test_package_data.py
Adds re import, a README Path constant, a _readme() helper (skips if file is absent), and test_readme_links_are_valid_for_pypi_rendering which fails if any relative Markdown link targets are detected in README.md.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely summarizes the main change: fixing README links for PyPI rendering.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@jcfr jcfr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nitpick: Tagged release would reference files from main which may not always be desired.

@wyli wyli force-pushed the fix-pypi-readme-links branch from 63e236b to 5ed9285 Compare June 16, 2026 07:34
@wyli wyli merged commit 7b5dea8 into main Jun 16, 2026
44 checks passed
@wyli wyli deleted the fix-pypi-readme-links branch June 16, 2026 07:34
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.

2 participants