Skip to content

chore: repo refresh (2026-10) - #275

Merged
tlambert03 merged 7 commits into
pymmcore-plus:mainfrom
tlambert03:refresh/2026-10-07
Oct 7, 2026
Merged

tlambert03 merged 7 commits into
pymmcore-plus:mainfrom
tlambert03:refresh/2026-10-07

Conversation

@tlambert03

@tlambert03 tlambert03 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Routine tooling refresh. One commit per step, so they can be reviewed, reverted or cherry-picked independently.

ci: autoupdate pre-commit hooks

  • validate-pyproject v0.25 → 0.26 (upstream dropped the v prefix)
  • ruff-pre-commit v0.15.4 → v0.16.10
  • mirrors-mypy v1.19.1 → v2.4.0

style: fix lint errors from hook updates

  • ruff 0.16 now formats Python code blocks inside Markdown, so README.md and docs/v2-migration.md are reformatted (quote style, blank lines, line wrapping). This is the same diff as ci(pre-commit.ci): autoupdate #271. In one place a trailing comment forced v2.ZRangeAround(range=4, step=1.0) onto three lines, so I moved that comment above the line.
  • mypy 2.4: the # type: ignore[no-any-return] in _point_visiting._distance_matrix is unused with recent numpy stubs but still needed with older ones. The mypy hook env resolves a different numpy under prek than under pre-commit-uv. I changed it to [no-any-return, unused-ignore] so it passes either way.

ci: bump GitHub Actions

  • actions/checkout v6 → v7. v7 refuses to check out fork PRs under pull_request_target/workflow_run, which this repo doesn't use.
  • pyvista/setup-headless-display-action v4 → v5. The new Wayland/weston option is opt-in and Linux-only, and the job runs on macOS; the qt input is unchanged.
  • softprops/action-gh-release v2 → v3. The runtime moves to Node 24; the inputs used here are unchanged.
  • astral-sh/setup-uv v7 → v10.2.0, as a commit-SHA pin with a # v10.2.0 comment, in its own commit. setup-uv stopped publishing floating major tags after v7. None of the v8–v10 breaking changes affect this repo: the old manifest-file format isn't used, prune-cache now defaults to false, and enable-cache: auto now disables caching on pull_request_target/workflow_run/release, but the workflows here set enable-cache: true and don't use those events.

chore: drop Python 3.10, add 3.15

  • requires-python = ">=3.11", 3.10 classifier removed, 3.15 classifier added, ruff target-version = "py311".
  • CI main list ["3.10", "3.12", "3.14"] → ["3.11", "3.12", "3.14"] (min/middle/max on all three OSes). I kept 3.12 as the middle because the include rows already cover 3.13. The lowest-direct ubuntu row moves from 3.10 to 3.11.
  • New ubuntu-latest / "3.15" row. setup-uv resolves the pre-release without a flag, and numpy, pydantic-core and shapely already publish cp315 wheels.
  • No dependency markers became always-true at 3.11, because all existing markers are >= 3.12.

refactor: modernize syntax for Python >= 3.11

Ruff UP fixes for the py311 target:

  • Self and Required are now imported from typing (UP035).
  • Axis(str, Enum) → Axis(StrEnum) (UP042). Axis already defines __str__ returning .value, so str(), f-strings and repr() give the same output.
  • typing_extensions remains a dependency because deprecated and TypedDict still come from it.

The test suite passes locally on 3.11 (378 passed, 2 xfailed).

Decisions

  • Dropped 3.10: it reached EOL on 2026-10-01, per peps.python.org release-cycle data.
  • Added 3.15 (RC phase, final release planned for this month): classifier added, and it runs in one CI row on ubuntu.

Superseded PRs

Closes #273
Closes #271

Branch protection

Updated the classic branch protection on main (required status checks; strict: true and app IDs unchanged), because the matrix change renames two required jobs:

  • macos-latest py3.10 → macos-latest py3.11
  • ubuntu-latest py3.10 lowest-direct → ubuntu-latest py3.11 lowest-direct

pre-commit.ci - pr, windows-latest py3.12 and ubuntu-latest py3.14 are unchanged.

Needs attention

  • Pyright (manual hook stage) reported 6 errors that already existed on main. They are fixed in fix: resolve pyright errors in useq.v2, which adds 5 # pyright: ignore[reportIncompatibleVariableOverride] comments on frozen axis_key: Literal[...] overrides and replaces one hasattr check with getattr(val, "z", val).

🤖 Generated with Claude Code

tlambert03 and others added 5 commits October 7, 2026 12:05
- validate-pyproject: v0.25 -> 0.26
- ruff-pre-commit: v0.15.4 -> v0.16.10
- mirrors-mypy: v1.19.1 -> v2.4.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ruff 0.16 now formats Python code blocks in Markdown (README.md,
  docs/v2-migration.md). Moved one trailing comment above its line so the
  formatter doesn't split a short call over three lines.
- mypy 2.4: the `no-any-return` ignore in _point_visiting.py is unused with
  recent numpy stubs but still needed with older ones (depends on what the hook
  env resolves), so add `unused-ignore` to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- actions/checkout: v6 -> v7 (ci.yml, docs.yml)
- pyvista/setup-headless-display-action: v4 -> v5
- softprops/action-gh-release: v2 -> v3 (Node 24 runtime)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Python 3.10 reached end-of-life on 2026-10-01: requires-python >=3.11,
  classifier removed, ruff target-version py311.
- CI main matrix [3.10, 3.12, 3.14] -> [3.11, 3.12, 3.14] (min/middle/max
  across all OSes; 3.12 kept as middle, 3.13 is still covered by include rows).
  lowest-direct row on ubuntu moves from 3.10 to 3.11.
- Python 3.15 is in its RC phase (final planned within 30 days): add one
  ubuntu-latest row with a plain "3.15" (setup-uv resolves the pre-release
  without a flag; numpy, pydantic-core and shapely already publish cp315
  wheels) and the 3.15 classifier.
- No dependency environment markers became always-true/false at 3.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ruff (UP rules, target py311):
- import Self / Required from typing instead of typing_extensions (UP035)
- Axis(str, Enum) -> Axis(StrEnum) (UP042). Axis already overrides __str__
  to return the value, so str()/format()/repr() are unchanged.

typing_extensions remains a dependency (deprecated, TypedDict).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.62%. Comparing base (942a551) to head (c2d2c82).

Files with missing lines Patch % Lines
src/useq/v2/_transformers.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   93.62%   93.62%   -0.01%     
==========================================
  Files          33       33              
  Lines        2590     2589       -1     
==========================================
- Hits         2425     2424       -1     
  Misses        165      165              

☔ 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.

tlambert03 and others added 2 commits October 7, 2026 13:17
- axis_key: subclasses narrow the base `str` field to `Literal[Axis.X]`.
  Pyright rejects narrowing a mutable attribute, but these fields are
  frozen, so ignore reportIncompatibleVariableOverride on those lines.
- AutoFocusTransform: use `getattr(val, "z", val)` instead of a
  hasattr/attribute access that pyright can't narrow on `float`
  (same runtime behavior).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-uv no longer publishes floating major tags (since v8), so pin the
v10.2.0 commit SHA with a version comment. Breaking changes don't affect
this repo: custom manifest-file format (unused), prune-cache default now
false (v9), and enable-cache: auto disabled for pull_request_target /
workflow_run / release (v10; we set enable-cache: true and don't use those).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tlambert03
tlambert03 merged commit 96299a2 into pymmcore-plus:main Oct 7, 2026
22 checks passed
@tlambert03
tlambert03 deleted the refresh/2026-10-07 branch October 7, 2026 11:26
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