-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
188 lines (166 loc) · 4.12 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
[tool.poetry]
name = "volcano-cooking"
version = "1.0.0"
description = "Make some volcanoes and simulate them in CESM2"
authors = ["engeir <[email protected]>"]
license = "GPL-3.0-or-later"
readme = "README.md"
[tool.poetry.scripts]
volcano-cooking = "volcano_cooking.__main__:main"
view-frc = "volcano_cooking.view_force:main"
sfrc-sparse2lin = "volcano_cooking.sparse_to_lin:main"
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
numpy = ">=1.21.1,<3.0.0"
scipy = "^1.7.1"
matplotlib = "^3.4.2"
PyWavelets = "^1.1.1"
click = "^8.0.1"
cftime = "^1.5.0"
netCDF4 = "^1.5.8"
superposed-pulses = "^1.3"
wget = "^3.2"
dask = ">=2022.3,<2025.0"
cosmoplots = ">=0.1.5,<0.3.0"
importlib-metadata = ">=5,<9"
xarray = ">=2023.12,<2025.0"
[tool.poetry.dev-dependencies]
coverage = "^7.6"
pre-commit = "^3.7.1"
pre-commit-hooks = "^4.6.0"
pyupgrade = "^3.16.0"
pytest = "^8.2.2"
pytest-cov = "^5.0.0"
mypy = "^1.11"
xdoctest = "^1.1.5"
[tool.poetry.group.dev.dependencies]
ruff = ">=0.4.9,<0.6.0"
pydoclint = ">=0.4.1,<0.6.0"
pydocstringformatter = "^0.7.3"
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
source = ["volcano_cooking"]
[tool.coverage.report]
show_missing = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
files = ["src"]
ignore_missing_imports = true
allow_redefinition = false
check_untyped_defs = true
ignore_errors = false
implicit_reexport = false
local_partial_types = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.ruff]
# Same as Black.
line-length = 88
# Files that were downloaded
extend-exclude = []
# Allow unused variables when underscore-prefixed.
# Assume Python 3.9
target-version = "py39"
[tool.ruff.lint]
per-file-ignores = {}
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [ # https://docs.astral.sh/ruff/rules/
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"NPY201",
"PL", # pylint
"Q", # flake8-quotes
"UP", # pyupgrade
]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
# select = ["E4", "E7", "E9", "F"] # These are the default
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
ignore = [
# "COM812", # Since we don't select COM, this is already ignored
# "COM819", # Since we don't select COM, this is already ignored
"D206",
"D300",
"E111",
"E114",
"E117",
"E266",
"E501",
# "ISC001", # Since we don't select ISC, this is already ignored
# "ISC002", # Since we don't select ISC, this is already ignored
"PLR0913", # Sometimes we want a lot of function signatures (6 not enough)
"Q000",
"Q001",
"Q002",
"Q003",
# "W191", # Since we don't select W, this is already ignored
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = ["typing.overload"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-import-conventions.aliases]
# Declare the default aliases.
"matplotlib.pyplot" = "plt"
numpy = "np"
scipy = "sp"
xarray = "xr"
[tool.ruff.lint.isort]
case-sensitive = true
known-local-folder = ["src", "de_verify"]
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
profile = "black"
combine_as_imports = true
[tool.pydocstringformatter]
write = true
strip-whitespaces = true
split-summary-body = false
numpydoc-section-hyphen-length = false
style = ["pep257", "numpydoc"]