-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
283 lines (264 loc) · 7.13 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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "invert4geom"
authors = [
{ name = "Matt Tankersley", email = "[email protected]" },
]
description = "Constrained gravity inversion to recover the geometry of a density contrast."
requires-python = ">=3.9"
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
readme = "README.md"
version = "0.11.1"
license = {file = "LICENSE"}
keywords = ["inversion", "gravity", "geometry", "density", "Moho", "sediment", "geophysics", "geology", "geoscience"]
dependencies = [
###
# core
###
"numpy",
"pandas",
"xarray",
"verde>=1.8.0",
"rioxarray",
"pykdtree",
"xrft>=1.0",
"harmonica>=0.6.0",
"polartoolkit",
"numba",
"scipy<1.14", # issue with UQpy import
"numba_progress",
"tqdm",
"pygmt",
"dask",
"deprecation",
"pooch",
"scikit-learn",
###
# optimization
###
"optuna>=3.1.0", # need JournalStorage
"optuna-integration",
"botorch>=0.8.1", # need logie_candidates_func
"joblib",
"psutil",
###
# visualization
###
"pyvista",
"trame",
"ipywidgets",
"matplotlib",
"seaborn",
"ipython",
"plotly",
###
# uncertainty
###
"UQpy",
]
[project.optional-dependencies]
synth = [
"xesmf",
]
test = [
"pytest >=6",
"pytest-cov >=3",
"invert4geom",
]
docs = [
"sphinx>=4.0",
"myst_parser",
"sphinx_copybutton",
"sphinx_autoapi",
"sphinx_autodoc_typehints",
"sphinx-book-theme>=0.3",
"sphinx_design",
"nbsphinx",
"nbconvert",
"sphinxcontrib-bibtex",
]
dev = [
"invert4geom[test,docs, synth]",
"nox",
"pre-commit",
"pylint>=3.2",
"python-semantic-release >=8",
"ipykernel",
"jupyterlab",
"mypy",
]
all = [
"invert4geom[test,dev,docs,synth]",
]
[project.urls]
Homepage = "https://github.com/mdtanker/invert4geom"
Documentation = "https://invert4geom.readthedocs.io/"
"Bug Tracker" = "https://github.com/mdtanker/invert4geom/issues"
Discussions = "https://github.com/mdtanker/invert4geom/discussions"
Changelog = "https://invert4geom.readthedocs.io/en/latest/changelog.html"
[tool.coverage]
run.source = ["invert4geom"]
port.exclude_lines = [
'pragma: no cover',
'\.\.\.',
'if typing.TYPE_CHECKING:',
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-rA",
"--showlocals",
"--strict-markers",
"--strict-config",
"--cov", "--cov-report", "term-missing",
]
xfail_strict = true
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
"ignore::FutureWarning",
]
log_cli_level = "INFO"
testpaths = [
"tests",
]
markers = [
"use_numba: mark test functions that call Numba jitted functions",
]
[tool.mypy]
files = ["src"]
python_version = "3.9"
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "invert4geom.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[tool.ruff]
lint.select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
lint.ignore = [
"PLR", # Design related pylint codes
"G004", # Logging with f-strings
"PD901", # Bad variable name warning
"PD003", # Changes .isna to .isnull
"PD004", # Changes .notna to .notnull
"PD011", # Changes .values() to .to_numpy()
"ISC001", # Implicit string concatenation
]
src = ["src"]
lint.unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
"PD003", # Changes .isna to .isnull
"PD004", # Changes .notna to .notnull
"PD011", # Changes .values() to .to_numpy()
]
exclude = ["docs/index.md", "CHANGELOG.md"]
line-length = 88 # Set the maximum line length to 88.
lint.flake8-unused-arguments.ignore-variadic-names = true
lint.isort.required-imports = ["from __future__ import annotations"]
# Uncomment if using a _compat.typing backport
# typing-modules = ["invert4geom._compat.typing"]
extend-include = ["*.ipynb"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
"noxfile.py" = ["T20"]
"*.ipynb" = ["E402", "B018", "T201", "C408", "E712",]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = true
[tool.pylint]
py-version = "3.9"
# ignore-patterns = [".*.md",]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
similarities.min-similarity-lines = 5
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"wrong-import-position",
"cyclic-import",
]
[tool.semantic_release]
version_variables = ["src/invert4geom/__init__.py:__version__"]
version_toml = ["pyproject.toml:project.version"]
major_on_zero = false
build_command = """
python -m pip install build
python -m build .
"""
commit_parser = "angular"
[tool.semantic_release.branches.main]
match = "main"
prerelease = false
[tool.semantic_release.branches.notmain]
match = "(?!main)"
prerelease = true
[tool.semantic_release.changelog]
template_dir = "templates"
[tool.semantic_release.changelog.environment]
trim_blocks = true
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build", # Changes that affect the build system or external dependencies
"chore", # Changes to the build process or auxiliary tools and libraries such as documentation generation
"ci", # CI related changes
"docs", # Documentation only changes
"feat", # A new feature
"fix", # A bug fix
"perf", # A code change that improves performance
"style", # Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
"refactor", # A code change that neither fixes a bug nor adds a feature
"test", # Adding missing or correcting existing tests
]
# including BREAKING CHANGE: in the commit message will trigger a major release
minor_tags = ["feat"] # tags which result in minor releases
patch_tags = ["fix", "perf"] # tags which result in patch releases