-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
231 lines (197 loc) · 5.45 KB
/
pyproject.toml
File metadata and controls
231 lines (197 loc) · 5.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
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "numpy>=2.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "swarmgpt"
version = "0.0.1"
description = "Drone swarm dancing choreographies using LLMs and optimization-based collision avoidance"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
]
########################
# Pip Dependencies
########################
dependencies = [
"fire",
"toml",
"einops",
"numpy>=2.0.0,<2.5.0",
"scipy>=1.17.0,<1.18.0",
"tqdm",
"pyyaml",
# LLM packages
"ollama",
"openai",
# Webinterface
"fastapi>=0.115.0,<1.0.0",
"uvicorn[standard]>=0.32.0,<1.0.0",
# Media management
"libfmp>=1.3.0",
"python-vlc",
"mutagen",
"imageio>=2.37.0,<3",
"av>=15.1.0,<18",
]
# option[sim]: basic simulation
[project.optional-dependencies]
sim = [
"axswarm @ git+https://github.com/learnsyslab/axswarm.git",
"crazyflow==0.1.0",
"drone-models==0.1.0",
"drone-controllers==0.1.0",
"jax >= 0.7",
]
# option[deploy]: deploy to real drones
deploy = [
"cflib2 @ git+https://github.com/bitcraze/crazyflie-lib-python-v2.git",
"drone-estimators",
]
[tool.setuptools.packages]
find = {}
[tool.setuptools.package-data]
lsy_drone_racing = ["envs/assets/*.xml", "envs/assets/*.png"]
[tool.pytest.ini_options]
markers = ["unit", "integration"]
########################
# Pixi Sessions
########################
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.activation]
scripts = ["openai_api_key.sh", "tools/frontend_install.sh"]
# environments
[tool.pixi.environments]
default = { features = ["sim"], solve-group = "default" }
deploy = { features = ["sim", "kilted", "deploy"] }
docs = { features = ["docs"] }
tests = { features = ["tests", "sim", "kilted", "deploy"] }
[tool.pixi.dependencies]
# Environment packages
openblas = ">=0.3.30,<0.4"
ruff = "*"
python = ">=3.12.0,<3.13"
nodejs = ">=22.12.0,<23"
pip = ">=25.0.1,<26"
rust = ">=1.95.0,<1.96"
packaging = "<26" # Necessary for cflib2
maturin = ">=1.13.3,<2"
[tool.pixi.tasks]
api = { cmd = "python swarm_gpt/launch.py", description = "Serve the SwarmGPT browser API and built frontend", depends-on = ["web-build"] }
web-dev = { cmd = "npm --prefix web run dev", description = "Serve the browser frontend with Vite" }
web-build = { cmd = "npm --prefix web run build", description = "Build the browser frontend" }
[tool.pixi.pypi-dependencies]
swarmgpt = { path = ".", editable = true }
# feature[kilted]
[tool.pixi.feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]
[tool.pixi.feature.kilted.dependencies]
# Build tools
compilers = ">=1.9.0, <1.11.0"
cmake = "==3.26.0" # Pinned for motion_capture_tracking
pkg-config = "*"
make = "==4.4.1"
ninja = "*"
# ROS specific tools
rosdep = "*"
colcon-common-extensions = "*"
# Kilted specific tools
ros-kilted-desktop = "*"
ros2-distro-mutex = "0.12.*"
[tool.pixi.feature.kilted.activation]
scripts = ["tools/setup_mocap.sh"]
# feature[tests]
[tool.pixi.feature.tests.dependencies]
pytest = ">=8.4.1"
pytest-timeout = ">=2.1.0"
pytest-cov = ">=6.0.0"
array-api-strict = ">=2.4.1"
[tool.pixi.feature.tests.pypi-dependencies]
torch = ">=2.7.0" # For doctests
jax = ">=0.7.0"
# pytest-markdown-docs = "*"
[tool.pixi.feature.tests.tasks]
tests = { cmd = "pytest -v tests", description = "Run tests" }
# feature[docs]
[tool.pixi.feature.docs.dependencies]
mkdocs = "*"
mkdocs-material = "*"
click = "8.2.1.*" # https://github.com/mkdocs/mkdocs/issues/4032
[tool.pixi.feature.docs.pypi-dependencies]
mkdocstrings = { version = "*", extras = ["python"] }
mkdocs-gen-files = "*"
mkdocs-literate-nav = "*"
mkdocs-section-index = "*"
[tool.pixi.feature.docs.tasks]
docs-serve = { cmd = "mkdocs serve", description = "Serve docs locally" }
docs-build = { cmd = "mkdocs build", description = "Build docs" }
########################
# ruff Settings
########################
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"docs/conf.py",
"tools/*",
]
line-length = 100
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I", "D", "TCH", "ANN"]
ignore = ["ANN401"]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.isort] # Prevent ruff from reporting conflicting settings with isort
split-on-trailing-comma = false
[tool.ruff.lint.per-file-ignores]
"scripts/*" = ["D", "ANN"]
"experiments/*" = ["D", "ANN"]
"tests/*" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-annotations]
suppress-dummy-args = true
suppress-none-returning = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = true
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"