Skip to content

Commit bd416fa

Browse files
committed
Add better templating for tasks
Signed-off-by: Florian Vahl <[email protected]>
1 parent c38973c commit bd416fa

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,7 @@
329329
"log": true,
330330
".pixi": true,
331331
},
332+
"[toml]": {
333+
"editor.defaultFormatter": "tamasfe.even-better-toml"
334+
},
332335
}

pixi.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@ preview = ["pixi-build"]
1212
version = "0.1.0"
1313

1414
[tasks]
15-
build = "colcon build --symlink-install --cmake-args -G Ninja"
16-
clean = "rm -rf build install log"
17-
test = "colcon test --event-handlers console_direct+ --return-code-on-test-failure"
15+
# Deploys the current environment
16+
deploy = "scripts/deploy_robots.py"
17+
# Runs code formatting and linting
1818
_format = "pre-commit run --all-files"
1919
format = [{ task = "_format", environment = "format" }]
20-
deploy = "scripts/deploy_robots.py"
20+
21+
# Builds all ROS 2 packages or a specific one if given
22+
[tasks.build]
23+
cmd = "colcon build --symlink-install --cmake-args -G Ninja {{ '--packages-select ' + package if package }}"
24+
args = [{ arg = "package", default = "" }]
25+
26+
# Cleans all build and install files or those of a specific package if given
27+
[tasks.clean]
28+
cmd = "rm -rf build/{{ package }} install/{{ package }} {{ 'log' if not package }}"
29+
args = [{ arg = "package", default = "" }]
30+
31+
# Runs tests for all ROS 2 packages or a specific one if given
32+
[tasks.test]
33+
cmd = "colcon test --event-handlers console_direct+ --return-code-on-test-failure {{ '--packages-select ' + package if package }}"
34+
args = [{ arg = "package", default = "" }]
35+
2136

2237
[dependencies]
2338
# Base dependencies
@@ -95,6 +110,7 @@ ros-jazzy-generate-parameter-library = ">=0.5.0,<0.6"
95110
ros-jazzy-geometry-msgs = ">=5.3.6,<6"
96111
ros-jazzy-hardware-interface = ">=4.37.0,<5"
97112
ros-jazzy-image-proc = ">=5.0.11,<6"
113+
ros-jazzy-image-publisher = ">=5.0.11,<6"
98114
ros-jazzy-image-transport = ">=5.1.7,<6"
99115
ros-jazzy-joint-state-publisher = ">=2.4.0,<3"
100116
ros-jazzy-joint-state-publisher-gui = ">=2.4.0,<3"

0 commit comments

Comments
 (0)