-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
200 lines (169 loc) · 3.62 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[project]
name = "protosym"
dynamic = ["version"]
requires-python = ">=3.8"
license = "BSD-3-Clause"
description = "ProtoSym"
readme = "README.rst"
authors = [
{ name = "Oscar Benjamin", email = "[email protected]" },
]
classifiers = [
"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",
"License :: OSI Approved :: BSD License",
]
[project.optional-dependencies]
all = [
"numpy",
"sympy",
"llvmlite",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "VERSION.txt"
[tool.hatch.build]
include = [
"src",
"docs",
"tests",
"benchmarks",
"requirements-*.txt",
"noxfile.py",
"quicktest.sh",
"README.rst",
"CONTRIBUTING.rst",
"CODE_OF_CONDUCT.rst",
"LICENSE.rst",
"pyproject.toml",
"VERSION.txt",
]
[tool.hatch.build.targets.wheel]
packages = [
"src/protosym",
]
[tool.hatch.envs.test]
dependencies = [
"pytest",
"xdoctest[colors]",
"pytest-cov",
"coverage[toml]",
"sympy",
"numpy",
"llvmlite",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
doctest = "xdoctest --quiet {args:protosym all}"
coverage = "pytest --cov=protosym --cov-report=html {args:tests}"
[tool.hatch.envs.types]
dependencies = [
"mypy",
"pyright",
]
[tool.hatch.envs.types.scripts]
mypy-check = "mypy {args:src tests}"
pyright-check = "pyright {args:src tests}"
[tool.hatch.envs.pre-commit]
dependencies = [
"ruff",
"pre-commit",
"pre-commit-hooks",
]
[tool.hatch.envs.pre-commit.scripts]
run = "pre-commit run {args:--all-files --show-diff-on-failure}"
[tool.hatch.envs.docs]
dependencies = [
"sphinx",
"sphinx-rtd-theme",
"sphinx-autobuild",
]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -b html docs docs/_build"
serve = "sphinx-autobuild --open-browser --watch src --watch docs docs docs/_build"
[tool.hatch.envs.matrix]
dependencies = [
"pytest",
"xdoctest[colors]",
]
[[tool.hatch.envs.matrix.matrix]]
python = [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
]
[tool.hatch.envs.matrix.scripts]
test = "pytest {args:tests}"
doctest = "xdoctest --silent {args:protosym all}"
[tool.ruff.lint]
extend-select = [
"UP", # pyupgrade
"RUF", # ruff-specific checks
"C", # mccabe
"D", # pydocstyle
"I", # isort
"E", # pycodestyle
"W", # pycodestyle
"C4", # flake8-comprehensions
"T10", # flake8-debugger
# "PL", # pylint
]
extend-ignore = [
"RUF005", # list concatenation
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D100", "D104", "PLR2004", "PLR0124"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
testpaths = [
"tests",
]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
source = ["protosym"]
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_lines = [
"pragma: no cover",
"if _TYPE_CHECKING:",
"@overload",
]
[tool.mypy]
strict = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
[[tool.mypy.overrides]]
module = [
'jinja2',
'llvmlite',
'llvmlite.binding',
'py',
'pytest',
'symengine',
'numpy',
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"sympy",
"sympy.core.function",
"rust_protosym",
]
follow_imports = "skip"
ignore_missing_imports = true
[tool.pyright]
include = ["src", "tests"]
reportMissingImports = false