Skip to content

ci: add uv.lock and unblock the matrix - #6

Merged
franrolotti merged 3 commits into
mainfrom
claude/exciting-leavitt-bba67e
May 13, 2026
Merged

franrolotti merged 3 commits into
mainfrom
claude/exciting-leavitt-bba67e

Conversation

@franrolotti

Copy link
Copy Markdown
Owner

Summary

Gets the CI matrix from all-red to green and supersedes #5.

The root cause of every failing job was the missing uv.lock: astral-sh/setup-uv@v3 is configured with enable-cache: true, which hard-errors when there's no lockfile to glob. #5 cleaned up adjacent lint/type/test issues but never added the lockfile, so it would still fail on merge.

Changes

  • Add uv.lock (84 packages, resolved on 3.12). Fixes the cache step.
  • Drop macos-latest from the test matrix (carried over from ci: drop macOS from matrix; clean up checks for green CI #5). For a numpy-pure package the macOS runner doubles wall time without adding coverage.
  • scipy.stats.anderson(..., method="interpolate") — SciPy 1.17 made method effectively required; the resulting FutureWarning was being promoted to an error by pytest's filterwarnings = ["error"].
  • Ruff fixes — .values → .to_numpy() (PD011), wrap long lines (E501), drop the removed PD901 ignore, suppress PD010 on the one intentional .pivot call.
  • Mypy under strict mode — add pandas to ignore_missing_imports (matches existing numpy/scipy/sklearn treatment); replace _rolling_kwargs: dict[str, object] with a TypedDict so **unpack typechecks.

Verified locally

uv run ruff check .          # All checks passed!
uv run ruff format --check . # 21 files already formatted
uv run mypy                  # Success: no issues found in 12 source files
uv run pytest -q             # 21 passed

Relationship to #5

Same goal, different approach in two places:

this PR #5
Adds uv.lock ✅ ❌ (this is why #5's CI still fails)
mypy keeps strict = true, ignores pandas imports relaxes strict + adds pandas-stubs
scipy floor unchanged bumped to >=1.17

Recommend closing #5 in favour of this one.

Test plan

  • CI green on Python 3.10 / 3.11 / 3.12
  • Build job uploads sdist + wheel artefact
  • Codecov upload runs on 3.12

🤖 Generated with Claude Code

- Generate uv.lock so setup-uv cache step succeeds in CI.
- Add `method="interpolate"` to scipy.stats.anderson; SciPy 1.17 made
  this a required argument and `filterwarnings=error` turned the
  FutureWarning into a test failure.
- Fix ruff PD011/E501 issues (`.values` -> `.to_numpy()`, wrap long
  lines), drop the removed PD901 ignore, suppress PD010 on the only
  legitimate `.pivot` call.
- Add `pandas` to mypy `ignore_missing_imports` (matches existing
  treatment of numpy/scipy/sklearn) and type `_rolling_kwargs` via a
  TypedDict to satisfy strict mode.
macOS adds wall-time but no coverage for a numpy-pure package — tests now
run on ubuntu-latest only across 3.10 / 3.11 / 3.12. CHANGELOG documents
the uv.lock addition, the macOS drop, the SciPy anderson fix, and the
mypy/pandas import handling.
Passing method="interpolate" to scipy.stats.anderson breaks on the SciPy
versions resolved for Python 3.10 (kwarg added in 1.15). Switch to a
warnings.catch_warnings block: works across the whole declared scipy
floor (>=1.11) without raising the floor and risking 3.10 support.
@franrolotti
franrolotti merged commit cf00526 into main May 13, 2026
5 checks passed
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