-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (128 loc) · 4.64 KB
/
pyproject.toml
File metadata and controls
145 lines (128 loc) · 4.64 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
[project]
name = "particula"
description = "a simple, fast, and powerful particle simulator"
readme = "readme.md"
requires-python = ">=3.12"
license = {file = "license"}
authors = [
{name = "Particula developers", email = "uncscode@users.noreply.github.com"},
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
keywords = [
"atmospheric", "particles", "climate", "aerosol", "particulate"
]
dependencies = [
"numpy>=2.0.0", "scipy>=1.14.0", "typing_extensions>=4.0.0",
"warp-lang",
]
# This is set automatically by flit using `particula.__version__`
dynamic = ["version"]
[project.urls]
homepage = "https://github.com/uncscode/particula"
repository = "https://github.com/uncscode/particula"
[project.optional-dependencies]
dev = [
"pytest", "pytest-cov", "jupyterlab",
"build", "jupyter-book", "ghp-import",
"mkdocs", "mkdocs-material[imaging]", "mkdocs-jupyter", "mkdocstrings[python]",
"mkdocs-gen-files", "mkdocs-literate-nav",
"griffe", "openai", "GitPython", "ruff", "mypy",
]
extra = [
"ipykernel", "nbclient", "nbconvert", "nbformat",
"matplotlib", "pandas", "pint", "thermo", "tqdm",
]
all = [
"particula[dev]",
"particula[extra]",
]
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
# Configuration for ruff, a fast Python linter and formatter #
[tool.ruff]
line-length = 80
fix = true
src = ["particula", "docs/Examples"]
include = ["particula/**/*.py", "docs/Examples/**/*.py"]
extend-exclude = [
"**/*.ipynb", # ignore every .ipynb anywhere in the project
]
[tool.ruff.format]
docstring-code-line-length = 80
[tool.ruff.lint]
select = [
"E", "F", "W", "C90", "D", "ANN", "B", "S", "N", "I"
]
ignore = [
# choose one of the conflicting class-blank-line rules:
"D203", # or drop this and keep D211 instead
"D205", # add back later
"D213", # or drop this and keep D212 instead
"D417", # Missing argument descriptions in the docstring
]
extend-ignore = [
"ANN", # ignore all missing-type-*/missing-return-type checks
]
[tool.ruff.lint.per-file-ignores]
# Ignore assert‐usage (S101) in any file ending with _test.py
"*_test.py" = ["S101", "E721", "B008"]
"docs/Examples/**/*.py" = ["D100", "D103", "INP001", "E501", "B905", "N816", "E402", "S101"]
[tool.ruff.lint.pydocstyle]
# enforce Google-style sections and disable incompatible rules
convention = "google" # accepts "google", "numpy", or "pep257"
[tool.pytest.ini_options]
testpaths = ["particula"]
norecursedirs = ["trees", ".git", "dist", "build", "particula/dynamics/wall_loss/tests"]
filterwarnings = [
"ignore:The NumPy module was reloaded.*:UserWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"performance: marks tests as performance-intensive (deselect with '-m \"not performance\"')",
"benchmark: marks tests as GPU benchmarks (enable with '--benchmark')",
]
# Configuration for pylint
[tool.pylint.main]
# Use multiple processes to speed up Pylint
jobs = 0
[tool.pylint.messages_control]
# Disable import-related warnings and other checks handled by ruff
disable = [
"line-too-long", # Line length handled by ruff
"import-error", # Don't check if imports can be resolved
"no-name-in-module", # Don't check module members (handled by mypy)
"wrong-import-order", # Import order handled by ruff (I rule)
"ungrouped-imports", # Import grouping handled by ruff
"wrong-import-position", # Import position handled by ruff
"cyclic-import", # Cyclic imports (can be overly strict)
"duplicate-code", # Duplicate code detection (too noisy)
"fixme", # Allow TODO/FIXME comments
"missing-module-docstring", # Module docstrings (handled by ruff D rules)
"missing-class-docstring", # Class docstrings (handled by ruff D rules)
"missing-function-docstring", # Function docstrings (handled by ruff D rules)
]
[tool.pylint.basic]
# Allow short variable names common in scientific computing
good-names = ["i", "j", "k", "n", "m", "x", "y", "z", "t", "p", "T", "P", "df", "ax"]
[tool.pylint.design]
# Maximum number of arguments for function/method (scientific functions can have many)
max-args = 10
[tool.mypy]
packages = ["particula"]
ignore_missing_imports = true
exclude = [
"docs/",
"trees/",
"build/",
"dist/",
]