Skip to content

chore: adopt ty and the modern-python self-hosted CI convention#15

Merged
lesnik512 merged 7 commits into
mainfrom
chore/ty-and-ci-convention
Jul 2, 2026
Merged

chore: adopt ty and the modern-python self-hosted CI convention#15
lesnik512 merged 7 commits into
mainfrom
chore/ty-and-ci-convention

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Aligns fast-version's tooling with the modern-python org convention (as realized in the canonical sibling modern-di-fastapi):

  1. Type checker: mypy → ty. Drops [tool.mypy]; lint group is now ty, ruff, eof-fixer, typing-extensions. The four # type: ignore[...] sites are converted to their ty codes (invalid-argument-type, invalid-assignment, invalid-type-form ×2). ty runs on defaults; it stays unpinned since uv.lock is git-ignored and just install runs uv lock --upgrade.
  2. CI: community-workflow reusable preset → self-hosted workflow set. Replaces the single workflow.yml with ci.yml_checks.yml (lint + pytest matrix 3.10–3.14), tag-driven release.yml on OIDC Trusted Publishing (no PYPI_TOKEN, also cuts a GitHub Release), and scheduled.yml (weekly dep-drift check that opens a tracking issue) + .github/scripts/report-scheduled-failure.sh.
  3. Peripheral tooling. Justfile convention recipes (lint/lint-ci/test-ci/test-branch/OIDC publish), ruff fix=false/unsafe-fixes=true + docstring-code-format, coverage moved out of addopts into test-ci with --cov-fail-under=100, [tool.coverage.report], and the uv_build>=0.11,<1.0 floor.
  4. Docs. CLAUDE.md updated to describe ty + the self-hosted CI.

Operations prerequisite (required before the first tag)

release.yml publishes via OIDC, so before cutting the first tag after this merges, configure a PyPI Trusted Publisher for the fast-version project: environment pypi, workflow release.yml, repository community-of-python/fast-version. Without it, a tag push fails at just publish. Because publish runs before the GitHub Release step, a failed publish will not create a Release for an unpublished version.

Verification

  • just lint-ci — eof-fixer, ruff format/check, ty check, and the planning index check all pass.
  • just test-ci — 20 passed, 100% coverage (--cov-fail-under=100 holds).

Out of scope (design Non-goals)

pyproject [project.urls]/classifiers/keywords ("Repository metadata" convention) and the dead packages=[...] key are intentionally untouched — separate follow-up.

Planning bundle: planning/changes/2026-07-02.02-ty-and-ci-convention/.

lesnik512 added 7 commits July 2, 2026 12:24
Drop the stale MyPy Strict badge (project now type-checks with ty, which
has no badge in the convention) and replace the Codecov badge with the
static coverage-100% badge linking to ci.yml, matching modern-di-fastapi
(the self-hosted CI enforces --cov-fail-under=100 with no codecov upload).
@lesnik512 lesnik512 merged commit 57ae589 into main Jul 2, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/ty-and-ci-convention branch July 2, 2026 09:52
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