-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (101 loc) · 3.05 KB
/
pyproject.toml
File metadata and controls
126 lines (101 loc) · 3.05 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
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
[project]
name = "rayocular-toolbox"
authors = [
{ name = "Jan-Willem Beenakker" },
{ name = "Lennart Pors" },
{ name = "Corné Haasjes" },
]
maintainers = [{ name = "MReye research group", email = "pyrot@mreye.nl" }]
description = "A Python toolbox for ocular proton therapy planning in RayOcular"
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["RayOcular", "RayStation", "Proton therapy"]
classifiers = [
"Development Status :: 1 - Planning",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.6,<3.9" # RayOcular only supports Python 3.6 and 3.8
dependencies = ["numpy", "pythonnet>=2.5.2"]
dynamic = ["version"]
# Hatch configuration
[tool.hatch.version]
source = "versioningit"
default-version = "0.0.0+unknown"
[tool.hatch.build.targets.sdist]
exclude = [".github/", "docs/"]
[tool.hatch.build.targets.wheel]
packages = ["pyrot"]
[tool.hatch.envs.default]
installer = "uv"
python = "3.8"
[tool.hatch.envs.default.scripts]
# Format docstrings according to numpydoc
format-docstrings = "{env:HATCH_UV:uv} tool run pydocstringformatter --write {args:scripts tests pyrot standalone}"
# Testing
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.6", "3.8"]
# Documentation
[tool.hatch.envs.docs]
installer = "uv"
python = "3.13"
dependencies = [
"myst-parser",
"pydata-sphinx-theme",
"sphinx",
"sphinx-autoapi",
"sphinx-autobuild",
"sphinx-design",
]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -M {args:html} docs docs/_build"
preview = "sphinx-autobuild docs docs/_build/html --open-browser --ignore docs/api {args}"
# Formatting and linting
[tool.hatch.envs.hatch-static-analysis]
config-path = "ruff_defaults.toml"
dependencies = ["ruff==0.11.0"]
[tool.ruff]
extend = "ruff_defaults.toml"
target-version = "py38"
line-length = 120
extend-include = ["*.ipynb"]
exclude = ["Examples/"]
[tool.ruff.lint]
preview = true
extend-select = [
"LOG015", # Root logger call
]
ignore = [
"RUF009", # Function as dataclass default
"EM", # exception messages
"TRY003", # accept longer exception messages
"S101", # accept use of assert as this is of use in RayOcular scripting
"N806", # TODO: snake_case implementation in next merge request
"N803", #TODO: snake_case implementation in next merge request
"N802", #TODO: snake_case implementation in next merge request
"PYI019", # typing.Self is not available in Python 3.8
]
[tool.ruff.lint.per-file-ignores]
"docs/**" = [
"INP001", # __init__.py in implicit namespace package
]
"tests/**" = [
"PLC2701", # Private members
"PLR6301",
]
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
quote-style = "double"
[tool.pydocstringformatter]
style = "numpydoc"
max-line-length = 120
max-summary-lines = 1
summary-quotes-same-line = true
linewrap-full-docstring = true