Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.10
rev: v2.3.14
hooks:
- id: biome-format
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.11.1
rev: v2.14.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
rev: v0.15.0
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter]
Expand Down
70 changes: 24 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ classifiers = [
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dynamic = [ "version" ]

dependencies = [
"anndata>=0.10.8",
"h5py",
Expand All @@ -38,7 +37,6 @@ dependencies = [
# for debug logging (referenced from the issue template)
"session-info2",
]

optional-dependencies.io = [ "fsspec", "zarr" ]
# https://docs.pypi.org/project_metadata/#project-urls
urls.Documentation = "https://mudata.readthedocs.io/"
Expand All @@ -52,13 +50,11 @@ dev = [
"pre-commit",
"twine>=4.0.2",
]

test = [
"coverage>=7.10",
"pytest",
"zarr",
]

doc = [
"docutils>=0.8,!=0.18.*,!=0.19.*",
"ipykernel",
Expand All @@ -76,51 +72,33 @@ doc = [
"sphinxext-opengraph",
]

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "src/mudata/_version.py"

[tool.hatch.envs.default]
installer = "uv"
dependency-groups = [ "dev" ]

[tool.hatch.envs.docs]
dependency-groups = [ "doc" ]
scripts.build = "sphinx-build -M html docs docs/_build {args}"
scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
scripts.clean = "git clean -fdX -- {args:docs}"

# Test the lowest and highest supported Python versions with normal deps
[[tool.hatch.envs.hatch-test.matrix]]
deps = [ "stable" ]
python = [ "3.11", "3.14" ]

# Test the newest supported Python version also with pre-release deps
[[tool.hatch.envs.hatch-test.matrix]]
deps = [ "pre" ]
python = [ "3.14" ]

[tool.hatch.envs.hatch-test]
dependency-groups = [ "dev", "test" ]

[tool.hatch.envs.hatch-test.overrides]
[tool.hatch]
build.hooks.vcs.version-file = "src/mudata/_version.py"
envs.default.installer = "uv"
envs.default.dependency-groups = [ "dev" ]
envs.docs.dependency-groups = [ "doc" ]
envs.docs.scripts.build = "sphinx-build -M html docs docs/_build {args}"
envs.docs.scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
envs.docs.scripts.clean = "git clean -fdX -- {args:docs}"
envs.hatch-test.dependency-groups = [ "dev", "test" ]
envs.hatch-test.matrix = [
{ deps = [ "stable" ], python = [ "3.11", "3.14" ] },
{ deps = [ "pre" ], python = [ "3.14" ] }
]
# If the matrix variable `deps` is set to "pre",
# set the environment variable `UV_PRERELEASE` to "allow".
matrix.deps.env-vars = [
envs.hatch-test.overrides.matrix.deps.env-vars = [
{ key = "UV_PRERELEASE", value = "allow", if = [ "pre" ] },
]
version.source = "vcs"

[tool.ruff]
line-length = 120
src = [ "src" ]
extend-include = [ "*.ipynb" ]

format.skip-magic-trailing-comma = true
format.exclude = [ "*.ipynb" ]
format.docstring-code-format = true

lint.select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
Expand All @@ -135,11 +113,11 @@ lint.select = [
"W", # Warning detected by Pycodestyle
]
lint.ignore = [
"B008", # Errors from function calls in argument defaults. These are fine when the result is immutable.
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # __magic__ methods are often self-explanatory, allow missing docstrings
"D107", # Missing docstring in __init__
"B008", # Errors from function calls in argument defaults. These are fine when the result is immutable.
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # __magic__ methods are often self-explanatory, allow missing docstrings
"D107", # Missing docstring in __init__
# Disable one in each pair of mutually incompatible rules
"D203", # We don’t want a blank line before a class docstring
"D213", # <> We want docstrings to start immediately after the opening triple quote
Expand All @@ -163,10 +141,10 @@ addopts = [
"--import-mode=importlib", # allow using test files with same name
]

[tool.coverage.run]
source = [ "mudata" ]
patch = [ "subprocess" ]
omit = [
[tool.coverage]
run.source = [ "mudata" ]
run.patch = [ "subprocess" ]
run.omit = [
"**/test_*.py",
]

Expand Down