forked from hopr-framework/PyHOPE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (224 loc) · 7.4 KB
/
Copy pathpyproject.toml
File metadata and controls
249 lines (224 loc) · 7.4 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
# pyproject.toml compatible with Poetry (version 2.0+)
[project]
name = "PyHOPE"
version = "0.11.0"
description = "Python High-Order Preprocessing Environment"
license = "GPL-3.0-only"
requires-python = ">=3.10"
readme = "README.md"
authors = [
{name = "Numerics Research Group (NRG)", email = "numerics@iag.uni-stuttgart.de"},
]
maintainers = [
{name = "Patrick Kopper", email = "kopper@iag.uni-stuttgart.de"},
{name = "StephenCopplestone", email = "copplestone@boltzplatz.eu"}
]
dependencies = [
'alive-progress',
'h5py',
'hilbertcurve',
'meshio',
'numpy>=2.0.0',
'packaging',
'plotext',
'scipy',
'gmsh',
'typing-extensions',
# 'threadpoolctl'
]
keywords = ["PyHOPE", "mesh generator"]
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
[project.optional-dependencies]
numba = [ 'numba'
]
[project.urls]
homepage = "https://numericsresearchgroup.org"
documentation = "https://hopr-framework.github.io/PyHOPE"
repository = "https://github.com/hopr-framework/PyHOPE"
# PyPI is case-sensitive on the following entries
Issues = "https://github.com/hopr-framework/PyHOPE/issues"
Changelog = "https://github.com/hopr-framework/PyHOPE/blob/main/CHANGELOG.md"
[project.scripts]
pyhope = "pyhope.script.pyhope_cli:main"
# Build system
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# Legacy setuptools support
[tool.setuptools.packages.find]
include = ["pyhope*"]
# Code coverage
[tool.coverage.run]
omit = [
# Multiprocessing is disabled for code coverage
'*/pyhope/common/common_parallel.py',
# Git LFS is always available for code coverage
'*/pyhope/common/common_git.py',
# Gmsh does not get re-installed when running non-interactively
'*/pyhope/gmsh/gmsh_install.py',
]
[tool.coverage.report]
omit = [
# Multiprocessing is disabled for code coverage
'*/pyhope/common/common_parallel.py',
# Gmsh does not get re-installed when running non-interactively
'*/pyhope/gmsh/gmsh_install.py',
# Library functions are not called internally
'*/pyhope/__init__.py',
]
exclude_also = [
# Exclude if code block with abort
'if .+(?s:...)*?hopout\.error',
'if .+(?s:...)*?raise',
'if .+(?s:...)*?sys\.exit',
# Exclude if code block with continue/return
# 'if .+(?s:...)*?continue',
# 'if .+(?s:...)*?return',
# Exclude else code block with abort
'else .+(?s:...)*?hopout\.error',
'else .+(?s:...)*?raise',
'else .+(?s:...)*?sys\.exit',
# Exclude else code block with continue/return
# 'else .+(?s:...)*?continue',
# 'else .+(?s:...)*?return',
# Exclude except code block with abort
'except .+(?s:...)*?hopout\.error',
'except .+(?s:...)*?raise',
'except .+(?s:...)*?sys\.exit',
# Exclude except code block with continue/return
# 'except .+(?s:...)*?continue',
# 'except .+(?s:...)*?return',
# Exclude blank lines with abort
'hopout\.error',
'raise .+Error',
'sys\.exit',
# Exclude disabled blocks
'if 0:',
'if False:',
# Exclude multiprocessing blocks
'if np_mtp > 0:',
# Exclude interactive blocks
'if .+IsInteractive\(\)',
]
# Code linters
[tool.pyright]
stubPath = "./.typings"
typeCheckingMode = "standard"
reportUnknownArgumentType = false
reportUnknownMemberType = false
reportMissingParameterType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportMissingTypeStubs = false
reportMissingTypeArgument = false
reportOptionalMemberAccess = false
reportAny = false
reportExplicitAny = false
pythonVersion = "3.10"
reportTypeCommentUsage = true
deprecateTypingAliases = false
# Performance implications, > https://github.com/DetachHead/basedpyright/issues/461
reportImportCycles = false
reportUnsafeMultipleInheritance = false
enableExperimentalFeatures = false
[tool.uv]
python-preference = 'system'
[tool.ruff]
line-length = 132
indent-width = 4
force-exclude = true
# Exclude a variety of commonly ignored directories.
exclude = [
".git",
".pyenv",
".venv",
".vscode",
"dist",
"node_modules",
"site-packages",
"venv"
]
# Required Ruff version
required-version = ">=0.7.1"
show-fixes = true
# PyHOPE requires Python 3.10 or newer
target-version = "py310"
[tool.ruff.lint]
extend-select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"RET", # flake8-return
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TID", # flake8-tidy-imports
"PERF", # Perflint
"FURB", # refurb
"I", # isort
"NPY", # NumPy-specific rules
# "RUF", # Ruff-specific rules
]
ignore = [
"EXE001", # shebang-not-executable - we use shebang as file format identifier
"I001", # unsorted-imports - we use logical sorting instead of alphabetical
"RET501", # unnecessary-return-none - we want to be explicit about our return values
"RUF001", # ambiguous-unicode-character-string - we want to use all characters
"RUF100", # unused-noqa - we want to have multiple linters, thus sometimes more exceptions are necessary
"UP009", # utf8-encoding-declaration - we want to be explicit about our encoding
# "UP007", # non-pep604-annotation-union - we want explicit typing.Union annotations
"UP045", # non-pep604-annotation-optional - we want explicit typing.Optional annotations
"PLR0402", # manual-from-import - we want every import specify the module name
# INFO: False positives
"RET503", # implicit-return - ruff does not detect hopout.error[NoReturn]
# TODO: These should be fixed eventually
"BLE001", # blind-except - narrow errors and exceptions
"S110", # try-except-pass - implement feature.logger branch
"S112", # try-except-continue - implement feature.logger branch
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
# [tool.ty.src]
# # Monkey-patching meshio.xdmf.main.XdmfWriter
# exclude = ['pyhope/io/io_xdmf.py']
[tool.ty.rules]
# Type checker
invalid-argument-type = 'ignore'
invalid-assignment = 'ignore'
possibly-missing-attribute = 'ignore'
unresolved-attribute = 'ignore'
unsupported-operator = 'ignore'
unused-ignore-comment = 'ignore'
# unused-type-ignore-comment = 'ignore'
# Dead code
[tool.vulture]
paths = [
"pyhope",
"tools",
".github",
".gmsh"
]
ignore_names = [
# Exclude context manager
"Basis",
# Exclude debug function
"time_function",
# Exclude monkey-patching MeshIO
"__init__", "data_counter", "h5_file", "_meshio_to_gmsh_order",
# Exclude library functions
"Basis", "Mapping", "Mesh",
"mesh_format_to_tensor_product"
]
# Exclude unit tests
exclude = ["check_unittest.py"]
sort_by_size = true