-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
247 lines (230 loc) · 4.9 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
[project]
name = "openscm-calibration"
version = "0.6.2a1"
description = "Calibration tools for simple climate models (with potential for applications elsewhere)"
authors = [
{ name = "Zebedee Nicholls", email = "zebedee.nicholls@climate-energy-college.org" },
]
license = {text = "BSD-3-Clause"}
requires-python = ">=3.9"
dependencies = [
"attrs",
"more-itertools",
"numpy",
"pint",
"typing-extensions",
]
readme = "README.md"
classifiers = [
"License :: OSI Approved :: BSD License",
]
[project.optional-dependencies]
plots = [
"corner~=2.0",
"ipython~=8.18",
"matplotlib~=3.7",
"pandas~=2.2",
"seaborn~=0.13",
]
scmdata = [
"scmdata~=0.17",
]
[build-system]
requires = [
"pdm-backend",
"pdm-build-locked",
]
build-backend = "pdm.backend"
[tool.pdm]
[tool.pdm.build]
locked = true
includes = [
"src/openscm_calibration",
"LICENCE",
]
[tool.pdm.dev-dependencies]
dev = [
"pre-commit>=3.8.0",
"mypy>=1.11",
"towncrier>=24.8.0",
"liccheck>=0.9.2",
# Required for liccheck
"setuptools>=74.1.2",
"pip>=24.2",
"pandas-stubs>=2.2.2.240807",
"types-seaborn>=0.13.2.20240820",
"types-tqdm>=4.66.0.20240417",
]
docs = [
"attrs>=24.0.0",
"mkdocs>=1.6.0",
"mkdocs-autorefs>=1.2.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-jupyter>=0.24.8",
"mkdocs-literate-nav>=0.6.1",
"mkdocs-material>=9.5.34",
"mkdocs-section-index>=0.3.9",
"mkdocstrings[python]>=0.25.0",
"pymdown-extensions>=10.9",
"jupyterlab>=4.2.0",
"jupytext>=1.16.3",
"matplotlib>=3.7.1",
"corner~=2.0",
"seaborn~=0.13",
"emcwrap~=0.2",
"multiprocess~=0.70",
"openscm-units~=0.6",
"tqdm~=4.66",
"h5py~=3.11",
"ipywidgets~=8.1",
"scipy~=1.13",
]
tests = [
"pytest>=8.3.3",
"coverage>=7.6.0",
"pytest-cov>=5.0.0",
"emcee~=3.1",
"multiprocess~=0.70",
]
[tool.coverage.run]
source = [
"src",
]
branch = true
omit = [
# Covered by docs at the moment, but should probably be independently tested
"src/openscm_calibration/emcee_plotting.py",
"src/openscm_calibration/parameter_handling.py",
# Covered by docs
"src/openscm_calibration/calibration_demo.py",
]
[tool.coverage.report]
fail_under = 90
skip_empty = true
show_missing = true
exclude_also = [
"if TYPE_CHECKING",
]
[tool.mypy]
strict = true
disallow_any_unimported = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
follow_imports = "normal"
[tool.jupytext]
formats = "ipynb,py:percent"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
[tool.ruff]
src = [
"src",
]
target-version = "py39"
line-length = 88
[tool.ruff.lint]
select = [
"E",
"W",
"F",
"I",
"D",
"PL",
"TRY",
"NPY",
"RUF",
"UP",
"S",
]
unfixable = [
"PD002",
]
ignore = [
"D200",
"D400",
"UP007",
]
[tool.ruff.lint.per-file-ignores]
"test*.py" = [
"D",
"S101",
"PLR2004",
]
"docs/*" = [
"D100",
"E402",
"S101",
]
"scripts/*" = [
"S101",
]
"stubs/*" = [
"PLR0913",
]
[tool.ruff.lint.isort]
known-first-party = [
"src",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
docstring-code-format = true
[tool.towncrier]
package = "openscm_calibration"
package_dir = "src"
filename = "docs/changelog.md"
directory = "changelog/"
title_format = "## OpenSCM Calibration {version} ({project_date})"
underlines = [
"",
"",
"",
]
issue_format = "[#{issue}](https://github.com/openscm/OpenSCM-Calibration/pull/{issue})"
type = [
{ directory = "breaking", name = "⚠️ Breaking Changes", showcontent = true },
{ directory = "deprecation", name = "🗑️ Deprecations", showcontent = true },
{ directory = "feature", name = "🆕 Features", showcontent = true },
{ directory = "improvement", name = "🎉 Improvements", showcontent = true },
{ directory = "fix", name = "🐛 Bug Fixes", showcontent = true },
{ directory = "docs", name = "📚 Improved Documentation", showcontent = true },
{ directory = "trivial", name = "🔧 Trivial/Internal Changes", showcontent = false },
]
[tool.liccheck]
authorized_licenses = [
"bsd",
"bsd license",
"BSD 3-Clause",
"CC0",
"apache",
"apache 2.0",
"apache software",
"apache software license",
"Apache License, Version 2.0",
"Historical Permission Notice and Disclaimer (HPND)",
"isc license",
"isc license (iscl)",
"gnu lgpl",
"lgpl with exceptions or zpl",
"LGPLv2+",
"GNU Lesser General Public License v2 (LGPLv2)",
"GNU Lesser General Public License v2 or later (LGPLv2+)",
"mit",
"mit license",
"Mozilla Public License 2.0 (MPL 2.0)",
"python software foundation",
"python software foundation license",
"zpl 2.1",
]
unauthorized_licenses = [
"agpl",
"gnu agpl",
"gpl v3",
"gplv3",
"gpl v2",
"gplv2",
"gpl v1",
"gplv1",
]