-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
439 lines (418 loc) · 10.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
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
[project]
name = "gcages"
version = "0.3.1a1"
description = "Global Climate Assessment of Global Emission Scenarios, typically (but not always) produced by Integrated Assessment Models (IAMs)."
authors = [
{ name = "Zebedee Nicholls", email = "zebedee.nicholls@climate-resource.com" },
]
license = { text = "3-Clause BSD License" }
requires-python = ">=3.9"
dependencies = [
"backports-strenum>=1.3.1 ; python_full_version < '3.11'",
"numpy>=1.25.0",
"pandas>=2.2.0",
"pandas-openscm>=0.4.1",
]
readme = "README.md"
classifiers = [
# Full list: https://pypi.org/classifiers/
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"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",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://gcages.readthedocs.io"
Documentation = "https://gcages.readthedocs.io"
Changelog = "https://gcages.readthedocs.io/en/stable/changelog"
Repository = "https://github.com/openscm/gcages"
Issues = "https://github.com/openscm/gcages/issues"
[project.optional-dependencies]
ar6 = [
"aneris-iamc>=0.4.2 ; python_full_version >= '3.10'",
"openscm-runner>=0.13.0",
"pandas-indexing[units]>=0.6.3",
"pymagicc>=2.1.5",
"scipy>=1.13.0",
# Needed because of bad maintenance of scmdata
"scmdata>=0.17.0,<0.18",
"silicone>=1.3.0",
# Needed because of bad maintenance of scmdata
"xarray<2025",
]
progress = [
"tqdm>=4.0.0",
]
full = [
"gcages[ar6]",
"gcages[progress]",
]
[dependency-groups]
# The development dependencies are pinned
# to give a consistent starting point when using this template.
# They should be removed/updated/changed/loosened as suits your project.
# (As soon as you have a lock file, you can remove all of the implied dependencies.)
# (This is a workaround for the fact
# that we can't easily include the lock file in the copier template
# because of how locking works and the order of operations).
dev = [
# Key dependencies
# ----------------
"liccheck==0.9.2",
"mypy==1.14.0",
# Required for liccheck, see https://github.com/dhatim/python-license-check/pull/113
"pandas-indexing>=0.6.3",
"pandas-stubs>=2.2.2.240807",
"pip==24.3.1",
"pre-commit==4.0.1",
"pytest>=8.3.4",
# Required for liccheck, see https://github.com/dhatim/python-license-check/pull/113
"setuptools==75.6.0",
"towncrier==24.8.0",
"tqdm>=4.67.1",
"typing-extensions>=4.12.2",
]
docs = [
# Key dependencies
# ----------------
"attrs==24.3.0",
"mkdocs-autorefs==1.2.0",
"mkdocs-gen-files==0.5.0",
"mkdocs-literate-nav==0.6.1",
"mkdocs-material==9.5.49",
"mkdocs-section-index==0.3.9",
"mkdocs==1.6.1",
"mkdocstrings-python-xref==1.6.2",
"mkdocstrings-python==1.13.0",
"pymdown-extensions==10.13",
"ruff==0.8.6",
# Implied by the key dependencies above
# -------------------------------------
"babel==2.16.0",
"certifi==2024.12.14",
"charset-normalizer==3.4.1",
"click==8.1.8",
"colorama==0.4.6",
"ghp-import==2.1.0",
"griffe==1.5.4",
"idna==3.10",
"jinja2==3.1.5",
"markdown==3.7",
"markupsafe==3.0.2",
"mergedeep==1.3.4",
"mkdocs-get-deps==0.2.0",
"mkdocs-material-extensions==1.3.1",
"mkdocstrings==0.27.0",
"packaging==24.2",
"paginate==0.5.7",
"pathspec==0.12.1",
"platformdirs==4.3.6",
"pygments==2.19.1",
"python-dateutil==2.9.0.post0",
"pyyaml-env-tag==0.1",
"pyyaml==6.0.2",
"regex==2024.11.6",
"requests==2.32.3",
"six==1.17.0",
"urllib3==2.3.0",
"watchdog==6.0.0",
# Key dependencies for notebook_based_docs
# ----------------------------------------
"jupyterlab==4.3.4",
"jupytext==1.16.6",
"mkdocs-jupyter==0.25.1",
# Implied by the key dependencies above
# -------------------------------------
"anyio==4.8.0",
"appnope==0.1.4 ; sys_platform == 'darwin'",
"argon2-cffi-bindings==21.2.0",
"argon2-cffi==23.1.0",
"arrow==1.3.0",
"asttokens==3.0.0",
"async-lru==2.0.4",
"beautifulsoup4==4.12.3",
"bleach==6.2.0",
"cffi==1.17.1",
"comm==0.2.2",
"debugpy==1.8.11",
"decorator==5.1.1",
"defusedxml==0.7.1",
"executing==2.1.0",
"fastjsonschema==2.21.1",
"fqdn==1.5.1",
"h11==0.14.0",
"httpcore==1.0.7",
"httpx==0.28.1",
"ipykernel==6.29.5",
"isoduration==20.11.0",
"jedi==0.19.2",
"json5==0.10.0",
"jsonpointer==3.0.0",
"jsonschema-specifications==2024.10.1",
"jsonschema==4.23.0",
"jupyter-client==8.6.3",
"jupyter-core==5.7.2",
"jupyter-events==0.11.0",
"jupyter-lsp==2.2.5",
"jupyter-server-terminals==0.5.3",
"jupyter-server==2.15.0",
"jupyterlab-pygments==0.3.0",
"jupyterlab-server==2.27.3",
"markdown-it-py==3.0.0",
"matplotlib-inline==0.1.7",
"mdit-py-plugins==0.4.2",
"mdurl==0.1.2",
"mistune==3.0.2",
"nbclient==0.10.2",
"nbconvert==7.16.4",
"nbformat==5.10.4",
"nest-asyncio==1.6.0",
"notebook-shim==0.2.4",
"overrides==7.7.0",
"pandocfilters==1.5.1",
"parso==0.8.4",
"prometheus-client==0.21.1",
"prompt-toolkit==3.0.48",
"psutil==6.1.1",
"pure-eval==0.2.3",
"pycparser==2.22",
"python-json-logger==3.2.1",
"pywin32==308 ; platform_python_implementation != 'PyPy' and sys_platform == 'win32'",
"pywinpty==2.0.14 ; os_name == 'nt'",
"pyzmq==26.2.0",
"referencing==0.35.1",
"rfc3339-validator==0.1.4",
"rfc3986-validator==0.1.1",
"rpds-py==0.22.3",
"send2trash==1.8.3",
"setuptools==75.6.0",
"sniffio==1.3.1",
"soupsieve==2.6",
"stack-data==0.6.3",
"terminado==0.18.1",
"tinycss2==1.4.0",
"tornado==6.4.2",
"traitlets==5.14.3",
"types-python-dateutil==2.9.0.20241206",
"uri-template==1.3.0",
"wcwidth==0.2.13",
"webcolors==24.11.1",
"webencodings==0.5.1",
"websocket-client==1.8.0",
"seaborn>=0.13.2",
"pandas-indexing>=0.6.3",
"openscm-units>=0.6.3",
"pint>=0.24.4",
]
# For minimum test dependencies.
# These are used when running our minimum PyPI install tests.
tests-min = [
# Key dependencies
# ----------------
"pytest==8.3.4",
# Implied by the key dependencies above
# -------------------------------------
"colorama==0.4.6 ; sys_platform == 'win32'",
"iniconfig==2.0.0",
"packaging==24.2",
"pluggy==1.5.0",
]
# Full test dependencies.
tests-full = [
"pandas-indexing>=0.6.3",
"pytest-cov>=6.0.0",
]
# Test dependencies
# (partly split because liccheck uses toml,
# which doesn't support inhomogeneous arrays).
tests = [
{include-group = "tests-min"},
{include-group = "tests-full"},
"pyarrow>=19.0.1",
]
all-dev = [
{include-group = "dev"},
{include-group = "docs"},
{include-group = "tests"},
]
[build-system]
requires = [
"pdm-backend",
"pdm-build-locked",
]
build-backend = "pdm.backend"
[tool.pdm]
[tool.pdm.build]
locked = true
includes = [
"src/gcages",
"LICENCE",
]
[tool.coverage.run]
source = [
"src",
]
omit = [
"src/gcages/aneris_helpers.py", # should all be pushed upstream, not our problem
"src/gcages/ar6/*", # requires aneris which is only available in Python 3.10+
]
branch = true
[tool.coverage.report]
fail_under = 90
skip_empty = true
show_missing = true
exclude_also = [
"if TYPE_CHECKING",
# Type overloading lines
"@overload",
"\\.\\.\\.",
]
[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",
]
markers = [
# We skip some tests in CI by default
# because they are very slow
# and don't provide any true extra tests of robustness.
# We have separate CI for these.
"skip_ci_default: marks tests as being skipped in CI by default",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"superslow: marks tests as super slow i.e. taking multiple minutes to run (deselect with '-m \"not superslow\"')",
]
[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",
]
"docs/how-to-guides/how-to-run-the-ar6-workflow.py" = [
"E501",
"PLR2004",
]
"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 = "gcages"
package_dir = "src"
filename = "docs/changelog.md"
directory = "changelog/"
title_format = "## gcages {version} ({project_date})"
underlines = [
"",
"",
"",
]
issue_format = "[#{issue}](https://github.com/openscm/gcages/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",
"CMU License (MIT-CMU)",
"Historical Permission Notice and Disclaimer (HPND)",
"isc",
"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",
"The Unlicense (Unlicense)",
"zpl 2.1",
]
unauthorized_licenses = [
"agpl",
"gnu agpl",
"gpl v3",
"gplv3",
"gpl v2",
"gplv2",
"gpl v1",
"gplv1",
]