Skip to content

Fix CI: pin ruff, make type inference tests pandas 3 compatible - #711

Merged
chrisclark merged 1 commit into
masterfrom
fix-ci
Sep 23, 2026
Merged

chrisclark merged 1 commit into
masterfrom
fix-ci

Conversation

@chrisclark

Copy link
Copy Markdown
Collaborator

Summary

master CI has been red because of dependency drift, not code changes. This blocks #710 and #687.

Lint

  • lint.yml ran pipx run ruff without a pinned version, so new ruff rules started failing on unchanged code. It's now pinned to ruff==0.16.8.
  • Added target-version = "py38" to ruff.toml to match python_requires (ruff can't read setup.py). Newer ruff defaults to py310 and suggests X | None, zip(strict=) and similar, which would break 3.8/3.9.
  • Fixed the remaining findings:
    • Replaced % formatting with f-strings in get_version() and the user factory. Output is unchanged, checked for final, patch and beta versions on Python 3.8 and 3.10.
    • Added a noqa: PLR0917 on query_viewmodel instead of changing a signature that 5 call sites use.

Tests (pandas 3)

  • The dev requirements now resolve to pandas 3.0, which gives datetimes a datetime64[us] dtype instead of [ns], and text a str dtype instead of object. Six test_type_infer tests asserted those exact dtypes.
  • I checked the actual upload output. Every CSV/JSON test fixture was run through pandas_to_sqlite on pandas 2.2.2 and 3.0.6, and the resulting SQLite column types and values are identical. Upload behavior hasn't changed.
  • The tests now check for any datetime dtype, and for object or string dtype for text columns.

Testing

  • Full suite passes locally on pandas 2.2.2 and 3.0.6, under both explorer.tests.settings and settings_base.
  • ruff@0.16.8 check explorer is clean.

🤖 Generated with Claude Code

- lint.yml ran an unpinned ruff, so new upstream rules broke CI on unchanged
  code. Pin ruff 0.16.8 and set target-version = "py38" in ruff.toml to match
  python_requires (newer ruff defaults to py310 and suggests syntax that
  breaks 3.8/3.9).
- Replace percent-formatting flagged by UP031 and noqa PLR0917 on
  query_viewmodel rather than changing its signature.
- pandas 3 infers datetimes as datetime64[us] and text as the str dtype.
  The SQLite tables produced from uploads are unchanged (same column types
  and values), so relax the tests to check for any datetime / text dtype.

Co-Authored-By: Claude <noreply@anthropic.com>
@chrisclark
chrisclark merged commit d0ea4e0 into master Sep 23, 2026
11 checks passed
@chrisclark
chrisclark deleted the fix-ci branch September 23, 2026 21:09
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