-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathpyproject.toml
More file actions
123 lines (112 loc) · 4.12 KB
/
Copy pathpyproject.toml
File metadata and controls
123 lines (112 loc) · 4.12 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
[build-system]
requires = ["meson-python>=0.18", "meson>=1.5"]
build-backend = "mesonpy"
[project]
# Distribution name on PyPI. The import package is still `direct` (see
# meson.build / install_subdir), so `pip install direct-recon` then `import direct`.
name = "direct-recon"
description = "DIRECT - Deep Image REConsTruction - is a deep learning framework for MRI reconstruction."
readme = "README.rst"
license = { text = "Apache-2.0" }
requires-python = ">=3.12"
authors = [
{ name = "Jonas Teuwen", email = "j.teuwen@nki.nl" },
{ name = "George Yiasemis", email = "g.yiasemis@nki.nl" },
]
keywords = ["direct"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
# Static so uv can read metadata without invoking the build backend (required
# because `direct` is built without isolation; see `[tool.uv]` below). Kept in
# sync with meson.build and direct/__init__.py by tests/version_test.py.
version = "2.1.1"
dependencies = [
"numpy>=2.4,<3",
"h5py>=3.16",
"omegaconf>=2.3",
"torch>=2.11,<3",
"torchvision>=0.26",
"scikit-image>=0.26",
"scikit-learn>=1.8",
"tensorboard>=2.20",
"tqdm>=4.67",
"protobuf>=5.29,<8",
"einops>=0.8",
]
[dependency-groups]
dev = [
"pytest>=9",
"ruff>=0.16.1",
"ty>=0.0.38",
"packaging>=25",
"boto3>=1.40",
"ismrmrd>=1.15",
"pre-commit>=4",
]
# Build backend + tools. Installed into the environment so that `direct` can be
# built without build isolation (see `[tool.uv] no-build-isolation-package`),
# which keeps the meson-python editable install from baking a path to an
# ephemeral, isolated-build `ninja` that disappears once uv prunes its cache.
build = [
"meson-python>=0.18",
"meson>=1.5",
"ninja>=1.11",
]
docs = [
"sphinx>=9",
"sphinx-copybutton>=0.5",
"sphinx-book-theme>=1.2",
"sphinx-autodoc-typehints>=3",
"sphinx-paramlinks>=0.6",
"sphinx-togglebutton>=0.3",
"numpydoc>=1.10",
"myst-parser>=5",
]
[tool.uv]
default-groups = ["dev", "build"]
# Build `direct` against the already-synced `build` group instead of an
# isolated build environment. Without this, meson-python's editable install
# records the absolute path of the isolated build env's `ninja`, which uv later
# deletes, breaking `import direct` on the next run. Matches the distribution
# name in `[project] name`, not the import package.
no-build-isolation-package = ["direct-recon"]
[tool.pytest.ini_options]
# Keep collection inside the project's own suite; never descend into the
# `bazel-*` convenience symlinks that point at the Bazel output tree.
testpaths = ["tests"]
norecursedirs = ["bazel-*", "projects", ".venv", "build", "dist"]
[project.scripts]
direct = "direct.cli.cli:main"
[project.urls]
Homepage = "https://github.com/NKI-AI/direct"
[tool.meson-python]
# The C++ extensions target the CPython 3.12 stable ABI (abi3), so non-Windows
# wheels are tagged `abi3` and a single wheel per platform serves every
# supported interpreter. Windows builds override this in the release workflow
# and emit per-version wheels.
limited-api = true
[tool.meson-python.args]
# Build nanobind (+ robin-map) from the committed subprojects/*.wrap and link
# them statically, so the extensions are self-contained on every platform.
setup = ["--wrap-mode=forcefallback", "-Ddefault_library=static"]
[tool.ty.environment]
python = ".venv"
python-version = "3.12"
[tool.ty.src]
include = ["direct"]
[tool.ty.rules]
# PyTorch's overload definitions are notoriously incomplete; surface them as
# warnings rather than errors so they don't drown out real issues.
no-matching-overload = "warn"
# The codebase still carries `# type: ignore` comments from mypy/pyright that ty
# does not need; surface those as hints rather than errors/warnings.
unused-type-ignore-comment = "ignore"
# OmegaConf and PyTorch make heavy use of attribute-style lazy submodule loading.
possibly-missing-submodule = "ignore"