-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
246 lines (217 loc) · 8.45 KB
/
Copy pathpyproject.toml
File metadata and controls
246 lines (217 loc) · 8.45 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
240
241
242
243
244
245
246
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "maddening"
version = "0.3.1"
description = "Modular Automatic Differentiation and Data-Enhanced Neural-network INteracting Graph"
readme = "README.md"
license = "LGPL-3.0-or-later"
requires-python = ">=3.11"
authors = [
{ name = "Nicholas Ehsan Roy" },
]
keywords = [
"simulation",
"multi-physics",
"jax",
"differentiable-simulation",
"neural-surrogate",
"gpu",
"scientific-computing",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Visualization",
]
# Base install: simulation engine (CPU JAX + NumPy + PyYAML).
# For GPU acceleration, add the cuda12 or tpu extra.
dependencies = [
"jax>=0.10,<0.13",
"jaxlib>=0.10,<0.13",
"numpy>=1.24",
"pyyaml>=6.0",
]
[project.optional-dependencies]
# ── Hardware acceleration ──────────────────────────────────────────
# Base install gives CPU JAX. These upgrade to GPU/TPU.
# Combine with any other extra: pip install maddening[cuda12,server]
cuda12 = ["jax[cuda12]>=0.10,<0.13"]
tpu = ["jax[tpu]>=0.10,<0.13"]
# ── Differentiable linear solve (experimental pilot, v0.3.1) ────────
# `maddening.core.solver_utils.ift_linear_solve` lazy-imports lineax.
# Install this extra to use it: pip install maddening[ift]
ift = ["lineax>=0.0.7"]
# ── Cloud providers ────────────────────────────────────────────────
# One extra per provider. Installs SkyPilot WITH the provider SDK.
runpod = ["skypilot[runpod]>=0.11"]
lambda = ["skypilot[lambda]>=0.11"]
aws = ["skypilot[aws]>=0.11"]
gcp = ["skypilot[gcp]>=0.11"]
# All providers supported in maddening.cloud.providers (RunPod + Lambda)
cloud = ["skypilot[runpod,lambda]>=0.11"]
# Every provider SkyPilot supports
cloud-all = ["skypilot[all]>=0.11"]
# ── Feature modules (fine-grained) ─────────────────────────────────
# Matplotlib-based visualization (time-series, 2D scene renderers)
viz = ["matplotlib>=3.5"]
# Rich-based terminal renderer (works over SSH, no GUI needed)
terminal = ["rich>=12.0"]
# ZMQ network transport for remote visualization and command channels
network = ["pyzmq>=25.0"]
# FastAPI server for HTTP/WebSocket API
api = [
"fastapi>=0.100",
"uvicorn>=0.20",
"websockets>=11.0",
]
# Neural surrogate architectures and training
surrogates = ["equinox>=0.11", "optax>=0.1"]
# 3D visualization (server-side rendering with PyVista/VTK)
viz3d = ["pyvista>=0.42", "Pillow>=9.0"]
# GPU-accelerated 3D visualization (pygfx on WebGPU)
gpu-viz = ["pygfx>=0.16", "rendercanvas>=2.0", "glfw>=2.0", "scikit-image>=0.20"]
# OpenUSD integration (USD read/write, codeless schemas)
usd = ["usd-core>=21.8"]
# WebRTC streaming (GStreamer + signaling)
streaming = ["PyGObject>=3.42", "websockets>=11.0"]
# SBOM generation
sbom = ["cyclonedx-bom>=4.0"]
# zstd compression for the binary state encoder (v0.2 #6).
# Optional; falls back to uncompressed frames when absent.
compression = ["zstandard>=0.22"]
# ── Task bundles ───────────────────────────────────────────────────
# "I'm running a simulation server on a GPU" (Docker image target)
server = [
"fastapi>=0.100",
"uvicorn>=0.20",
"websockets>=11.0",
"pyzmq>=25.0",
"rich>=12.0",
"matplotlib>=3.5",
"zstandard>=0.22",
]
# "I'm a thin client viewing a remote simulation"
client = [
"pyzmq>=25.0",
"rich>=12.0",
]
# ── Meta extras ────────────────────────────────────────────────────
# Everything (all features + RunPod cloud)
all = [
"matplotlib>=3.5",
"rich>=12.0",
"pyzmq>=25.0",
"fastapi>=0.100",
"uvicorn>=0.20",
"websockets>=11.0",
"equinox>=0.11",
"optax>=0.1",
"pyvista>=0.42",
"Pillow>=9.0",
"pygfx>=0.16",
"rendercanvas>=2.0",
"glfw>=2.0",
"scikit-image>=0.20",
"skypilot[runpod,lambda]>=0.11",
"PyGObject>=3.42",
"zstandard>=0.22",
]
# CI testing -- headless-safe subset (no display-dependent packages)
#
# httpx2 is pulled alongside httpx because starlette's testclient
# auto-detects httpx2 when present and uses it preferentially. This
# closes the v0.2.1 StarletteDeprecationWarning loop (see C5 in
# plans/MADDENING_v0.3.0_PLAN.md).
ci = [
"pytest>=7.0",
"httpx>=0.24",
"httpx2>=2.0",
"matplotlib>=3.5",
"rich>=12.0",
"pyzmq>=25.0",
"fastapi>=0.100",
"uvicorn>=0.20",
"websockets>=11.0",
"equinox>=0.11",
"optax>=0.1",
"skypilot[runpod]>=0.11",
"zstandard>=0.22",
# FMI 3.0 round-trip validation (v0.3.0 A1). Test-only -- not a
# runtime dep of maddening.fmi.
"fmpy>=0.3",
# IFT coupling solver tests (v0.3.0 A4) and the sharded sparse
# iterative solver lineax-backed path (v0.3.0 A5). Both are
# lazy-imported at runtime, so lineax stays out of base
# dependencies; CI / dev installs need it explicitly. Promoting
# this to a user-facing [ift] extra + a friendlier import error
# is scheduled for v0.4.0 -- see plans/MADDENING_v0.4.0_PLAN.md.
"lineax>=0.0.7",
# Formal verification (stelling) and property-based testing (hypothesis).
# stelling[solvers] pulls z3-solver + cvc5 for full SMT escalation.
"stelling>=0.1",
"stelling[solvers]",
"hypothesis>=6.165,<7",
]
# Formal verification and property-based testing (user-facing).
# Downstream users who want to verify their own nodes install this.
verify = [
"stelling>=0.1",
"hypothesis>=6.165,<7",
]
# Development / testing (full -- requires display server for viz3d/gpu-viz)
dev = [
"pytest>=7.0",
"httpx>=0.24",
"httpx2>=2.0",
"fmpy>=0.3",
"lineax>=0.0.7",
"maddening[all]",
]
[project.urls]
Homepage = "https://microrobotica.org/maddening/"
Documentation = "https://microrobotica.org/maddening/"
Repository = "https://github.com/Microrobotics-Simulation-Framework/MADDENING"
Issues = "https://github.com/Microrobotics-Simulation-Framework/MADDENING/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/maddening"]
[tool.hatch.build.targets.wheel.force-include]
"src/maddening/usd/schema/generatedSchema.usda" = "maddening/usd/schema/generatedSchema.usda"
"src/maddening/usd/schema/plugInfo.json" = "maddening/usd/schema/plugInfo.json"
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"error",
# GraphManager.compile() emits informational warnings about disconnected
# nodes and cycle staggering -- expected in unit tests with minimal graphs.
"ignore:WARNING. node .* is disconnected:UserWarning",
"ignore:WARNING. cycle detected:UserWarning",
# RigidBody2DNode is deprecated but existing tests still exercise it
"ignore:RigidBody2DNode is deprecated:DeprecationWarning",
# ZMQ sockets not always cleanly closed in tests
"ignore::ResourceWarning:zmq",
"ignore::pytest.PytestUnraisableExceptionWarning",
# optax 0.2.x sets jax_pmap_shmap_merge which is deprecated in JAX 0.9+
"ignore:Setting `jax_pmap_shmap_merge`:DeprecationWarning",
# SelkiesRenderer emits PerformanceWarning on CPU fallback
"ignore::maddening.warnings.PerformanceWarning",
# SkyPilot deprecation warnings
"ignore:.*--cloud.*--region.*--zone.*deprecated:UserWarning",
]
# Custom markers — registered so `filterwarnings=["error"]` above
# doesn't elevate Unknown-Mark warnings to test errors. Mirrors the
# convention already in MIME's pyproject.toml.
markers = [
"slow: tests >5s wall-clock or that need a beefy machine (latency benchmarks, full-LBM smokes). Run with `pytest -m 'slow or not slow'`. Default suite excludes them.",
"gpu: tests that require a CUDA device (auto-skipped on CPU-only hosts).",
]
# Default-skip the slow lane in CI; opt in locally with
# pytest -m 'slow or not slow' (full suite)
# pytest -m slow (slow only)
addopts = "-m 'not slow'"