-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
267 lines (260 loc) · 9.44 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
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
[build-system]
requires = ["flit_core==3.9.0"]
build-backend = "flit_core.buildapi"
[project]
name = "c_therm_tci"
version = "0.0.0"
description = "Process data exported from the C-Therm TCi thermal conductivity analyzer."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
classifiers = ["License :: OSI Approved :: MIT License"]
dependencies = ["parsel>=1.8.1"]
[project.urls]
Changes = "https://blakeNaccarato.github.io/c-therm-tci/changelog.html"
Docs = "https://blakeNaccarato.github.io/c-therm-tci"
Home = "https://github.com/blakeNaccarato/c-therm-tci"
Tracker = "https://github.com/blakeNaccarato/c-therm-tci/issues"
[[project.authors]]
name = "Blake Naccarato"
email = "blake.naccarato@gmail.com"
[tool.coverage.run]
branch = true
source = [
"c_therm_tci",
"c_therm_tci_docs",
"c_therm_tci_tests",
"c_therm_tci_tools",
]
[tool.coverage.report]
ignore_errors = true
[tool.fawltydeps]
deps = ["pyproject.toml"]
code = ["src"]
[tool.pytest.ini_options]
addopts = '''
--strict-config
--strict-markers
--color yes
-p no:legacypaths
-r a
'''
cache_dir = ".cache/.pytest_cache"
markers = "slow"
testpaths = "tests"
xfail_strict = true
[tool.towncrier]
directory = "changelog"
filename = "CHANGELOG.md"
template = "changelog/towncrier_template.md.jinja"
title_format = ""
issue_format = "[#{issue}](https://github.com/blakeNaccarato/c-therm-tci/{issue})"
underlines = ["", "", ""]
[[tool.towncrier.section]]
path = ""
[[tool.towncrier.type]]
directory = "breaking"
name = "Backwards-incompatible changes"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "change"
name = "Changes"
showcontent = true
[tool.pyright]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/.*",
"bin",
"submodules/template",
"submodules/typings",
]
stubPath = "submodules/typings"
typeCheckingMode = "strict"
# Default "true" in strict
analyzeUnannotatedFunctions = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
disableBytesTypePromotions = true
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
# Default "false" in strict
deprecateTypingAliases = false
enableExperimentalFeatures = false
# Default "warning" in strict
reportMissingModuleSource = "warning"
# Default "error" in strict
reportMissingImports = "warning"
reportInvalidTypeForm = "warning"
reportUndefinedVariable = "warning"
reportAssertAlwaysTrue = "warning"
reportInvalidStringEscapeSequence = "warning"
reportInvalidTypeVarUse = "warning"
reportMissingTypeStubs = "none" # Overeager
reportSelfClsParameterName = "warning"
reportUnsupportedDunderAll = "warning"
reportUnusedExpression = "none" # Handled by Ruff
reportWildcardImportFromLibrary = "warning"
reportAbstractUsage = "warning"
reportArgumentType = "warning"
reportAssertTypeFailure = "warning"
reportAssignmentType = "warning"
reportAttributeAccessIssue = "warning"
reportCallIssue = "warning"
reportGeneralTypeIssues = "warning"
reportInconsistentOverload = "warning"
reportIndexIssue = "warning"
reportInvalidTypeArguments = "warning"
reportNoOverloadImplementation = "warning"
reportOperatorIssue = "warning"
reportOptionalSubscript = "warning"
reportOptionalMemberAccess = "warning"
reportOptionalCall = "warning"
reportOptionalIterable = "warning"
reportOptionalContextManager = "warning"
reportOptionalOperand = "warning"
reportRedeclaration = "warning"
reportReturnType = "warning"
reportTypedDictNotRequiredAccess = "warning"
reportPrivateImportUsage = "none" # Flaky regarding "not exported"
reportUnboundVariable = "warning"
reportUnusedCoroutine = "none" # Handled by Ruff
reportUnusedExcept = "warning"
reportFunctionMemberAccess = "warning"
reportIncompatibleMethodOverride = "warning"
reportIncompatibleVariableOverride = "warning"
reportOverlappingOverload = "warning"
reportPossiblyUnboundVariable = "warning"
reportConstantRedefinition = "none"
reportDeprecated = "warning"
reportDuplicateImport = "warning"
reportIncompleteStub = "warning"
reportInconsistentConstructor = "warning"
reportInvalidStubStatement = "warning"
reportMatchNotExhaustive = "warning"
reportMissingParameterType = "none"
reportMissingTypeArgument = "warning"
reportPrivateUsage = "none" # Ruff checks this well enough
reportTypeCommentUsage = "warning"
reportUnknownArgumentType = "none"
reportUnknownLambdaType = "none"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownVariableType = "none"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryContains = "warning"
reportUnnecessaryIsInstance = "warning"
reportUnusedClass = "none" # Handled by Ruff
reportUnusedImport = "none" # Handled by Ruff
reportUnusedFunction = "none" # Handled by Ruff
reportUnusedVariable = "none" # Handled by Ruff
reportUntypedBaseClass = "none"
reportUntypedClassDecorator = "warning"
reportUntypedFunctionDecorator = "none" # Often out of our control
reportUntypedNamedTuple = "warning"
# Default "none" in strict
reportCallInDefaultInitializer = "none"
reportImplicitOverride = "none"
reportImplicitStringConcatenation = "none"
reportImportCycles = "none"
reportMissingSuperCall = "none"
reportPropertyTypeMismatch = "none"
reportShadowedImports = "none"
reportUninitializedInstanceVariable = "warning" # Ensure we define instance vars
reportUnnecessaryTypeIgnoreComment = "none"
reportUnusedCallResult = "none"
[tool.ruff]
cache-dir = ".cache/.ruff_cache"
extend-exclude = ["bin", "submodules"]
extend-include = ["*.ipynb"]
src = ["src"]
output-format = "grouped"
fix = true
preview = true
show-fixes = true
[tool.ruff.lint]
fixable = ["ALL"]
select = [
"ALL", # Select all rules
"D417", # Explicitly enable parameter check even when using Numpy docstrings
]
unfixable = [
"PIE790", # Don't remove `pass`/`...`, overridden in pre-commit
]
ignore = [
"ANN", # Don't require type annotations
"ARG005", # Allow unused lambda argument. For consistency across df pipelines.
"C408", # Allow dict calls
"COM", # Allow magic commas and magic missing commas
"CPY001", # Don't check for copyright
"D105", # Allow missing docstring for magic methods
"DTZ", # Timezones are important, but only contextually necessary.
"E501", # Don't check line length. Black handles this.
"EM", # Don't check for exception message issues
"ERA", # False positives. Don't get rid of commented out code.
"FBT", # Allow boolean "traps"
"FIX002", # Allow TODOs
"FLY002", # Allow different string representations
"FURB118", # Incorrectly applies `itemgetter`
"FURB140", # Don't replace comprehensions with starmap
"G0", # Allow f-strings, etc. in Loguru logging
"ICN", # Don't require these ad-hoc "conventional" import names
"INP001", # False positives. Checks for packages missing `__init__.py`
"ISC", # False positives. Implicit string concatenation is fine.
"PD009", # Allow `df.iat`.
"PD011", # Allow use of `.values`. False positives.
"PD013", # Allow `stack` instead of `melt`. They're not a direct swap.
"PD101", # Allow use of nunique(). False positives
"PD901", # Allow `df` variable name. We are all consenting adults here.
"PD011", # Allow use of `.values`. False positives.
"PLR6201", # Don't require set literal for membership checks
"PGH003", # Until black stops wrapping special ignores, let's allow bare
"PIE804", # Allow dict unpack even if unnecessary, consisent for df.assign{**...}
"PLC2701", # Allow private name imports
"PLR0913", # Allow more than five function arguments
"PLR0914", # Allow lots of local variables
"PLR0917", # Allow more than five positional arguments
"PLR1704", # Allow redefining arguments, often for sanitization
"PLR2004", # Allow magic values. This check is too sensitive
"PLR6201", # Don't require set literal for membership checks
"PLR6301", # Allow methods that don't reference self, may be overridden
"PLW0108", # Don't warn about unnecessary lambda. Often needed in pandas chains
"PLW2901", # For loop variable
"RET", # Return checks are flaky, Sourcery does fine analysing these paths
"S301", # Don't warn about pickling.
"S403", # Don't warn about pickle-like modules.
"S404", # Don't warn about subprocess.
"TCH", # Type checking linter doesn't play nicely with pydantic
"TD", # Disable to-do validation. Too pedantic for now.
"TRY003", # Allow long exception messages
"W2", # Allow whitespace issues. Fixed automatically by black.
]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.extend-per-file-ignores]
"**/*.ipynb" = [
"B018", # Allow "useless" expressions, which do suppress outputs in notebooks
"E703", # Allow semicolons to suppress outputs in notebooks
"F821", # Allow undefined names, such as `display`
"S101", # Allow assert
"T201", # Allow print in notebooks
]
"docs/**" = [
"E402", # Need to allow imports below patches in docs notebooks
]
"tests/**" = [
"ARG001", # Allow unused arguments
"S101", # Allow assert
"SIM300", # Allow constants (expectations) on the RHS
"SLF001", # Allow private member access in tests
]