Skip to content

Fix Sphinx roles in README that fail twine check (and gate it in PR CI)#78

Merged
banesullivan merged 2 commits into
mainfrom
fix-readme-rst-roles
May 8, 2026
Merged

Fix Sphinx roles in README that fail twine check (and gate it in PR CI)#78
banesullivan merged 2 commits into
mainfrom
fix-readme-rst-roles

Conversation

@banesullivan

Copy link
Copy Markdown
Member

The v0.4.0 release failed at the PyPI publish step because the README I added in #77 used Sphinx interpreted-text roles (:class:\pyvista.PolyData`, :class:`pyacvd.Clustering`) which twine check` rejects. Failure: https://github.com/pyvista/pyacvd/actions/runs/25574339938/job/75079011573

PyPI's RST renderer is plain docutils and doesn't know about Sphinx roles, so the long_description fails markup validation and the upload aborts. My mistake.

Fix

Replace the two :class:\...`references with plain``...``` literals. The accessor docstrings still use proper Sphinx roles since they're rendered by the API docs build, not by PyPI.

Prevent recurrence

Add twine check --strict dist/*.tar.gz to the build_sdist job in .github/workflows/build-and-deploy.yml so every PR exercises the same check the release job runs. --strict treats warnings as errors. The release path itself was already guarded; the gap was that PRs never built the sdist's metadata in a way that surfaced the failure before tagging.

Verification

Built the sdist locally and ran twine check --strict against it: passes. After this PR merges, the v0.4.0 release will need to be retagged (e.g. v0.4.1) so the publish step runs against the corrected sdist.

@banesullivan banesullivan enabled auto-merge (squash) May 8, 2026 19:28
@banesullivan banesullivan merged commit 630e40e into main May 8, 2026
12 checks passed
@banesullivan banesullivan deleted the fix-readme-rst-roles branch May 8, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant