-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (124 loc) · 4.35 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (124 loc) · 4.35 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
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "fwl-morrigan"
dynamic = ["version"]
description = "Accretion and dynamical evolution of a system of protoplanets via giant impacts."
readme = "README.md"
authors = [
{name = "Anna Grace Ulses", email = "aulses@uw.edu"},
{name = "Tim Lichtenberg", email = "tim.lichtenberg@rug.nl"},
]
license = {text = "Apache 2.0 License"}
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
]
keywords = ["exoplanet", "planet formation", "giant impacts"]
requires-python = '>=3.11'
dependencies = [
'astropy',
'numpy',
'pylaplace',
'toml',
]
[project.urls]
homepage = "https://github.com/FormingWorlds/Morrigan"
issues = "https://github.com/FormingWorlds/Morrigan/issues"
[project.scripts]
morrigan = "morrigan.driver:cli"
[project.optional-dependencies]
# Only plot.py needs these; the model itself does not, so a framework that
# imports morrigan does not pull a plotting stack in with it.
plot = [
"matplotlib",
"scipy",
]
develop = [
"coverage[toml]",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-timeout",
"ruff",
]
docs = [
"zensical",
"markdown-include",
"pymdown-extensions",
"mkdocstrings[python]",
]
[tool.setuptools]
package-dir = {"morrigan" = "src/morrigan"}
include-package-data = true
[tool.setuptools_scm]
# CalVer: tags are bare YY.MM.DD dates (no leading 'v', e.g. 26.07.22), matching
# the rest of the PROTEUS ecosystem. setuptools-scm derives the version from the
# latest git tag, so a release is cut by tagging alone and no version string is
# hand-edited in the tree. version_scheme = "no-guess-dev" is required for
# CalVer: the default would invent a future calendar date for post-tag commits
# that collides with the next daily release tag.
version_scheme = "no-guess-dev"
version_file = "src/morrigan/_version.py"
# Source tarballs (a GitHub "Download ZIP" or an auto-generated tag archive)
# carry no git metadata, so setuptools-scm cannot derive a version and the
# build aborts. Fall back rather than fail.
fallback_version = "0.0.0"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"unit: fast in-process unit tests (mocked dependencies, < 100 ms each)",
"smoke: real code-path tests on minimal input (< 30 s each)",
"integration: multi-module tests on a full system",
"slow: anything > 1 minute, run in nightly only",
"physics_invariant: marks tests that assert a physical invariant (conservation, positivity, boundedness, monotonicity, symmetry).",
"reference_pinned: marks tests that pin behaviour against a published benchmark, analytical limit, or cross-implementation cross-check. Cite the source in the test docstring.",
]
[tool.coverage.run]
branch = true
source = ["morrigan"]
[tool.coverage.report]
# Full gate (unit + smoke + integration + slow). One-way ratchet via
# tools/update_coverage_threshold.py, capped at the 90 percent ecosystem
# ceiling; never manually decreased. The initial floor carries a one-point
# margin below the measured value to absorb platform and dependency drift
# between environments; the ratchet closes it from CI-measured coverage.
fail_under = 89.0
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[tool.ruff]
line-length = 96
target-version = "py310"
# setuptools-scm writes _version.py at build time in its own style, and the file
# is not tracked, so nobody can bring it into line and a check over src/ would
# fail on it in any fresh checkout.
extend-exclude = ["src/morrigan/_version.py"]
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"I", # isort
]
ignore = [
"E501", # Line too long
"E741", # Ambiguous variable name (physics notation uses single letters)
]
[tool.ruff.lint.isort]
known-first-party = ["morrigan"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
[tool.morrigan.coverage_fast]
# Fast gate (unit + smoke), checked on every pull request. One-way ratchet
# via tools/update_coverage_threshold.py, capped at the 90 percent
# ecosystem ceiling; never manually decreased.
fail_under = 88.71