Skip to content

Revival baseline: restore CI, enforce coverage gate, fix packaging and stale docs - #29

Open
the-lay wants to merge 4 commits into
masterfrom
modernize
Open

Revival baseline: restore CI, enforce coverage gate, fix packaging and stale docs#29
the-lay wants to merge 4 commits into
masterfrom
modernize

Conversation

@the-lay

@the-lay the-lay commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What & why

First maintenance pass in 14 months. This PR restores the feedback loop and fixes everything small-and-broken, ahead of the multiclass Merger work (coming as a separate PR). No behavior changes for valid inputs.

CI (the headline)

This repo currently has zero workflow run records — the README badge literally renders "no status", and there has been no proof the package works on any Python or NumPy version. This PR:

  • adds workflow_dispatch so CI can be triggered without a push
  • extends the matrix to 3.9–3.14 (3.14 was never tested) plus two NumPy axes: the declared numpy>=1.20 floor and newest 1.x, alongside default 2.x — first CI proof of NumPy 2 compatibility (locally verified: 40/40 tests pass on numpy 2.5.1)
  • activates the dormant coverage gate: fail_under = 95 was configured but coverage report was never invoked; actual coverage is 99%, so the gate turns on green
  • installs editable in CI so coverage paths map back to the src/ layout (Coveralls has been getting unmappable paths since the 2025 migration)
  • release publishing now requires tests to pass first (previously a GitHub release published to PyPI without running a single test)
  • actions bumped to current majors and SHA-pinned, with Dependabot keeping pins fresh; pre-commit hooks bumped (ruff v0.11.12→v0.16.1)

Packaging

  • PEP 639 SPDX license (license = "MIT" + license-files, setuptools>=77) — replacing the deprecated table before it breaks a release build
  • numpy>=1.20 floor — the constraint numpy.typing has imposed since 2021; its absence is exactly what made a user fork the project ([BUG] Incompatible Python and NumPy Versioning #22)
  • per-version classifiers 3.9–3.14

Fixes

  • tiler.__version__ now exists (CONTRIBUTING's first instruction to bug reporters — python -c "import tiler; print(tiler.__version__)" — used to raise AttributeError)
  • channel_dimension=0 bypassed bounds validation due to a truthiness check (if self.channel_dimension: at tiler.py:136), surfacing as a raw IndexError instead of the documented ValueError; now consistent with the nine is not None checks elsewhere in the file
  • README's from-source install was a bare pip install (errors as written)
  • CONTRIBUTING referenced black (dropped for ruff in 2025)
  • misc/docs.sh:1 dereferenced an undefined $file_name — run from the repo root it escaped to the parent directory and ran rm outside the repo; now anchored to the script location with set -euo pipefail

Verification

  • 40/40 tests pass (2 new, each observed failing first) on Python 3.12 + numpy 2.5.1, coverage 99%
  • pre-commit run --all-files green with the bumped hooks (this is the CI lint job)
  • uv build wheel inspected: License-Expression: MIT, Requires-Python: >=3.9, Requires-Dist: numpy>=1.20, py.typed present

Known follow-ups (deliberately not in this PR)

🤖 Generated with Claude Code

https://claude.ai/code/session_01PvVX1JaNVaXJ2PJEu4KJzE

the-lay and others added 4 commits August 2, 2026 11:40
- workflow_dispatch trigger so CI can run without a push (repo had zero
  surviving run records)
- test matrix 3.9-3.14 plus two numpy axes: the declared 1.20 floor and
  newest numpy 1.x, alongside default numpy 2.x
- coverage report step activates the fail_under=95 gate that was
  configured but never enforced (current coverage: 99%)
- editable install in CI so coverage paths map back to src/ layout
- release publish now requires the test suite to pass first
- actions bumped to current majors and pinned by commit SHA; dependabot
  keeps the pins fresh
- pre-commit: ruff v0.11.12->v0.16.1, pre-commit-hooks v5->v6

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvVX1JaNVaXJ2PJEu4KJzE
- license = "MIT" SPDX expression + license-files (setuptools>=77),
  replacing the deprecated license table
- numpy>=1.20: the floor numpy.typing has required all along; its
  absence made a user fork the project (#22)
- per-version classifiers 3.9-3.14 so PyPI shows supported versions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvVX1JaNVaXJ2PJEu4KJzE
- tiler.__version__ via importlib.metadata — CONTRIBUTING's first
  instruction to bug reporters finally works
- the channel dimension guard used truthiness, so channel_dimension=0
  bypassed bounds checking and surfaced as a raw IndexError instead of
  the documented ValueError; now consistent with the nine sibling
  `is not None` checks in the same file

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvVX1JaNVaXJ2PJEu4KJzE
- README from-source install was a bare `pip install`
- CONTRIBUTING referenced black (dropped for ruff in 2025) and a version
  command that raised AttributeError
- docs.sh dereferenced an undefined variable: run from the repo root it
  escaped to the parent directory and ran rm outside the repo; now
  anchored to the script location with set -euo pipefail, and the
  deprecated `magick convert` is plain `magick`

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvVX1JaNVaXJ2PJEu4KJzE
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