diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index ec764e91..2b4f3946 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -55,7 +55,7 @@ jobs: sccache: 'true' # manylinux: ${{ matrix.platform.manylinux }} # https://github.com/PyO3/maturin-action/issues/245 - - name: Cargo lint + format + - name: Cargo lint + format icechunk-python shell: bash working-directory: icechunk run: | @@ -71,15 +71,14 @@ jobs: pip install icechunk['test'] --find-links dist --force-reinstall mypy python - # - name: ruff - # shell: bash - # working-directory: icechunk-python - # run: | - # set -e - # python3 -m venv .venv - # source .venv/bin/activate - # pip install icechunk['test'] --find-links dist --force-reinstall - # ruff check + - name: pre-commit lint + shell: bash + working-directory: icechunk-python + run: | + set -e + source .venv/bin/activate + pip install pre-commit + SKIP=just-rust pre-commit run --all-files - name: Restore cached hypothesis directory id: restore-hypothesis-cache diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index 97f38b15..53414ec6 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -67,7 +67,6 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - working-directory: icechunk-python name: wheels-linux-${{ matrix.platform.target }} path: icechunk-python/dist diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f2d8cad8..aedd8646 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,13 +10,13 @@ repos: - id: mixed-line-ending - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.7.2' + rev: 'v0.8.0' hooks: - id: ruff-format - id: ruff args: ["--fix", "--show-fixes", "icechunk-python/"] - repo: https://github.com/rhysd/actionlint - rev: v1.6.26 + rev: v1.7.4 hooks: - id: actionlint files: ".github/workflows/" @@ -28,7 +28,7 @@ repos: - id: codespell - repo: local hooks: - - id: format-lint + - id: just-rust name: just description: Run the just pre-commit step entry: just pre-commit diff --git a/icechunk-python/pyproject.toml b/icechunk-python/pyproject.toml index 40192505..545e6251 100644 --- a/icechunk-python/pyproject.toml +++ b/icechunk-python/pyproject.toml @@ -95,7 +95,6 @@ ignore = [ "E501", # line too long - let the formatter worry about that "E731", # do not assign a lambda expression, use a def "UP007", # use X | Y for type annotations - "UP027", # deprecated "C40", # unnecessary generator, comprehension, or literal "PGH003", # type:ignore without code "PIE790", # unnecessary pass statement diff --git a/icechunk-python/python/icechunk/__init__.py b/icechunk-python/python/icechunk/__init__.py index e31ba80b..c6d8addc 100644 --- a/icechunk-python/python/icechunk/__init__.py +++ b/icechunk-python/python/icechunk/__init__.py @@ -22,13 +22,13 @@ from zarr.core.sync import SyncMixin __all__ = [ - "__version__", "IcechunkStore", "S3Credentials", "SnapshotMetadata", "StorageConfig", "StoreConfig", "VirtualRefConfig", + "__version__", ]