-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
126 lines (114 loc) · 4.23 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-docstring-description", "hatch-vcs", "hatchling" ]
[project]
name = "fast-array-utils"
readme = "README.rst"
license = "MPL-2.0"
authors = [
{ name = "Philipp A.", email = "[email protected]" },
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: R",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dynamic = [ "description", "version" ]
dependencies = [ "numba", "numpy" ]
optional-dependencies.doc = [ "furo", "scanpydoc>=0.15.2", "sphinx>=8", "sphinx-autodoc-typehints" ]
optional-dependencies.full = [ "dask", "fast-array-utils[sparse]", "h5py", "zarr" ]
optional-dependencies.sparse = [ "scipy>=1.8", "types-scipy-sparse" ]
optional-dependencies.test = [ "coverage[toml]", "pytest", "pytest-codspeed" ]
urls.'Documentation' = "https://icb-fast-array-utils.readthedocs-hosted.com/"
urls.'Issue Tracker' = "https://github.com/scverse/fast-array-utils/issues"
urls.'Source Code' = "https://github.com/scverse/fast-array-utils"
[tool.hatch.metadata.hooks.docstring-description]
[tool.hatch.version]
source = "vcs"
raw-options = { local_scheme = "no-local-version" } # be able to publish dev version
[tool.hatch.envs.default]
installer = "uv"
[tool.hatch.envs.docs]
features = [ "doc" ]
scripts.build = "sphinx-build -M html docs docs/_build"
scripts.clean = "git clean -fdX docs"
[tool.hatch.envs.hatch-test]
features = [ "test" ]
extra-dependencies = [ "ipykernel" ]
env-vars.CODSPEED_PROFILE_FOLDER = "test-data/codspeed"
overrides.matrix.extras.features = [
{ if = [ "full" ], value = "full" },
]
[[tool.hatch.envs.hatch-test.matrix]]
python = [ "3.11", "3.12", "3.13" ]
extras = [ "min", "full" ]
[tool.ruff]
line-length = 100
namespace-packages = [ "src/testing" ]
lint.select = [ "ALL" ]
lint.ignore = [
"A005", # submodules never shadow builtins.
"C408", # dict() calls are nice
"COM812", # trailing commas handled by black
"D203", # prefer 0 to 1 blank line before class members
"D213", # prefer docstring summary on first line
"FIX002", # “TODO” comments
"N812", # lowercase imports are fine
"PLR0913", # having many (kw)args is fine
"Q", # handled by formatter
"S101", # asserts are fine
"TID252", # relative imports are fine
]
lint.per-file-ignores."docs/**/*.py" = [ "INP001" ] # No __init__.py in docs
lint.per-file-ignores."src/**/stats/*.py" = [ "A001", "A004" ] # Shadows builtins like `sum`
lint.per-file-ignores."stubs/**/*.pyi" = [ "F403", "F405", "N801" ] # Stubs don’t follow name conventions
lint.per-file-ignores."tests/**/test_*.py" = [
"D100", # tests need no module docstrings
"D103", # tests need no function docstrings
"INP001", # tests should not have __init__.py
"PLR2004", # tests use magic values
"S101", # tests use `assert`
]
lint.allowed-confusables = [ "×", "’" ]
lint.flake8-copyright.notice-rgx = "SPDX-License-Identifier: MPL-2\\.0"
lint.flake8-type-checking.exempt-modules = [ ]
lint.flake8-type-checking.strict = true
lint.isort.known-first-party = [ "fast_array_utils" ]
lint.isort.lines-after-imports = 2
lint.isort.required-imports = [ "from __future__ import annotations" ]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
"--pyargs",
"-ptesting.fast_array_utils.pytest",
]
filterwarnings = [
"error",
# codspeed seems to break this dtype added by h5py
"ignore:.*numpy[.]longdouble:UserWarning",
]
markers = [
"benchmark: marks tests as benchmark (to run with `--codspeed`)",
]
xfail_strict = true
[tool.coverage]
run.data_file = "test-data/.coverage"
xml.output = "test-data/coverage.xml"
html.directory = "test-data/htmlcov"
run.omit = [ "src/testing/*", "tests/*" ]
report.exclude_also = [ "if TYPE_CHECKING:", "@numba[.]njit", "[.]{3}" ]
[tool.mypy]
strict = true
explicit_package_bases = true
mypy_path = [ "$MYPY_CONFIG_FILE_DIR/stubs", "$MYPY_CONFIG_FILE_DIR/src" ]
[tool.pyright]
stubPath = "./stubs"
reportPrivateUsage = false