-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (204 loc) · 7.42 KB
/
pyproject.toml
File metadata and controls
228 lines (204 loc) · 7.42 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "gmat-sweep"
version = "0.4.0"
description = "Run parameter sweeps and Monte Carlo dispersions over GMAT missions in parallel from Python."
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Dimitrije Jankovic" }]
keywords = [
"gmat",
"astrodynamics",
"orbital-mechanics",
"mission-analysis",
"monte-carlo",
"parameter-sweep",
"parallel",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: System :: Distributed Computing",
"Typing :: Typed",
]
dependencies = [
"gmat-run>=0.3",
"pandas>=2.0",
"numpy>=1.24",
"joblib>=1.4",
"tqdm>=4.66",
"pyarrow>=14",
"scipy>=1.11",
]
[project.optional-dependencies]
dask = ["distributed>=2024.1"]
ray = ["ray[default]>=2.10"]
k8s = ["kubernetes>=29,<33"]
mpi = ["mpi4py>=3.1"]
plot = ["matplotlib>=3.8"]
polars = ["polars>=1.0"]
sensitivity = ["salib>=1.5"]
examples = ["matplotlib>=3.8", "distributed>=2024.1", "ray[default]>=2.10"]
[project.scripts]
gmat-sweep = "gmat_sweep.cli:main"
[project.urls]
Homepage = "https://github.com/astro-tools/gmat-sweep"
Documentation = "https://astro-tools.github.io/gmat-sweep/"
Repository = "https://github.com/astro-tools/gmat-sweep"
Issues = "https://github.com/astro-tools/gmat-sweep/issues"
Changelog = "https://github.com/astro-tools/gmat-sweep/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-xdist>=3.6",
"ruff>=0.6",
"mypy>=1.11",
"pandas-stubs",
]
docs = [
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.26",
"mkdocs-jupyter>=0.25",
# Satisfies tqdm.auto's IProgress dependency at notebook-execution time.
# Without it, every `jupyter execute --inplace` of an example notebook
# captures a TqdmWarning to stderr (which bakes the executor's local venv
# path into the committed cell output). Required at refresh time, not at
# docs-build time, so it lives here rather than as a runtime dependency.
"ipywidgets>=8.1",
]
[tool.hatch.build.targets.wheel]
packages = ["src/gmat_sweep"]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
[tool.mypy]
python_version = "3.10"
strict = true
files = ["src/gmat_sweep", "tests"]
# gmatpy is a runtime-discovered module from the user's GMAT install; do not type-check it.
[[tool.mypy.overrides]]
module = ["gmatpy", "gmatpy.*", "load_gmat"]
ignore_missing_imports = true
# joblib ships no py.typed marker; backends/joblib.py treats the loky surface as Any
# inside a small typed wrapper.
[[tool.mypy.overrides]]
module = ["joblib", "joblib.*"]
ignore_missing_imports = true
# pyarrow ships partial stubs but the dataset API surface used by aggregate.py
# trips mypy --strict; treat the import as Any inside the small surface used here.
[[tool.mypy.overrides]]
module = ["pyarrow", "pyarrow.*"]
ignore_missing_imports = true
# tqdm ships no py.typed marker; sweep.py imports tqdm.auto and only uses the
# .update / .close surface for the orchestrator's progress bar.
[[tool.mypy.overrides]]
module = ["tqdm", "tqdm.*"]
ignore_missing_imports = true
# scipy ships no py.typed marker; distributions.py imports scipy.stats and
# the rv_frozen base class for the small surface used by to_rv_frozen / sample.
[[tool.mypy.overrides]]
module = ["scipy", "scipy.*"]
ignore_missing_imports = true
# distributed (Dask) is an optional [dask]-extra dependency; backends/dask.py
# treats the surface used (LocalCluster, Client, as_completed) as Any.
# `follow_imports = "skip"` is needed alongside `ignore_missing_imports`
# because distributed ships a `py.typed` marker — without skip, mypy --strict
# imports the package's types and rejects calls to its (loosely typed) surface
# under disallow_untyped_calls.
[[tool.mypy.overrides]]
module = ["distributed", "distributed.*"]
ignore_missing_imports = true
follow_imports = "skip"
# ray is an optional [ray]-extra dependency; same handling as distributed
# above (ray also ships `py.typed`).
[[tool.mypy.overrides]]
module = ["ray", "ray.*"]
ignore_missing_imports = true
follow_imports = "skip"
# kubernetes is an optional [k8s]-extra dependency; same handling as
# distributed and ray above (the kubernetes client also ships `py.typed`).
[[tool.mypy.overrides]]
module = ["kubernetes", "kubernetes.*"]
ignore_missing_imports = true
follow_imports = "skip"
# mpi4py is an optional [mpi]-extra dependency; backends/mpi.py treats the
# surface used (mpi4py.futures.MPIPoolExecutor) as Any. mpi4py ships a
# `py.typed` marker, so `follow_imports = "skip"` is needed to avoid
# strict-mode rejection of upstream's typed surface, matching the
# distributed / ray / kubernetes overrides above.
[[tool.mypy.overrides]]
module = ["mpi4py", "mpi4py.*"]
ignore_missing_imports = true
follow_imports = "skip"
# matplotlib is an optional [plot]-extra dependency; plotting.py imports
# it lazily inside each helper so `import gmat_sweep.plotting` succeeds
# without the extra. Treat the import as Any so the typecheck CI cell
# (which does not install [plot]) keeps passing.
[[tool.mypy.overrides]]
module = ["matplotlib", "matplotlib.*"]
ignore_missing_imports = true
follow_imports = "skip"
# polars is an optional [polars]-extra dependency; aggregate.py imports it
# lazily inside _to_polars only, so the default install path never touches
# polars. polars ships a `py.typed` marker, so `follow_imports = "skip"` is
# needed alongside `ignore_missing_imports` for the typecheck cell that
# does not install the extra.
[[tool.mypy.overrides]]
module = ["polars", "polars.*"]
ignore_missing_imports = true
follow_imports = "skip"
# SALib is an optional [sensitivity]-extra dependency; sensitivity.py imports
# SALib.sample.sobol / SALib.analyze.sobol lazily inside each function. SALib
# ships partial type information that trips strict-mode rejection, so
# `follow_imports = "skip"` accompanies the missing-imports tolerance.
[[tool.mypy.overrides]]
module = ["SALib", "SALib.*"]
ignore_missing_imports = true
follow_imports = "skip"
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
# Default to unit tests only. Integration tests opt in with `-m integration`
# (or `-m "integration or not integration"` to run both layers in one go).
addopts = "-ra --strict-markers --strict-config -m 'not integration'"
markers = [
"integration: tests that require a working GMAT install (deselect with -m 'not integration')",
"slow: long-running integration tests (e.g. throughput regression); selected only by the dedicated CI cell via -m 'integration and slow'",
]
[tool.coverage.run]
source = ["src/gmat_sweep"]
branch = true
[tool.coverage.report]
show_missing = true
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
]