diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de542ee..7ae745f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,16 +7,16 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/biomejs/pre-commit - rev: v1.9.4 + rev: v2.4.7 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.5.1 + rev: v2.19.0 hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.0 + rev: v0.15.6 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -24,7 +24,7 @@ repos: - id: ruff-format types_or: [python, pyi, jupyter] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: detect-private-key - id: check-ast diff --git a/pyproject.toml b/pyproject.toml index 192366e..5b7e495 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dynamic = [ "version" ] dependencies = [ @@ -47,7 +48,6 @@ optional-dependencies.dev = [ "pre-commit", "twine>=4.0.2", ] - optional-dependencies.doc = [ "mkdocs-macros-plugin", "mkdocs-material", @@ -55,16 +55,13 @@ optional-dependencies.doc = [ "mknotebooks", "pymdown-extensions", ] - optional-dependencies.mapping = [ "scarches>=0.6.1", "scvi-tools>=1.2", ] - optional-dependencies.stats = [ "decoupler>=1.6", ] - optional-dependencies.test = [ "coverage", "igraph>=0.11", @@ -77,29 +74,21 @@ urls.Documentation = "https://devsystemslab.github.io/HNOCA-tools/" urls.Homepage = "https://github.com/devsystemslab/HNOCA-tools" urls.Source = "https://github.com/devsystemslab/HNOCA-tools" -[tool.hatch.version] -source = "vcs" - -[tool.hatch.envs.default] -installer = "uv" -features = [ "dev" ] - -[tool.hatch.envs.hatch-test] -features = [ "test" ] - -[tool.hatch.envs.docs] -features = [ "doc" ] -scripts.build = "mkdocs build {args}" -scripts.serve = "mkdocs serve {args}" -scripts.clean = "rm -rf docs/*" +[tool.hatch] +envs.default.installer = "uv" +envs.default.features = [ "dev" ] +envs.docs.features = [ "doc" ] +envs.docs.scripts.build = "mkdocs build {args}" +envs.docs.scripts.serve = "mkdocs serve {args}" +envs.docs.scripts.clean = "rm -rf docs/*" +envs.hatch-test.features = [ "test" ] +version.source = "vcs" [tool.ruff] line-length = 120 src = [ "src" ] extend-include = [ "*.ipynb" ] - format.docstring-code-format = true - lint.select = [ "B", # flake8-bugbear "BLE", # flake8-blind-except @@ -133,18 +122,18 @@ lint.per-file-ignores."docs/*" = [ "I" ] lint.per-file-ignores."tests/*" = [ "D" ] lint.pydocstyle.convention = "numpy" -[tool.pytest.ini_options] -testpaths = [ "tests" ] -xfail_strict = true -addopts = [ +[tool.pytest] +ini_options.testpaths = [ "tests" ] +ini_options.xfail_strict = true +ini_options.addopts = [ "--import-mode=importlib", # allow using test files with same name ] -[tool.coverage.run] -source = [ "hnoca" ] -omit = [ +[tool.coverage] +run.omit = [ "**/test_*.py", ] +run.source = [ "hnoca" ] [tool.cruft] skip = [ diff --git a/site/vignettes/reference_mapping.ipynb b/site/vignettes/reference_mapping.ipynb index 50a0950..02f491a 100644 --- a/site/vignettes/reference_mapping.ipynb +++ b/site/vignettes/reference_mapping.ipynb @@ -18,11 +18,10 @@ "source": [ "import os\n", "\n", + "import hnoca.map as hmap\n", "import scanpy as sc\n", "import scvi\n", "\n", - "import hnoca.map as hmap\n", - "\n", "os.chdir(\"/home/fleckj/scratch/hnoca/\")" ] },