Skip to content

Update boilerplate, add Python 3.15, adopt the dead-code hook - #90

Open
hmgaudecker wants to merge 4 commits into
mainfrom
boilerplate-update-py315
Open

hmgaudecker wants to merge 4 commits into
mainfrom
boilerplate-update-py315

Conversation

@hmgaudecker

Copy link
Copy Markdown
Member

What

Boilerplate, Python 3.15, ty as a hook (first commit)

  • Python 3.15: py315 pixi environment, CI matrix entry, classifier, requires-python upper bound, max_supported_python. pixi.lock regenerated (lock format v7).
  • ty runs as the ty-pre-commit hook (ty==0.0.104) against the py314 pixi environment. The type-checking environment and ty task are removed; CI's run-ty job runs prek run ty.
  • Refreshed hook and action versions: pyproject-fmt, check-jsonschema, ruff, checkout, setup-pixi, pixi, codecov, setup-python. pixi run --locked in CI.
  • Template hooks added: codespell, pixi-lock-check (pre-push), pre-push-hooks-installed, notebook-cell-source-format, no-hardcoded-user-paths, no-section-separator-comments, no-internal-references.
  • CLAUDE.md and GEMINI.md removed; AGENTS.md is the only instruction file.
  • Fixes required by the new versions:
    • tuple[T, *Unpack[...]] unpacked a TypeVarTuple twice; it's now *MixedTupleType.
    • ty rule renames in ignore comments, plus one unused ignore removed.
    • RUF036 union order.
    • A README typo.
    • Notebook sources stored as line arrays.

Dead-code hook (second commit)

  • Adopts the vulture-based dead-code hook from .ai-instructions, with [tool.dead-code] public = ["src/dags/"], a ci.skip entry, and a run-ty step with the submodule checked out. .ai-instructions is excluded from ty, since the hook script imports vulture from its own environment.
  • Its first run reported _is_python_identifier in tree/tree_utils.py as used only by tests. Nothing in dags or the gettsim workspace calls it, so it is removed along with its test.

Supersedes #84, #87 and #89.

Checks

  • prek run --all-files: exit 0.
  • Tests: 172 passed on py311, py314 and py315 (194 before, minus the 22 cases of the removed function's test).

hmgaudecker and others added 2 commits November 16, 2026 12:08
- Python 3.15: py315 environment, CI matrix entry, classifier, requires-python
  bound, max_supported_python; pixi.lock regenerated (lock format v7).
- ty runs as the ty-pre-commit hook against the py314 pixi env; the
  type-checking environment and ty task are gone.
- Hook and action versions refreshed; template hooks added (codespell,
  pixi-lock-check, pre-push-hooks-installed, notebook-cell-source-format,
  no-hardcoded-user-paths, no-section-separator-comments,
  no-internal-references).
- CLAUDE.md and GEMINI.md removed; AGENTS.md is the only instruction file.
- .ai-instructions bumped, and excluded from ty.
- Fixes the new hook versions demanded: a doubly unpacked TypeVarTuple in
  output.py, renamed ty rules, RUF036 union order, a README typo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the vulture-based dead-code hook from .ai-instructions, its
[tool.dead-code] table (src/dags/ as public API), its ci.skip entry and a
run-ty CI step with the submodule checked out.

Its first run reported _is_python_identifier in tree_utils.py as used only by
tests. Nothing in dags or the gettsim workspace calls it, so it goes, with its
regex constant and its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.54%. Comparing base (b82a152) to head (8c680cc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
- Coverage   96.56%   96.54%   -0.02%     
==========================================
  Files          27       27              
  Lines        1398     1391       -7     
==========================================
- Hits         1350     1343       -7     
  Misses         48       48              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

hmgaudecker and others added 2 commits November 16, 2026 13:09
The lock held prek 0.3.4, whose bundled uv 0.10.2 cannot parse
ty-pre-commit's pyproject.toml (dependency tables with hashes), so the
run-ty job failed while installing the hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build fetches the newest MyST book theme, which no longer supports
mystmd 1.8.2; the old engine reports the mismatch and then hangs, so Read the
Docs kills the build.

Co-Authored-By: Claude Opus 5.5 <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.

1 participant