-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathpyproject.toml
More file actions
203 lines (171 loc) · 5.19 KB
/
Copy pathpyproject.toml
File metadata and controls
203 lines (171 loc) · 5.19 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
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "numpy>=2.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "lsy_drone_racing"
version = "0.0.1"
description = "LSY Autonomous Drone Racing Project Course"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
]
########################
# Pip Dependencies
########################
dependencies = ["fire >= 0.6.0", "numpy", "toml >= 0.10.2"]
[project.optional-dependencies]
# option[sim]: basic simulation
sim = [
"gymnasium[array-api] >= 1.2.0",
"ml-collections >= 1.0",
"packaging >= 24.0",
"drone-models",
"drone-controllers",
"crazyflow>=0.1.0",
"jax >= 0.7",
"warp-lang",
]
# option[gpu]: simulation with gpu
gpu = ["jax[cuda12]"]
# option[deploy]: deploy to real drones
deploy = [
"cflib2 @ git+https://github.com/bitcraze/crazyflie-lib-python-v2.git@d87b796",
"drone-estimators",
]
# option[rl]: train rl policy
rl = ["torch == 2.8.0", "wandb"]
# option[gamepad]: use a gamepad as input for your drone
gamepad = ["pygame"]
[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.dependencies]
python = ">=3.11.12,<3.14"
pip = ">=25.0.1,<26"
ruff = "*"
# Compilers needed for acados
compilers = ">=1.9.0, <1.11.0"
cmake = "==3.26.0" # Pinned for motion_capture_tracking
make = "==4.4.1" # Pinned for motion_capture_tracking
openblas = ">=0.3.30,<0.4"
[tool.pixi.pypi-dependencies]
lsy_drone_racing = { path = ".", editable = true }
[tool.pixi.feature.sim.activation]
scripts = ["tools/setup_acados.sh"]
[tool.pixi.tasks]
evaluate = { cmd = "python scripts/evaluate.py", description = "Evaluate the controller" }
### environments
[tool.pixi.environments]
default = { features = ["sim"], solve-group = "default" }
deploy = { features = ["sim", "gpu", "kilted", "deploy"] }
gpu = { features = ["sim", "gpu"], solve-group = "default" }
tests = { features = ["sim", "rl", "tests"], solve-group = "default" }
gpu-tests = { features = ["sim", "gpu", "tests"], solve-group = "default" }
gamepad = { features = ["sim", "gamepad"], solve-group = "default" }
profile = { features = ["sim", "profile", "gpu"], solve-group = "default" }
docs = { features = ["docs"] }
## feature [kilted]
[tool.pixi.feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]
[tool.pixi.feature.kilted.dependencies]
# Build tools
pkg-config = "*"
ninja = "*"
# ROS specific tools
rosdep = "*"
colcon-common-extensions = "*"
# Kilted specific tools
ros-kilted-desktop = "*"
ros2-distro-mutex = "0.12.*" # Pinned for motion_capture_tracking
[tool.pixi.feature.kilted.activation]
scripts = ["tools/setup_mocap.sh"]
## feature [deploy]
[tool.pixi.feature.deploy.dependencies]
packaging = ">=24,<26" # Necessary for cflib2
maturin = ">=1.13.3,<2"
rust = ">=1.95.0,<1.96"
## feature [tests]
[tool.pixi.feature.tests.tasks]
tests = { cmd = "pytest -v tests", description = "Run tests" }
[tool.pixi.feature.tests.dependencies]
pytest = "*"
[tool.pixi.feature.profile.dependencies]
pyinstrument = "*"
## feature [docs]
[tool.pixi.feature.docs.dependencies]
python = ">=3.10"
properdocs = ">=1.5.0"
mkdocs-material = ">=9.0.0"
[tool.pixi.feature.docs.pypi-dependencies]
mkdocs-autorefs = ">=1.2.0"
mkdocstrings = { extras = ["python"], version = ">=0.26.0" }
mkdocs-gen-files = ">=0.5.0"
mkdocs-literate-nav = ">=0.6.0"
mkdocs-section-index = ">=0.3.0"
mkdocs-charts-plugin = ">=0.0.10"
[tool.pixi.feature.docs.tasks]
docs-build = { cmd = "properdocs build", description = "Build docs" }
docs-serve = { cmd = "properdocs serve --livereload", description = "Serve docs locally" }
########################
# Linting and formatting settings
########################
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".git",
".git-rewrite",
".ipynb_checkpoints",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".venv",
".vscode",
"__pypackages__",
"_build",
"build",
"dist",
"site-packages",
"venv",
]
line-length = 100
indent-width = 4
target-version = "py311"
[tool.ruff.lint]
select = ["E", "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]
"benchmarks/*" = ["D100", "D103"]
"tests/*" = ["D100", "D103", "D104"]
[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"