-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathpyproject.toml
More file actions
375 lines (352 loc) · 9.39 KB
/
pyproject.toml
File metadata and controls
375 lines (352 loc) · 9.39 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
[build-system]
requires = ["setuptools>=70.1", "wheel", "python-minifier"]
build-backend = "backend"
backend-path = ["_custom_build"]
[project]
name = "thermo"
version = "0.6.0"
description = "Chemical properties component of Chemical Engineering Design Library (ChEDL)"
readme = "README.rst"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Caleb Bell", email = "Caleb.Andrew.Bell@gmail.com"}
]
keywords = [
"chemical engineering", "chemistry", "mechanical engineering",
"thermodynamics", "databases", "cheminformatics", "engineering", "viscosity",
"density", "heat capacity", "thermal conductivity", "surface tension",
"combustion", "environmental engineering", "solubility", "vapor pressure",
"equation of state", "molecule"
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Education",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"fluids>=1.2.0",
"scipy>=1.6.0",
"pandas",
"chemicals>=1.4.0"
]
[project.optional-dependencies]
# Core testing (what all CI uses)
test = [
"pytest>=6.0",
"pytest-cov",
"pytest-xdist",
"sympy",
"fuzzywuzzy",
"pint",
"pytz",
"IPython",
"matplotlib",
"coveralls",
"sqlalchemy", # sqlite database for pandas
"mpmath",
"wheel",
]
# For multiarch CI (lighter, no pandas/matplotlib issues, no coverage for speed)
test-multiarch = [
"pytest>=6.0",
"sympy",
"fuzzywuzzy",
"pint",
"pytz",
"IPython",
"sqlalchemy", # Required for UNIFAC database generation
"mpmath",
"wheel",
]
# Optional performance boost (installed conditionally in CI)
numba = [
"numba",
"coverage>=7.6.1", # Required for numba 0.62+ compatibility
]
# Documentation
docs = [
"sphinx",
"numpydoc",
"nbsphinx",
"ipython",
"numba",
"sphinxcontrib-katex",
"sphinx-sitemap",
"sphinxcontrib-applehelp",
"sphinxcontrib-devhelp",
"sphinxcontrib-htmlhelp",
"sphinxcontrib-qthelp",
"sphinxcontrib-serializinghtml",
"sphinxcontrib.googleanalytics",
"matplotlib",
"pint",
"jacobi",
"numdifftools",
"mpmath",
]
# Linting and type checking
lint = ["ruff", "mypy"]
# Pre-release validation
prerelease = [
"thermo[test]",
"thermo[docs]",
"nbval",
"jacobi",
"numdifftools",
"mpmath",
]
# Security scanning (barebones for CI)
security = ["pip-audit", "bandit"]
# Local development (everything)
dev = [
"thermo[test,numba,docs,lint,security]",
"prek",
"wheel",
"build",
"twine",
]
[project.urls]
Homepage = "https://github.com/CalebBell/thermo"
Download = "https://github.com/CalebBell/thermo/tarball/0.6.0"
[tool.setuptools]
packages = ["thermo"]
[tool.setuptools.package-data]
thermo = [
"Critical Properties/*",
"Density/*",
"Electrolytes/*",
"Environment/*",
"Heat Capacity/*",
"Identifiers/*",
"Law/*",
"Misc/*",
"Phase Change/*",
"Reactions/*",
"Safety/*",
"Solubility/*",
"Interface/*",
"Triple Properties/*",
"Thermal Conductivity/*",
"Interaction Parameters/*",
"flash/*",
"phases/*",
"utils/*",
"group_contribution/*",
"Scalar Parameters/*",
"Interaction Parameters/ChemSep/*",
"Vapor Pressure/*",
"Viscosity/*"
]
[tool.coverage.run]
branch = true
relative_files = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
]
[tool.mypy]
exclude = [
"^_build/",
"^_custom_build/",
"^build/",
"^dist/",
".*\\.egg-info/",
"^venv/",
"^\\.venv/",
"^benchmarks/",
"^dev/",
"^notebooks/",
]
[[tool.mypy.overrides]]
module = [
"scipy.*",
"numba.*",
"mpmath.*",
"sympy.*",
"matplotlib.*",
"geopy.*",
"appdirs.*",
"pandas.*",
"pvlib.*",
"pint.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "fluids.numerics"
follow_imports = "skip"
ignore_errors = true
[[tool.mypy.overrides]]
module = "fluids.numerics.*"
ignore_errors = true
[tool.ruff]
line-length = 160
target-version = "py37"
exclude = ["*.pyi"]
[tool.ruff.lint]
select = ["ALL"]
extend-ignore = [
"FBT001", # boolean positional argument
"PD008", # .at with pandas is fine with me
"PD011", # Use .values instead of .to_numpy() - I prefer not to copy arrays
"RUF059", # Allow unused variables
"FIX002", # TODO are OK
"FIX004", # HACK is OK
"SIM109", # multiple equality comparisons are more performant than a set in small cases
"PLR1714", # multiple equality comparisons are more performant than a set in small cases
"D415", # First docstring line should end with a period, question mark, or exclamation point
"DTZ004", # utcfromtimestamp makes sense for atmosphere model
"PGH003", # type ignoring makes sense for numba-related things
"S102", # Yes, exec is dangerous but it can be quite useful as well
"PYI056", # changing __all__
"RUF012", # not using typing today
"PERF403", # obvious, use an autofix if one becomes available
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # PERF401 Use a list comprehension to create a transformed list
"PLR1730", # use of min/max are less performant than `if
"PLC0415", # Allow lazy imports
# thermo specific
"E701", # lots of this here
"S302", # marshal is OK
"SIM116", # 3 if statements does not require a dict
# maybe these
"PLE0605",
"PLE0604",
"TD002", "TD003", "TD004", "TD005",
# Originally from astropy's pyproject.toml, see about removing many of them later
"A00",
"ANN",
"ARG001", "ARG002", "ARG005",
"B004",
"B006",
"B007",
"B008",
"B904",
"BLE001",
"C408", "C416",
"C901",
"COM812",
"COM819",
"D101",
"D102",
"D103",
"D105",
"D107",
"D200",
"D203",
"D205",
"D212", "D213",
"D403",
"D404",
"D400",
"D401",
"D413",
"D414",
"D417",
"DTZ001", "DTZ007",
"E501",
# "E711",
"E721",
"E731",
"E741",
"EM",
"ERA001",
"F841",
"E722",
"FBT002", "FBT003",
"N8",
"PLR2004",
"PLR0911",
"PLR0912",
"PLR5501",
"PLR0913",
"PLR0915",
"PLW2901",
"PLW0603",
"PTH",
"RET",
"RSE102",
"RUF001",
"RUF003", # greek characters are used in this project e.g. for allotropes
"RUF005", # this one is not micropython compatible
"S101",
"S110",
"S112",
"S311",
"S310",
"SIM102",
"SIM105",
"SIM108",
"SIM114",
"SIM115",
"SIM118",
"SIM300",
"SLF001",
"T201",
"TRY003",
"TRY201",
"TRY300",
"TRY301",
"PYI024", # PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# Allow asserts and star imports in test files
"tests/**/*.py" = ["S101", "F403", "F405", "PT011", "B017", "TRY002"] # asserts, star imports, broad exceptions OK in tests
"**/test_*.py" = ["S101", "F403", "F405", "PT011", "B017", "TRY002"]
# Allow asserts and star imports in documentation examples
"docs/**/*.py" = ["S101", "F403", "F405", "PT011", "B017", "TRY002"]
"docs/**/*.ipynb" = ["S101", "F403", "F405", "PT011", "B017", "TRY002"]
[tool.pytest.ini_options]
addopts = "--doctest-glob='*.rst'"
norecursedirs = [".cache", ".git", "htmlcov", "notebooks", "dist", "build", "*.egg-info", ".tox", "surfaces", "prof", "benchmarks", "dev", "_build", "_custom_build", "__pycache__"]
doctest_optionflags = ["NORMALIZE_WHITESPACE"]
markers = [
"sympy: Uses sympy",
"mpmath: Uses mpmath",
"rdkit: Uses rdkit",
"fuzz: Test running on random input, slow",
"slow: Generally a slow enough test to not be ran often",
"plot: Creates plots",
"matplotlib: Uses matplotlib",
"numba: Uses numba",
"skip_types: do not run when generating types",
"parametric: parametric",
"CoolProp: CoolProp",
"meta_Chemical: meta_Chemical",
"meta_T_dept: meta_T_dept",
"deprecated: deprecated stuff that should eventually be replaced by new stuff",
"slow_envelope: slow envelopers",
"scipy: Needs scipy to work",
"numpy: Needs numpy to work",
"f2py: Needs f2py to work",
"pytz: Needs pytz to work",
"fitting: Uses regression to obtain parameters; slow",
"multiversion: Has another implementation (numba), test should automatically rerun",
]