Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (107 loc) · 3.26 KB
/
Copy pathpyproject.toml
File metadata and controls
125 lines (107 loc) · 3.26 KB
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
[build-system]
requires = ["scikit-build-core>=0.10"]
build-backend = "scikit_build_core.build"
[project]
name = "damacy"
version = "0.0.1"
description = "High-throughput streaming loader for sharded NGFF zarr stores."
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Nathan Clack", email = "nclack@gmail.com" }]
requires-python = ">=3.11"
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-cov>=5", "numpy>=1.26", "ruff>=0.6", "pyright>=1.1"]
gpu = ["torch"]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.26",
"ruff>=0.6",
]
[tool.scikit-build]
cmake.args = ["-DDAMACY_PYTHON=ON"]
cmake.build-type = "RelWithDebInfo"
build-dir = "build/{wheel_tag}"
editable.rebuild = true
wheel.packages = ["python/damacy"]
wheel.py-api = ""
[tool.scikit-build.cmake.define]
DAMACY_FUZZ = "OFF"
[tool.ruff]
line-length = 88
target-version = "py311"
extend-exclude = ["build", ".venv", ".claude/worktrees"]
[tool.ruff.lint]
# E/W = pycodestyle, F = pyflakes, I = isort, UP = pyupgrade,
# B = bugbear, SIM = simplifications, RUF = ruff-specific.
select = ["E", "W", "F", "I", "UP", "B", "SIM", "RUF"]
ignore = ["E501"] # line-length is enforced by the formatter
[tool.ruff.lint.per-file-ignores]
"python/tests/*" = ["B011"] # asserts in tests are fine
# relax rules for internal scripts
"bench/*" = [
"B008",
"B904",
"B905",
"E402",
"E731",
"F401",
"F841",
"RUF059",
"RUF100",
]
"experiments/*" = [
"B008",
"B904",
"B905",
"E402",
"E731",
"F401",
"F841",
"RUF059",
]
"tests/*.py" = ["B008", "B904", "B905", "E402", "E731", "F401", "F841", "UP045"]
# ---- pyright ------------------------------------------------------------
[tool.pyright]
include = ["python/damacy", "python/tests"]
exclude = ["build", ".venv", ".claude/worktrees", "**/__pycache__"]
pythonVersion = "3.11"
typeCheckingMode = "standard"
reportMissingImports = "error"
reportMissingTypeStubs = "warning"
# _native is a C extension whose source isn't a .py file — the .pyi stub
# is the source of truth, so silence the "found binary but not source" note.
reportMissingModuleSource = "none"
# Resolve project deps (pytest etc.) from the in-tree venv when present.
venvPath = "."
venv = ".venv"
# ---- pytest -------------------------------------------------------------
[tool.pytest.ini_options]
# --cov is added by the cmake-driven invocation when pytest-cov is
# importable; ad-hoc `pytest` runs without coverage by default.
minversion = "8.0"
testpaths = ["python/tests"]
addopts = ["-ra", "--strict-markers"]
[tool.coverage.run]
source = ["damacy"]
omit = ["*/_native*"] # C extension is not Python-coverable
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
show_missing = true
skip_covered = true
# ---- pixi -------------------------------------------------------------
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.pypi-dependencies]
damacy = { path = ".", editable = true }
[tool.pixi.environments]
default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
docs = { features = ["docs"], solve-group = "default" }
gpu = { features = ["gpu"], solve-group = "default" }
[tool.pixi.tasks]