Fix CI: pin ruff, make type inference tests pandas 3 compatible - #711
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
masterCI has been red because of dependency drift, not code changes. This blocks #710 and #687.Lint
lint.ymlranpipx run ruffwithout a pinned version, so new ruff rules started failing on unchanged code. It's now pinned toruff==0.16.8.target-version = "py38"toruff.tomlto matchpython_requires(ruff can't read setup.py). Newer ruff defaults to py310 and suggestsX | None,zip(strict=)and similar, which would break 3.8/3.9.%formatting with f-strings inget_version()and the user factory. Output is unchanged, checked for final, patch and beta versions on Python 3.8 and 3.10.noqa: PLR0917onquery_viewmodelinstead of changing a signature that 5 call sites use.Tests (pandas 3)
datetime64[us]dtype instead of[ns], and text astrdtype instead ofobject. Sixtest_type_infertests asserted those exact dtypes.pandas_to_sqliteon pandas 2.2.2 and 3.0.6, and the resulting SQLite column types and values are identical. Upload behavior hasn't changed.Testing
explorer.tests.settingsandsettings_base.ruff@0.16.8 check exploreris clean.🤖 Generated with Claude Code