Skip to content

chore: PyPI page polish — absolutize README links, harden codecov, add CITATION.cff#9

Merged
random-walks merged 1 commit into
mainfrom
docs/pypi-page-audit
Apr 27, 2026
Merged

chore: PyPI page polish — absolutize README links, harden codecov, add CITATION.cff#9
random-walks merged 1 commit into
mainfrom
docs/pypi-page-audit

Conversation

@random-walks

Copy link
Copy Markdown
Owner

Summary

  • README: absolutize 2 image srcs + ~30 relative links so the page renders correctly on PyPI (PyPI doesn't rewrite relative paths — the cover image was 404ing and every benchmarks/, docs/, examples/, PREPRINT.md link was a dead click).
  • codecov: CODECOV_TOKEN is now in repo secrets; CI passes it through, bumps codecov-action v4 → v5, and stops swallowing failures (continue-on-error removed, fail_ci_if_error: true). Badge should flip from "unknown" to a percentage on first push.
  • CITATION.cff (new): schema 1.2.0, validates with cffconvert. Enables GitHub's "Cite this repository" widget for an academic-shaped project that ships a PREPRINT.
  • bump skill: extended to also stamp version + date-released into CITATION.cff so the three release-touched files (_version.py, CHANGELOG.md, CITATION.cff) stay in lockstep — no drift via the slash-command path.

The README content fix ships to PyPI on the next release (v0.3.1 via /release patch). Until then, https://pypi.org/project/citeformer/ still shows the broken v0.3.0 page.

Routing rule for absolutized links

  • Code / scripts / tests / notebooks / dotfile-dirs → github.com/random-walks/citeformer/blob/main/... (or /tree/main/... for directories)
  • Doc content already mirrored on RTD (architecture.md, contracts.md, ADR-*) → citeformer.readthedocs.io/en/stable/... with anchors verified against rendered HTML
  • Repo-only markdown (PREPRINT.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE, benchmarks/README.md) → github blob URLs
  • In-document anchors (#backends, #examples) → left alone

Invariant touched?

No. None of the three §10 contracts are affected — this is README copy + CI config + a new metadata file + an unrelated slash-command extension.

Test plan

  • uv run python -m twine check dist/* — passes on sdist and wheel (validates README markdown for PyPI's readme_renderer)
  • cffconvert --validate -i CITATION.cff — valid schema 1.2.0
  • Cover image at new raw URL → 200 image/png
  • Sample github blob URL → 200
  • RTD contracts.html anchors (citation-marker-grammar, source-metadata-shape, output-schemas) — confirmed present in rendered HTML
  • No relative links remain in README (verified via grep — only #backends and #examples anchors)
  • CI run after merge: codecov badge flips from "unknown" to percentage, or fails loudly with a real error
  • After /release patch → v0.3.1 ships; visit https://pypi.org/project/citeformer/ to confirm cover image renders and a couple of links resolve

🤖 Generated with Claude Code

…d CITATION.cff

Three bundled fixes that together make the PyPI project page render
correctly and surface coverage data:

- README.md: absolutize 2 image srcs (raw.githubusercontent) and ~30
  relative links. PyPI does not rewrite relative paths, so the cover
  image was 404ing and every relative link (benchmarks/, docs/,
  examples/, PREPRINT.md, etc.) was a dead click on PyPI. Routing rule:
  code/scripts/tests → github blob, RTD-mirrored docs (architecture,
  contracts, ADRs) → readthedocs.io, repo-only md (PREPRINT, CHANGELOG,
  CONTRIBUTING, benchmarks/README) → github blob. Anchors verified
  against rendered RTD HTML.

- .github/workflows/ci.yml: codecov-action v4 → v5 (codecov's current
  recommendation), require CODECOV_TOKEN, drop continue-on-error +
  fail_ci_if_error=true so silent upload failures become visible. Token
  added to repo secrets out-of-band.

- CITATION.cff (new): schema 1.2.0, validated with cffconvert. Enables
  GitHub's "Cite this repository" widget and BibTeX export — fitting
  for an academic-shaped library that ships a PREPRINT.

- .claude/commands/bump.md: extend the bump ceremony to keep
  CITATION.cff version + date-released in sync with _version.py +
  CHANGELOG, preventing version drift across the three release-stamped
  files.

Verified locally: `twine check dist/*` passes both sdist and wheel,
`cffconvert --validate` passes CITATION.cff, spot-checked cover image
URL (200 image/png) and one each of github blob + RTD links (200, with
correct anchors).

The README change ships to PyPI on the next release upload (v0.3.1).

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

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@random-walks random-walks merged commit d5b5c0e into main Apr 27, 2026
7 checks passed
@random-walks random-walks mentioned this pull request Apr 27, 2026
8 tasks
random-walks added a commit that referenced this pull request Apr 27, 2026
The /bump skill was extended to keep CITATION.cff version + date-released
in lockstep with _version.py + CHANGELOG.md (see #9). The /release skill's
step 2 + step 3 still listed only the original two files, which would have
caused the next /release run to commit a partial bump (CITATION.cff dirty
in the working tree, not in the release commit). Sync the skill text with
the new bump ceremony.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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