Repository navigation
v1.6.2
CI-recovery release. No public-API or behavioral changes; main
had been silently red on lint and mypy since v1.6.1 was tagged.
This release closes both, plus adds defenses so neither slips
again.
Lint cleanup
The CI lint step (ruff check hyplan tests) was tripping 68
violations — 39 E402 (module-level import not at top) and 29
F401 (unused import) — that had accumulated since the test
reorganization. Most were intentional patterns ruff couldn't
distinguish, addressed via per-file-ignores in pyproject.toml:
hyplan/__init__.py— public re-exports via
from .x import y(F401), with optional-dep blocks gated
behindtry/except(E402).hyplan/*/__init__.pyandhyplan/*/*/__init__.py—
sub-package re-exports (F401).hyplan/flight_plan.py— backward-compat shim that
re-exports private helpers under the old module path (F401).tests/*.py— section-grouped imports under comment
headers (E402) and optional-deptry/exceptblocks for
test-skip plumbing (F401).
Two genuine fixes alongside:
hyplan/instruments/_base.py— drop unuseduregimport.hyplan/winds/providers/gfs.py— explicit# noqa: F401
onimport cfgrib(kept for xarray-engine registration
side effect).
Type-system regression on the Python 3.10 matrix entry
The v1.6.1 type-system cleanup was validated locally on
numpy 2.4 and missed numpy 2.2's stricter generic stubs.
On the CI 3.10 matrix entry (numpy 2.2 is the last version
supporting Python 3.10; numpy 2.3+ requires 3.11+), bare
np.ndarray annotations triggered 74 [type-arg] errors
plus 9 [no-untyped-call] errors on np.ma.MaskedArray
constructor calls.
- 84 errors → 0 across 16 files (
hyplan/aircraft/_base.py,
hyplan/aircraft/adsb/{fitting,phases}.py,hyplan/geometry.py,
hyplan/glint.py,hyplan/instruments/{awp,frame_camera}.py,
hyplan/phenology/{_qa,sources}.py,
hyplan/planning/isochrone.py,hyplan/plotting.py,
hyplan/satellites.py,hyplan/swath.py,
hyplan/terrain/intersection.py,hyplan/winds/gridded.py,
hyplan/winds/providers/gmao.py). - Replaced bare
np.ndarraywithnpt.NDArray[T]annotations
with per-site dtype judgment from surrounding code:
np.float64for numeric arrays (most common),np.integer[Any]
for index / mask arrays,np.datetime64for time arrays,
Anyfor genuinely polymorphic helpers. np.ma.MaskedArrayconstructor calls switched to
np.ma.masked_array(...)factory or# type: ignore[no-untyped-call]
where the explicit class was load-bearing.hyplan/clouds/sources.py— earthengineAny-return ignores
switched to# type: ignore[no-any-return, unused-ignore]
to absorb a Python-version-dependent inference difference.
Defense in depth
Two-layer guard against the same incident pattern (red main +
release tag slipping through):
.pre-commit-config.yaml— localruff-checkhook (pinned
to ruff 0.15.12 to match CI exactly), plus standard
whitespace / yaml / toml hygiene hooks. Activate per clone
withpip install pre-commit && pre-commit install.release.ymlandpost-release.yml— both gain a lint
step /verify-lintjob before the tag-bumping side effects
run. A tag pushed against a red main now fails fast at the
workflow level instead of silently bumping bookkeeping.
Verification
mypy hyplan— Success: no issues found in 89 source files
(Python 3.10 + numpy 2.2; Python 3.11 + numpy 2.4).ruff check hyplan tests— All checks passed.pytest tests— 1697 passed, 1 skipped, 1 warning.- CI matrix (Python 3.10 / 3.11 / 3.12) green.