-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
201 lines (187 loc) · 5.75 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
201
[build-system]
requires = ["setuptools>=68.2", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "pynonthermal"
authors = [{ name = "Luke J. Shingles", email = "[email protected]" }]
description = "A non-thermal electron deposition (Spencer-Fano equation) solver."
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Science/Research",
]
dynamic = ["version"]
requires-python = ">=3.10"
license = { file = "LICENSE" }
readme = { file = "README.md", content-type = 'text/markdown' }
dependencies = [
"artistools>=2024.07.04.2",
"matplotlib>=3.9.1",
"numpy>=1.19.4",
"pandas>=2.2",
"polars>=1.20.0",
"scipy>=1.5.4",
]
[dependency-groups]
dev = [
"mypy[faster-cache]>=1.14.1",
"pre-commit>=4.0.1",
"pytest>=6.2.2",
"pytest-codspeed>=2.2.1",
"pytest-cov>=2.10.1",
"pytest-xdist[psutil]>=3.6.1",
"ruff>=0.8.6",
"typeguard>=4.1.5",
]
[project.urls]
Repository = "https://www.github.com/lukeshingles/pynonthermal/"
[tool.mypy]
check_untyped_defs = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_any_unimported = false
disallow_incomplete_defs = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_defs = false
error_summary = true
enable_error_code = [
"comparison-overlap",
"ignore-without-code",
"redundant-expr",
"redundant-self",
"truthy-bool",
"unused-awaitable",
]
exclude = "(build)|(dist)|(tests)|(data)"
ignore_missing_imports = true
implicit_optional = false
implicit_reexport = true
packages = "pynonthermal"
plugins = 'numpy.typing.mypy_plugin'
pretty = true
python_version = '3.13'
scripts_are_modules = true
strict_equality = true
extra_checks = true
warn_redundant_casts = true
warn_unreachable = false
warn_unused_configs = true
warn_unused_ignores = true
[tool.pyright]
deprecateTypingAliases = true
enableTypeIgnoreComments = false # leave these for mypy to interpret
exclude = [
'**/node_modules',
'**/__pycache__',
'**/.*',
'build',
'dist',
'target',
]
reportAttributeAccessIssue = false
reportCallIssue = true
reportMissingImports = false
reportPossiblyUnboundVariable = false
reportUnecessaryTypeIgnoreComment = true
reportUnknownVariableType = false
typeCheckingMode = "standard"
useLibraryCodeForTypes = false
targetVersion = "3.10"
[tool.pytest.ini_options]
addopts = " --durations=0 --typeguard-packages=pynonthermal -n auto"
[tool.ruff]
line-length = 120
target-version = "py310"
fix = true
show-fixes = true
extend-exclude = ["_version.py"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ARG001", # ignored because variables in df.eval() are not detected
"ANN",
"B005", # strip-with-multi-characters
"B007", # variable not used in loop body (but sometimes it is with DataFrame.eval)
"B905", # zip without explicit strict parameter
"C901", # complex-structure
"COM812", # missing-trailing-comma
"CPY001", # missing-copyright-notice
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D107", # undocumented-public-init
"D203", # one-blank-line-before-class
"D205", # blank-line-after-summary
"D213", # multi-line-summary-second-line
"D417", # undocumented-param
"E501", # Line too long
"E741", # mixed-case-variable-in-global-scope
"ERA001", # commented-out-code
"FBT",
"FIX002", # line contains TODO
"ISC001", # single-line-implicit-string-concatenation
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"N806", # non-lowercase-variable-in-function
"N816", # variable-name-too-short
"N999", # invalid-module-name
"PD901", # df is a bad variable name
"PERF203", # try-except-in-loop
"PLC0414", # useless-import-alias
#"PGH001", # No builtin `eval()` allowed
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"PLW2901", # redefined-loop-name
"PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple`
"S101", # Use of assert detected
"S301", # suspicious-pickle-usage
#"S307", # suspicious-eval-usage
"S311", # suspicious-non-cryptographic-random-usage
"S603", # subprocess-without-shell-equals-true
"S607", # start-process-with-partial-path
"SLF001", # private-member-access
"T201", # print found
"TD002", # missing-todo-author
"TD003", # missing-todo-link
]
fixable = ["ALL"]
unfixable = [
"COM812", # missing-trailing-comma
"ERA001", # commented-out-code (will just delete it!)
"F401", # unused-import
"F841", # unused-variable
"SIM222", # expr-or-true
"SIM223", # expr-and-false
]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"artistools" = "at"
"matplotlib" = "mpl"
"matplotlib.pyplot" = "plt"
"matplotlib.typing" = "mplt"
"numpy.typing" = "npt"
"typing" = "t"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
force-single-line = true
order-by-type = false
[tool.setuptools]
packages = ["pynonthermal"]
include-package-data = true
license-files = ["LICENSE"]
[tool.setuptools_scm]
version_file = "_version.py"
local_scheme = "no-local-version"
[tool.vulture]
exclude = [".*", "build/", ".eggs/"]
paths = ["pynonthermal"]
sort_by_size = true