Skip to content

🔧 Modernize packaging, tooling and CI#21

Merged
chrisjsewell merged 1 commit into
mainfrom
claude/sphinx-subfigure-modernize-f3lt4q
Jul 12, 2026
Merged

🔧 Modernize packaging, tooling and CI#21
chrisjsewell merged 1 commit into
mainfrom
claude/sphinx-subfigure-modernize-f3lt4q

Conversation

@chrisjsewell

@chrisjsewell chrisjsewell commented Jul 12, 2026

Copy link
Copy Markdown
Member

All CI jobs are currently failing: Python 3.7–3.9 are no longer available on ubuntu-latest runners (the jobs die at "Set up Python"), and the one job that does run (py3.10) fails in pytest against modern Sphinx/docutils. This PR brings the project's tooling in line with MyST-Parser's current setup and makes CI green again.

Packaging

  • Require Python >=3.11 and sphinx>=8,<10; update classifiers accordingly
  • Fix the Homepage URL (repo moved to sphinx-extensions2) and add a Documentation URL
  • flit_core >=3.4 and sdist excludes for docs//tests/
  • Drop the docutils <0.18 findall/traverse compatibility shim (_compat.py) — no longer reachable with the new support floor

Lint / format

CI

  • New pre-commit job
  • Test matrix: py3.11–3.14 × sphinx >=8,<9 / >=9,<10, plus two Windows jobs
  • actions/checkout@v6 / setup-python@v6 (were v2/v1)
  • New PyPI publish job on v* tags using trusted publishing⚠️ requires adding a trusted publisher for this repo/workflow (environment pypi) in the PyPI project settings before the next release
  • Dropped the Codecov upload for now (needs a CODECOV_TOKEN with current codecov-action versions); coverage still reports in the job log

Tests (the py3.10 pytest failures)

  • The LaTeX build tests hardcoded python.tex, but Sphinx ≥7.2 renamed the default project (projectnamenotset.tex) — now globs for the .tex file
  • Doctree fixtures asserted is_subfigure="True", but docutils 0.22 serializes bool attributes as "1" (0.21 as "True"), so no single fixture could pass the whole matrix — the attribute is now the string "true", which serializes identically on all versions
  • ✅ All 15 tests pass locally on both sphinx 8.2.3 / docutils 0.21.2 and sphinx 9.0.4 / docutils 0.22.4

tox / Read the Docs

  • tox: py{311,312,313,314}-sphinx{8,9} and docs-{update,clean} environments
  • RTD: ubuntu-24.04 / Python 3.12, and the now-mandatory sphinx.configuration key (docs build verified warning-free locally with -nW on Sphinx 9 + latest myst-parser/furo)

Also updates AGENTS.md to match (removed _compat.py, ruff, new tox env names).

Deliberately not included, to leave the contributor PRs intact: the debug print() removal (#19) and the parallel read/write declaration (#16) — both still apply cleanly on top of this.

All CI jobs were failing: Python 3.7-3.9 are no longer available on
ubuntu-latest runners, and the tests that did run failed against modern
Sphinx/docutils.

- Packaging: require Python >=3.11 and sphinx>=8,<10; update classifiers,
  project URLs (repo moved to sphinx-extensions2) and flit sdist excludes
- Drop the docutils<0.18 findall/traverse compatibility shim
- Lint: replace black/isort/flake8/pyupgrade with ruff-check + ruff-format
- CI: add a pre-commit job; test matrix of py3.11-3.14 x sphinx 8/9 (plus
  Windows); add a PyPI trusted-publishing job on version tags
- tox: py{311-314}-sphinx{8,9} and docs-{update,clean} environments
- Read the Docs: ubuntu-24.04/py3.12 and the now-required configuration key
- Tests: make the .tex output filename version-agnostic (Sphinx >=7.2
  renamed the default project); serialize the is_subfigure attribute as a
  string so doctree fixtures are stable across docutils 0.21/0.22

All 15 tests pass against both sphinx 8.2/docutils 0.21 and
sphinx 9.0/docutils 0.22, and the docs build warning-free on Sphinx 9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQYXtJrMEhZWpJVvBcx7ff
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