-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
239 lines (218 loc) · 7 KB
/
pyproject.toml
File metadata and controls
239 lines (218 loc) · 7 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
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
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project]
name = "fwl-proteus"
version = "25.11.19"
description = "Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets"
readme = "README.md"
requires-python = ">=3.11"
authors = [
{name="Tim Lichtenberg", email="tim.lichtenberg@rug.nl"},
{name="Harrison Nicholls", email="contact@h-nicholls.space"},
{name="Laurent Soucasse", email="l.soucasse@esciencecenter.nl"},
{name="Mariana Sastre", email="m.c.villamil.sastre@rug.nl"},
{name="Emma Postolec", email="e.n.postolec@rug.nl"},
{name="Flavia Pascal", email="fpascal@astro.rug.nl"},
{name="Ben Riegler", email="ben.riegler@tum.de"},
{name="Hanno Spreeuw", email="h.spreeuw@esciencecenter.nl"},
{name="Dan J. Bower", email="dbower@ethz.ch"},
{name="Mark Hammond", email="mark.hammond@physics.ox.ac.uk"},
{name="Stef Smeets", email="s.smeets@esciencecenter.nl"},
{name="Robb Calder", email="rdc49@cam.ac.uk"},
{name="Raymond T. Pierrehumbert",email="raymond.pierrehumbert@physics.ox.ac.uk"},
]
keywords = [
"Astronomy",
"Exoplanets",
"Model-coupling",
]
license = {text = "Apache 2.0 License"}
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Astronomy",
]
dependencies = [
"attrs",
"cattrs",
"fwl-janus>=24.11.05",
"fwl-mors>=26.01.02",
"fwl-calliope>=25.05.01",
"fwl-zephyrus>=25.03.11",
"fwl-aragog>=26.01.06",
"fwl-zalmoxis>=26.01.06",
"fwl-vulcan>=26.04.22",
"boreas@git+https://github.com/ExoInteriors/BOREAS@0174edb",
"cmcrameri",
"juliacall",
"matplotlib",
"netCDF4",
"numpy>=2.0.0",
"pandas",
"scipy",
"pre-commit",
"platformdirs",
"ruff",
"sympy",
"astropy",
"torch",
"botorch",
"gpytorch",
"toml",
"zenodo-get",
"zenodo-client>=0.4.1",
"osfclient",
"packaging",
]
[project.urls]
homepage = "https://proteus-framework.org"
issues = "https://github.com/FormingWorlds/PROTEUS/issues"
source = "https://github.com/FormingWorlds/PROTEUS/"
documentation = "https://proteus-framework.org/proteus/"
changelog = "https://github.com/FormingWorlds/PROTEUS/releases"
[project.optional-dependencies]
develop = [
"bump-my-version",
# coverage[toml] enables standalone coverage tool with TOML config support (used by ratcheting script)
# pytest-cov provides pytest integration for "pytest --cov" convenience (slightly different from CI)
# Note: Both work independently; CI uses "coverage run -m pytest", developers can use either approach
"coverage[toml]",
"tomlkit>=0.11.0",
"pillow",
"pip-tools",
"pytest >= 8.1",
"pytest-cov",
"pytest-dependency",
"pytest-timeout",
]
docs = [
"zensical",
"mkdocs-material",
"markdown-include",
"mkdocs",
"mkdocstrings[python]",
"pymdown-extensions"
]
[project.scripts]
proteus = "proteus.cli:cli"
[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = true
[tool.setuptools.package-data]
proteus = ["juliapkg.json"]
[tool.coverage.run]
branch = true
source = ["proteus"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/conftest.py",
]
[tool.pytest.ini_options]
minversion = "8.1"
addopts = [
# Global coverage options removed from addopts.
# CI uses "coverage run -m pytest" with [tool.coverage.*] settings.
# For local development, use either:
# 1. "coverage run -m pytest" (matches CI behavior, compatible with coverage ratcheting)
# 2. "pytest --cov" (uses pytest-cov, convenient but slightly different from CI)
# Both approaches work; choose based on preference.
"--strict-markers",
"--strict-config",
"-ra",
"--showlocals",
]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"smoke: marks tests as smoke tests (quick validation with real binaries, 1 timestep, low res)",
]
[tool.coverage.report]
# Coverage threshold - automatically updated by CI when coverage increases.
# See: tools/update_coverage_threshold.py and .github/workflows/ci_tests.yml.
# The ratcheting (only ever increasing or staying the same) is enforced in CI;
# do not manually decrease this value in pyproject.toml.
fail_under = 59
show_missing = true
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"@abstractmethod",
"@abc.abstractmethod",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.proteus.coverage_fast]
# Fast CI (unit + smoke) coverage gate; ratcheted independently from full suite
# This lower bar is intended for mocked/fast tests only and will auto-increase
# when the fast suite gains coverage. Do not decrease manually.
fail_under = 44.45
[tool.ruff]
line-length = 96
target-version = "py312"
extend-exclude = ["*ipynb"]
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"I", # isort
]
ignore = [
"E501", # Line too long
"E741", # Ambiguous variable name
]
[tool.ruff.lint.isort]
known-first-party=["proteus"]
known-third-party=["zalmoxis"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
[tool.bumpversion]
# https://callowayproject.github.io/bump-my-version/howtos/calver/
current_version = "25.11.19"
parse = """(?x) # Verbose mode
(?P<release> # The release part
(?:[1-9][0-9])\\. # YY.
(?:1[0-2]|0[1-9])\\. # MM.
(?:3[0-1]|[1-2][0-9]|0[1-9]) # DD
)
(?:\\.(?P<patch>\\d+))? # .patch, optional
"""
serialize = ["{release}.{patch}", "{release}"]
[tool.bumpversion.parts.release]
calver_format = "{YY}.{0M}.{0D}"
[[tool.bumpversion.files]]
filename = "src/proteus/__init__.py"
search = "__version__ = '{current_version}'"
replace = "__version__ = '{new_version}'"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = "version: {current_version}"
replace = "version: {new_version}"