diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d7ae10d..2e5e032 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,8 +52,8 @@ jobs: test: needs: get-environments permissions: - id-token: write # for codecov OIDC - contents: read + id-token: write # for codecov OIDC + contents: read strategy: fail-fast: false @@ -63,7 +63,7 @@ jobs: name: ${{ matrix.env.label }} runs-on: ${{ matrix.os }} - continue-on-error: ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails + continue-on-error: ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails env: UV_PYTHON: ${{ matrix.env.python }} @@ -117,6 +117,6 @@ jobs: - lint runs-on: ubuntu-latest steps: - - uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 - with: - jobs: ${{ toJSON(needs) }} + - uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ae6fdf..23b5e7f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,18 +7,18 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/biomejs/pre-commit - rev: v2.5.6 + rev: v2.6.5 hooks: - id: biome-format exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually. groups: [format] - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.26.0 + rev: v2.30.6 hooks: - id: pyproject-fmt groups: [format] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.1 + rev: v0.17.3 hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] @@ -53,7 +53,7 @@ repos: args: [--assume-in-merge] - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.29.0 + rev: v1.32.0 hooks: - id: zizmor args: [--no-progress, --fix] diff --git a/docs/contributing.md b/docs/contributing.md index 3adca2e..aa32c7a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -11,7 +11,7 @@ the [scientific Python tutorials][], or the [scanpy developer guide][]. [scientific Python tutorials]: https://learn.scientific-python.org/development/tutorials/ [scanpy developer guide]: https://scanpy.scverse.org/page/dev/ -:::{tip} The *hatch* project manager +:::{tip} The _hatch_ project manager We highly recommend to familiarize yourself with [`hatch`][hatch]. Hatch is a Python project manager that @@ -101,7 +101,6 @@ hatch env find hatch-test.py3.14-stable and manually point it to the python binary. - :::: ::::{tab-item} uv diff --git a/pyproject.toml b/pyproject.toml index a9b9af1..070556d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,14 @@ envs.docs.scripts.build = "sphinx-build -M html docs docs/_build -W {args}" envs.docs.scripts.clean = "git clean -fdX -- {args:docs}" envs.docs.scripts.open = "python -m webbrowser -t docs/_build/html/index.html" envs.docs.dependency-groups = [ "doc" ] +envs.hatch-check-code.dependencies = [ "prek" ] +envs.hatch-check-code.scripts.lint-check = "echo 'try `hatch check code --fix`'; false" +envs.hatch-check-code.scripts.lint-fix = "prek run -a --no-group=format --no-group=typecheck" +envs.hatch-check-fmt.dependencies = [ "prek" ] +envs.hatch-check-fmt.scripts.format-check = "echo 'try `hatch check fmt --fix`'; false" +envs.hatch-check-fmt.scripts.format-fix = "prek run -a --group=format --no-group=typecheck" +envs.hatch-check-types.scripts.check = [ "mypy" ] +envs.hatch-check-types.dependency-groups = [ "typecheck", "test" ] envs.hatch-test.matrix = [ # Test the lowest and highest supported Python versions with normal deps { deps = [ "stable" ], python = [ "3.12", "3.14" ] }, @@ -103,14 +111,6 @@ envs.hatch-test.overrides.matrix.deps.env-vars = [ { value = "allow", key = "UV_PRERELEASE", if = [ "pre" ] }, ] envs.hatch-test.dependency-groups = [ "dev", "test" ] -envs.hatch-check-fmt.dependencies = [ "prek" ] -envs.hatch-check-fmt.scripts.format-check = "echo 'try `hatch check fmt --fix`'; false" -envs.hatch-check-fmt.scripts.format-fix = "prek run -a --group=format --no-group=typecheck" -envs.hatch-check-code.dependencies = [ "prek" ] -envs.hatch-check-code.scripts.lint-check = "echo 'try `hatch check code --fix`'; false" -envs.hatch-check-code.scripts.lint-fix = "prek run -a --no-group=format --no-group=typecheck" -envs.hatch-check-types.scripts.check = [ "mypy" ] -envs.hatch-check-types.dependency-groups = [ "typecheck", "test" ] [tool.ruff] line-length = 120 @@ -151,6 +151,9 @@ lint.per-file-ignores."docs/*" = [ "D103", "E402", "I" ] lint.per-file-ignores."tests/*" = [ "D" ] lint.pydocstyle.convention = "numpy" +[tool.pyproject-fmt] +max_supported_python = "3.14" # CI tests up to 3.14 + [tool.mypy] files = [ "src", "tests" ] overrides = [ @@ -167,11 +170,11 @@ strict = true testpaths = [ "tests" ] [tool.coverage] +run.source = [ "diffsvg" ] run.omit = [ "**/test_*.py", ] run.patch = [ "subprocess" ] -run.source = [ "diffsvg" ] [tool.cruft] skip = [ diff --git a/src/diffsvg/datasets/registry.yaml b/src/diffsvg/datasets/registry.yaml index bbb078d..ae84be5 100644 --- a/src/diffsvg/datasets/registry.yaml +++ b/src/diffsvg/datasets/registry.yaml @@ -5,9 +5,9 @@ datasets: type: anndata doc_header: Legnini et al. (2023) neural organoid-like cultures, 43,762 cells x 88 genes from 17 sections of 8 organoids (4 SHH, 4 Ctrl). files: - - name: legnini23.h5ad - s3_key: legnini23.h5ad - sha256: 715407961adcb10263b79c1075d4e2f22677527a5e8c70ba8871e25890ede4c9 - # CloudFront refuses some networks (e.g. HPC clusters); the bucket serves the same bytes. - fallback_urls: - - https://scverse-exampledata.s3.eu-west-1.amazonaws.com/diffsvg/legnini23.h5ad + - name: legnini23.h5ad + s3_key: legnini23.h5ad + sha256: 715407961adcb10263b79c1075d4e2f22677527a5e8c70ba8871e25890ede4c9 + # CloudFront refuses some networks (e.g. HPC clusters); the bucket serves the same bytes. + fallback_urls: + - https://scverse-exampledata.s3.eu-west-1.amazonaws.com/diffsvg/legnini23.h5ad