-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
181 lines (161 loc) · 3.99 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "pyhdtoolkit/version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/docker",
"/examples",
"/tests",
]
[tool.hatch.build.targets.wheel]
packages = ["pyhdtoolkit"]
[project]
name = "pyhdtoolkit"
readme = "README.md"
description = "An all-in-one toolkit package to ease my Python work in my PhD."
authors = [
{name = "Felix Soubelet", email = "felix.soubelet@cern.ch"},
]
license = "MIT"
dynamic = ["version"]
requires-python = ">=3.10"
keywords = [
"PHD",
"Accelerator Physics",
"Physics Simulation",
"Visualisation",
"Docker",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Utilities",
]
dependencies = [
"numpy >= 2.0",
"pandas >= 2.0",
"matplotlib >=3.7",
"scipy >= 1.6",
"tfs-pandas >= 3.8",
"loguru < 1.0",
"cpymad >= 1.16",
"rich >= 13.0",
"pydantic >= 2.0",
"pendulum >= 3.0",
"optics-functions >= 0.1",
]
[project.optional-dependencies]
test = [
"pytest >= 8.0",
"pytest-cov >= 5.0",
"pytest-xdist >= 3.0",
"flaky >= 3.5",
"pytest-randomly >= 3.3",
"coverage[toml] >= 7.0",
"pytest-mpl >= 0.14",
]
dev = [
"black >= 24.0",
"isort >= 5.10",
"ruff >= 0.5",
]
docs = [
"joblib >= 1.0",
"Sphinx >= 7.0",
"sphinx-rtd-theme >= 2.0",
"sphinx-issues >= 4.0",
"sphinx_copybutton < 1.0",
"sphinxcontrib-bibtex >= 2.4",
"sphinx-design >= 0.6",
"sphinx-gallery < 1.0",
"sphinx-prompt >= 1.5",
"sphinx_codeautolink>=0.14",
]
all = [
"pyhdtoolkit[dev]",
"pyhdtoolkit[docs]",
"pyhdtoolkit[test]",
]
[project.urls]
homepage = "https://github.com/fsoubelet/PyhDToolkit"
repository = "https://github.com/fsoubelet/PyhDToolkit"
documentation = "https://fsoubelet.github.io/PyhDToolkit"
changelog = "https://fsoubelet.github.io/PyhDToolkit/release.html"
# ----- Testing Configuration ----- #
[tool.pytest.ini_options]
addopts = "--mpl --no-flaky-report --cov-report=xml --cov-report term-missing --cov-config=pyproject.toml --cov=pyhdtoolkit"
testpaths = ["tests"]
[tool.coverage.run]
source = ["pyhdtoolkit/"]
[tool.coverage.report]
ignore_errors = true
omit = [
"pyhdtoolkit/cpymadtools/setup.py",
"pyhdtoolkit/utils/htc_monitor.py",
]
precision = 2
# ----- Dev Tools Configuration ----- #
[tool.isort]
atomic = true
ensure_newline_before_comments = true
filter_files = true
force_grid_wrap = 0
force_single_line = false
include_trailing_comma = true
known_first_party = "pyhdtoolkit"
known_third_party = "pytest"
line_length = 110
lines_between_types = 1
multi_line_output = 3
use_parentheses = true
profile = "black"
[tool.black]
line-length = 120
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| tests/.*/setup.py
| acc-models-lhc
)/
'''
[tool.ruff]
ignore = [
"E501", # line-too-long
"FBT001", # boolean-type-hint-positional-argument
"FBT002", # boolean-default-value-positional-argument
"PT019", # pytest-fixture-param-without-value (but suggested solution fails)
]
line-length = 120
# Exclude a variety of commonly ignored directories.
exclude = ["pyhdtoolkit/cpymadtools/lhc/__init__.py"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10+.
target-version = "py310"