Skip to content

Modernize packaging, tooling, and tests - #12

Merged
cssho merged 2 commits into
masterfrom
modernize
Oct 26, 2026
Merged

cssho merged 2 commits into
masterfrom
modernize

Conversation

@cssho

@cssho cssho commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

No user-visible behavior changes; the behavior-changing fixes come in a separate PR.

  • Packaging: setup.py + requirements.txt → PEP 621 pyproject.toml
    • version derived from git tags (setuptools-scm) — releases no longer need a version bump commit
    • README is now the PyPI long description (the PyPI page currently has none)
    • requires-python >=3.10, Markdown>=3.2 (3.0/3.1 can't import on modern Python: they need pkg_resources)
    • uv.lock + dev dependency group (pytest, ruff)
  • Tooling: flake8 → ruff (lint with E,F,W,I,UP,B + format); CI and publish use astral-sh/setup-uv; Dependabot pip → uv; Claude hook now runs ruff format + check
  • Code: drop py2-isms (from __future__, super(Cls, self), .format), add type hints, fix syombol typo in the config description
  • Tests: test.py → tests/test_condition.py (parametrized pytest, same cases), plus a test that the extension loads by name ("md_condition", the MkDocs path); CI adds a lowest-Markdown job (3.2 on py3.10)
  • CLAUDE.md and /release updated

ci-ok still aggregates everything, so the ruleset needs no change.

Test plan

  • Local: uv run pytest 7 passed (latest Markdown and Markdown 3.2 on py3.10), ruff check / ruff format --check clean, uv build produces sdist + wheel
  • Claude hook pipe-tested (clean → 0, lint error → 2 with feedback, non-.py → skipped)
  • CI green on this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_012pKTVb5TrGn27R29rHHNck

cssho and others added 2 commits October 26, 2026 21:20
- Packaging: setup.py/requirements.txt -> PEP 621 pyproject.toml;
  version from git tags via setuptools-scm; README as PyPI long
  description; requires-python >=3.10, Markdown >=3.2; uv.lock
- Tooling: flake8 -> ruff (lint + format) in CI and the Claude hook;
  CI and publish use astral-sh/setup-uv; dependabot pip -> uv
- Code: drop py2-isms, add type hints, fix "syombol" typo (no
  behavior change)
- Tests: test.py -> tests/ with parametrized pytest; CI also tests
  the lowest supported Markdown (3.2 on Python 3.10)
- Update CLAUDE.md and /release skill (no version bump step)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pKTVb5TrGn27R29rHHNck
@cssho
cssho merged commit 8233449 into master Oct 26, 2026
8 checks passed
@cssho
cssho deleted the modernize branch October 26, 2026 12:30
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.

1 participant