-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
319 lines (292 loc) · 7.92 KB
/
pyproject.toml
File metadata and controls
319 lines (292 loc) · 7.92 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
[build-system]
requires = ["setuptools>=76.1.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "emmiai-noether"
version = "2.0.0"
description = "Noether: A PyTorch-based Framework for Engineering AI"
authors = [{ name = "Emmi AI", email = "contact@emmi.ai" }]
license-files = ["LICENSE.txt"]
license = "LicenseRef-ENPL"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"setuptools",
"wheel",
# ---
"loguru>=0.7.3",
"einops>=0.8.1",
"hydra-core>=1.3.2",
"numpy==2.3.1",
"torch==2.11.0",
"pandas>=2.3.3",
"h5py>=3.12.1",
# ---
"aistore>=1.13.5",
"pyvista>=0.44.2",
"rtree>=1.4.0",
"trimesh>=4.6.6",
# ---
"boto3>=1.40.4",
"huggingface-hub>=0.34.3",
"typer>=0.16.0",
"fsspec>=2025.5.1",
"psutil>=5.9.0",
# ---
]
[project.urls]
Source = "https://github.com/Emmi-AI/noether"
Docs = "https://noether-docs.emmi.ai/"
[tool.setuptools_scm]
write_to = "src/noether/_version.py"
[tool.setuptools.package-data]
"noether.scaffold" = ["template_files/**/*.py", "template_files/**/*.yaml", "template_files/**/*.toml"]
[project.scripts]
noether-train = "noether.training.cli.main_train:main"
noether-train-submit-job = "noether.training.cli.submit_job:main"
noether-eval = "noether.inference.cli.main_inference:main"
noether-data = "noether.io.cli.cli:app"
noether-dataset-stats = "noether.data.tools.calculate_statistics:main"
noether-init = "noether.scaffold.cli:app"
noether-development = "noether.training.cli.development:main"
# --- Centralized Development & Tooling Dependencies ---
# These are dependencies for developing the *entire* workspace.
# Install them with `uv sync --group dev --group docs` or `uv sync --all-groups`.
[dependency-groups]
dev = [
{ include-group = "docs" },
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"pytest-cov", # Added for code coverage
"mypy[reports]>=1.15.0",
"ruff>=0.11.0",
"fixit>=2.1.0",
"ipykernel>=6.30.0", # Useful for notebooks
"types-docutils==0.22.0.20250822",
"types-pyyaml>=6.0.12.20241230",
"types-tqdm>=4.67.0.20250809",
"docutils-stubs==0.0.22",
"pytest-benchmark>=5.2.3",
"wandb>=0.19.6", # Added for testing WandB integration
]
docs = [
"sphinx>=7.3",
"furo==2025.7.19",
"sphinx-autoapi>=3.6.0",
"sphinx-autodoc-typehints",
"sphinx-multiversion",
"sphinx-design",
"myst-parser",
"autodoc-pydantic>=2.2.0",
"sphinx-copybutton>=0.5.2",
"roman-numerals-py==4.0.0", # pin because of https://github.com/sphinx-doc/sphinx/issues/14186
]
[[tool.uv.index]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "torch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[tool.uv.sources]
torch = [
{ index = "torch-cu128", marker = "sys_platform != 'darwin'" },
{ index = "torch-cpu", marker = "sys_platform == 'darwin'" },
]
[tool.coverage.run]
source = ["noether"]
[tool.coverage.report]
omit = [
"src/noether/data/datasets/*",
"src/noether/data/cli/*",
"src/noether/training/cli/*",
"src/noether/inference/cli/*",
"src/noether/io/cli/*",
"src/noether/scaffold/*",
"src/noether/__init__.py",
"src/noether/_version.py",
"src/noether/core/scripts/*",
"tests/*",
"examples/*",
]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == \\'__main__\\':",
"if __name__ == \"__main__\":",
"@overload",
"raise NotImplementedError",
"\\.\\.\\.", # abstract method bodies
]
# mypy and ruff ran in the child packages will fall back to this configuration
[tool.mypy]
python_version = "3.12"
mypy_path = ["src"]
files = ["src"]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
check_untyped_defs = true
explicit_package_bases = true
namespace_packages = true
no_implicit_optional = true
strict = false
warn_return_any = true
warn_unused_ignores = false
show_error_codes = true
exclude = ["^_build/|^build/|^dist/|^docs/|^\\.venv/|template_files/"]
[[tool.mypy.overrides]]
module = [
"torch_geometric.*",
"torch_scatter.*",
"aistore.*",
"boto3.*",
# "pyvista.*",
# "trimesh.*",
# "rtree.*"
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = ["--import-mode=importlib", "-m", "not benchmark"]
[tool.ruff]
exclude = [
".eggs",
".git",
".ipynb_checkpoints",
".pytest_cache",
".ruff_cache",
".vscode",
"__pypackages__",
"_build",
"build",
"dist",
"node_modules",
"site-packages",
"archive",
]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
[tool.ruff.lint]
# NOTE: Synchronize the ignores with .flake8
ignore = [
"G004", # "Logging statement uses f-string" is not an issue for the current ML pipeline
# these ignores are from flake8-bugbear; please fix!
"B007",
"B008",
"B017",
"B018", # Useless expression
"B023",
"B028", # No explicit `stacklevel` keyword argument found
"E402",
"C408", # C408 ignored because we like the dict keyword argument syntax
"C409", # prefer [] over list()
"C410", # prefer () over tuple()
"E501", # E501 is not flexible enough, we're using B950 instead
"E721",
"E731", # Assign lambda expression
"E741",
"EXE001",
"F405",
"F841",
# these ignores are from flake8-logging-format; please fix!
"G101",
# these ignores are from ruff NPY; please fix!
"NPY002",
# these ignores are from ruff PERF; please fix!
"PERF203",
"PERF401",
"PERF403",
# these ignores are from PYI; please fix!
"PYI024",
"PYI036",
"PYI041",
"PYI056",
"SIM102",
"SIM103",
"SIM112", # flake8-simplify code styles
"SIM113", # please fix
"SIM105", # these ignores are from flake8-simplify. please fix or ignore with commented reason
"SIM108", # SIM108 ignored because we prefer if-else-block instead of ternary expression
"SIM110",
"SIM114", # Combine `if` branches using logical `or` operator
"SIM115",
"SIM116", # Disable Use a dictionary instead of consecutive `if` statements
"SIM117",
"SIM118",
"UP006", # keep-runtime-typing
"UP007", # keep-runtime-typing
"TC001",
"TC002",
"TC003",
]
select = [
"B",
"B904", # Re-raised error without specifying the cause via the from keyword
"C4",
"G",
"E",
"EXE",
"F",
"SIM1",
"SIM911",
"W",
# Not included in flake8
"FURB",
"LOG",
"NPY",
"PERF",
"PGH004",
"PIE790",
"PIE794",
"PIE800",
"PIE804",
"PIE807",
"PIE810",
"PLC0131", # type bivariance
"PLC0132", # type param mismatch
"PLC0205", # string as __slots__
"PLC3002", # unnecessary-direct-lambda-call
"PLE",
"PLR0133", # constant comparison
"PLR0206", # property with params
"PLR1722", # use sys exit
"PLR1736", # unnecessary list index
"PLW0129", # assert on string literal
"PLW0133", # useless exception statement
"PLW0406", # import self
"PLW0711", # binary op exception
"PLW1509", # preexec_fn not safe with threads
"PLW2101", # useless lock statement
"PLW3301", # nested min max
"PT006",
"PT022",
"PT023",
"PT024",
"PT025",
"PT026",
"PYI",
"Q003", # avoidable escaped quote
"Q004", # unnecessary escaped quote
"RSE",
"RUF008", # mutable dataclass default
"RUF015", # access first ele in constant time
"RUF016", # type error non-integer index
"RUF017",
"RUF018", # no assignment in assert
"RUF019", # unnecessary-key-check
"RUF024", # from keys mutable
"RUF026", # default factory kwarg
"TCH",
"TRY002", # ban vanilla raise (todo fix NOQAs)
"TRY203",
"TRY401", # verbose-log-message
"UP",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.fixit]
enable = [".ci.rules"]
disable = ["fixit.rules:RewriteToLiteral"]