Skip to content

Commit c582862

Browse files
committed
Release 0.2.0
Fixes #2 Fixes #3 Fixes #4
1 parent 0230bdf commit c582862

File tree

159 files changed

+5937
-944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+5937
-944
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.1
1+
8.4.1

.bazelversion.license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
SPDX-FileCopyrightText: 2025 Leon Pohl <leon.pohl@unibw.de>
1+
SPDX-FileCopyrightText: 2026 2026 Leon Pohl <leon.pohl@unibw.de>
22

33
SPDX-License-Identifier: Apache-2.0

.gitattributes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
*.bag filter=lfs diff=lfs merge=lfs -text
5+
# Store big binary files in Git LFS
6+
*.bag filter=lfs diff=lfs merge=lfs -text
7+
*.idx filter=lfs diff=lfs merge=lfs -text
8+
*.db3 filter=lfs diff=lfs merge=lfs -text
9+
*.pdf filter=lfs diff=lfs merge=lfs -text
10+
*.svg filter=lfs diff=lfs merge=lfs -text

.github/workflows/draft-pdf.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-FileCopyrightText: 2026 Leon Pohl <leon.pohl@unibw.de>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Draft PDF
6+
on:
7+
push:
8+
paths:
9+
- processing_edges/rosbag_to_vision_dataset/src/tex/joss/**
10+
- .github/workflows/draft-pdf.yml
11+
12+
jobs:
13+
paper:
14+
runs-on: ubuntu-latest
15+
name: Paper Draft
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
lfs: true
21+
- name: Build draft PDF
22+
uses: openjournals/openjournals-draft-action@master
23+
with:
24+
journal: joss
25+
# This should be the path to the paper within your repo.
26+
paper-path: processing_edges/rosbag_to_vision_dataset/src/tex/joss/paper.md
27+
- name: Upload
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: paper
31+
# This is the output path where Pandoc will write the compiled
32+
# PDF. Note, this should be the same directory as the input
33+
# paper.md
34+
path: processing_edges/rosbag_to_vision_dataset/src/tex/joss/paper.pdf

.github/workflows/rosbags_build_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
- name: Build rosbags with Bazel
2727
uses: addnab/docker-run-action@v3
2828
with:
29-
image: gcr.io/bazel-public/bazel:8.3.1
29+
image: gcr.io/bazel-public/bazel:8.4.1
3030
options: -v ${{ github.workspace }}:/workspace -w /workspace
3131
run: |
32-
bazel build //data:rosbags_sub1_all
32+
bazel build @example_data//:data_pipeline_processed__everything
3333

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ __pycache__/
4141
data/rosbags/*
4242

4343
# ...except specific sessions that must be tracked
44-
!data/rosbags/2025-04-23_13-56-29_tas/
44+
!data/rosbags/2024-06-26_15-08-50_tas/2024-06-26-15-08-51_short.bag
45+
!data/rosbags/2025-04-28_itsc_albi_pemo_forest/2025-04-28-18-25-09_short.bag
4546

4647
# Exclude other data and log directories
4748
data/streams

.gitlab-ci.bagzel.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5+
load("@bagzel//:starlark/macros/graph.bzl", "graph_macro")
6+
57
# The following aliases are defined for convenience.
68

79
alias(
@@ -33,3 +35,11 @@ alias(
3335
name = "rosservice",
3436
actual = "@rules_ros//third_party/ros/rosservice",
3537
)
38+
39+
filegroup(
40+
name = "data_pipeline_processed",
41+
srcs = [
42+
"@example_data//:data_pipeline_processed"
43+
],
44+
visibility = ["//visibility:public"],
45+
)

CONTRIBUTING.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 Leon Pohl <leon.pohl@unibw.de>
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Contributing to Bagzel
8+
9+
Thank you for your interest in contributing to **Bagzel**!
10+
This document describes how to report issues, propose changes, and work with the codebase.
11+
12+
---
13+
14+
## 📣 Ways to Contribute
15+
16+
- **Report bugs** and unexpected behaviour
17+
- **Improve documentation** (README, docs/, examples)
18+
- **Add or improve features** (new extraction steps, new dataset formats, performance improvements)
19+
- **Improve tests** and CI robustness
20+
21+
No contribution is too small — typo fixes and clarifications in documentation are very welcome.
22+
23+
---
24+
25+
## 🐛 Reporting Issues
26+
27+
Before opening a new issue:
28+
29+
1. **Search existing issues** to see if your problem has already been reported or discussed.
30+
2. If not, open a new issue and include:
31+
- A clear and concise **description** of the problem
32+
- Steps to **reproduce**
33+
- What you **expected** to happen
34+
- What actually **happened**
35+
- Your environment (OS, Bazel version, Python version, ROS version(s))
36+
37+
If the issue is related to a specific dataset or bag, please mention:
38+
- Which dataset/bag you used
39+
- Whether it is publicly available or internal
40+
41+
---
42+
43+
## 🔧 Development Setup
44+
45+
1. **Clone the repository**
46+
47+
```bash
48+
git clone https://github.com/UniBwTAS/bagzel.git
49+
cd bagzel
50+
```
51+
52+
2. **Fetch large files via Git LFS**
53+
54+
```bash
55+
git lfs install
56+
git lfs pull
57+
```
58+
59+
3. **Install dependencies**
60+
61+
Runtime and development dependencies are managed via Bazel where possible.
62+
If Python tooling is needed (e.g. linters or formatters), follow `docs/bazel` and/or project-specific documentation.
63+
64+
4. **Verify Bazel works**
65+
66+
Run a small build or test to check your setup:
67+
68+
```bash
69+
bazel query //...
70+
```
71+
72+
or
73+
74+
```bash
75+
bazel test //...
76+
```
77+
78+
4. **Verify that the licensing setup works**
79+
80+
Run a small test to validate your configuration:
81+
82+
```bash
83+
reuse --root ./bagzel lint
84+
```
85+
86+
---
87+
88+
## 🧹 Code Style and Quality
89+
90+
- Follow the existing **structure and style** in the files you modify.
91+
- Prefer **small, focused changes** over large refactorings.
92+
- For Python code:
93+
- Keep functions small and well documented.
94+
- Avoid introducing new dependencies unless necessary.
95+
- For Starlark (Bazel) code:
96+
- Use macros where it improves reuse and clarity.
97+
- Keep public macros documented (parameters, expected usage, example).
98+
99+
If you introduce new public APIs (macros, rules, or Python entrypoints), please add short docstrings and, if possible, a small example in `docs/` or in a minimal Bazel target.
100+
101+
---
102+
103+
## 🔁 Git Workflow
104+
105+
1. **Create a branch**
106+
107+
```bash
108+
git checkout -b feature/my-new-feature
109+
```
110+
111+
2. **Make your changes** and commit them with clear messages, e.g.
112+
113+
```
114+
Add nuScenes export macro for ROS 2 bags
115+
```
116+
117+
or
118+
119+
```
120+
Fix path handling in external_repository local_repo
121+
```
122+
123+
3. **Rebase** on the latest `main` (or relevant base branch) before opening a PR.
124+
125+
4. **Open a Pull Request**
126+
127+
In your PR description, please include:
128+
129+
- What the change does
130+
- Why it is needed / what problem it solves
131+
- How it was tested (commands, environment)
132+
- Any limitations or follow-up work
133+
134+
PRs that are easy to review — small, well explained, with tests — are merged much faster.
135+
136+
---
137+
138+
## 🙌 Code Review
139+
140+
All changes are reviewed before being merged.
141+
142+
- Be open to feedback and ready to adjust your changes.
143+
- Reviewers may ask for additional tests, documentation, or refactoring.
144+
- If a change is controversial or non-trivial, consider starting with an issue or a design discussion before implementing it.
145+
146+
---
147+
148+
## 🤝 Acknowledgements
149+
150+
By contributing to Bagzel, you help improve reproducible data workflows for robotics and autonomous systems.
151+
Thank you for your time, ideas, and energy!

MODULE.bazel

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
module(
1111
name = "bagzel",
12-
version = "0.1.0",
12+
version = "0.2.0",
1313
)
1414

1515
# ------------------------------------------------------------------------------
@@ -67,6 +67,14 @@ use_repo(
6767
"urdfdom_headers",
6868
)
6969

70+
bazel_dep(name = "bazel_latex")
71+
72+
git_override(
73+
module_name = "bazel_latex",
74+
remote = "https://github.com/ProdriveTechnologies/bazel-latex.git",
75+
commit = "227b02f346c1dd0098d32b5bcb1ef874dd367e2a",
76+
)
77+
7078
# ------------------------------------------------------------------------------
7179
# Rules for Fetching Repositories via http_archive and pip
7280
# ------------------------------------------------------------------------------
@@ -75,28 +83,52 @@ http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "ht
7583
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
7684

7785
# ------------------------------------------------------------------------------
78-
# Python Package Management via pip
86+
# Python package management (global + extractors)
7987
# ------------------------------------------------------------------------------
8088

8189
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
8290

91+
# Global Python packages (main environment, Python 3.10)
8392
pip.parse(
8493
hub_name = "pypi",
85-
python_version = "3.10", # Must match the toolchain version
86-
requirements_lock = "//third_party/python:requirements_lock.txt",
87-
requirements_windows = "//third_party/python:requirements_lock.txt",
94+
python_version = "3.10", # Must match the main toolchain version
95+
requirements_lock = "@bagzel//processing_edges/rosbag_to_vision_dataset/third_party/python:requirements_lock.txt",
96+
requirements_windows = "@bagzel//processing_edges/rosbag_to_vision_dataset/third_party/python:requirements_lock.txt",
8897
)
89-
9098
use_repo(pip, "pypi")
9199

100+
# Nuscenes extractor environment (Python 3.8)
101+
pip.parse(
102+
hub_name = "pip_rosbag_to_nuscenes",
103+
python_version = "3.8", # Must match the nuscenes toolchain version
104+
# requirements_darwin = "//cluster/data-pipeline/processing_edges/rosbag_to_nuscenes:requirements_lock.linux.x86_64.txt"
105+
requirements_by_platform = {
106+
"@bagzel//processing_edges/rosbag_to_nuscenes:requirements_lock.linux.x86_64.txt": "linux_x86_64",
107+
},
108+
)
109+
use_repo(pip, "pip_rosbag_to_nuscenes")
110+
111+
112+
113+
# ------------------------------------------------------------------------------
114+
# Python toolchains
115+
# ------------------------------------------------------------------------------
116+
117+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
118+
119+
# Global toolchains; 3.8 is needed for nuscenes, others optional
120+
python.toolchain(python_version = "3.8") # Needed for nuscenes extractor
121+
122+
use_repo(python, "python_versions")
123+
92124
# ------------------------------------------------------------------------------
93125
# Additional Third-Party Dependencies (Not via BCR)
94126
# ------------------------------------------------------------------------------
95127

96128
# ROS-compatible OpenCV bridge
97129
http_archive(
98130
name = "vision_opencv",
99-
build_file = "third_party/vision_opencv-1.16.2/BUILD.bazel",
131+
build_file = "@bagzel//processing_edges/rosbag_to_vision_dataset/third_party/vision_opencv-1.16.2:BUILD.bazel",
100132
strip_prefix = "vision_opencv-1.16.2",
101133
urls = ["https://github.com/ros-perception/vision_opencv/archive/refs/tags/1.16.2.tar.gz"],
102134
sha256 = "046f3bac5dcdaea5678bf5e6be10d895bbd670cc16c7b97ba4c1a6b661f8557e",
@@ -105,7 +137,7 @@ http_archive(
105137
# NCOM binary decoder from Oxford Technical Solutions
106138
http_archive(
107139
name = "NCOMdecoder",
108-
build_file = "third_party/NCOMdecoder/BUILD.bazel",
140+
build_file = "@bagzel//processing_edges/rosbag_to_vision_dataset/third_party/NCOMdecoder:BUILD.bazel",
109141
strip_prefix = "NCOMdecoder-6bd95e9a5f826556e1c4c0bc586fec3f973c76e3",
110142
urls = ["https://github.com/OxfordTechnicalSolutions/NCOMdecoder/archive/6bd95e9a5f826556e1c4c0bc586fec3f973c76e3.zip"],
111143
sha256 = "d22e1d29e43be9cb8e93a072c24c7c2cda549eedf6b9225a2195ff03f397f900",
@@ -114,8 +146,27 @@ http_archive(
114146
# Custom Ethernet message definitions (ROS message package)
115147
http_archive(
116148
name = "ethernet_msgs",
117-
build_file = "third_party/ethernet_msgs/BUILD.bazel",
149+
build_file = "@bagzel//processing_edges/rosbag_to_vision_dataset/third_party/ethernet_msgs:BUILD.bazel",
118150
strip_prefix = "ethernet_msgs-b434f952e4550b69ec334dac8d259d4a5ea4a84a",
119151
urls = ["https://github.com/UniBwTAS/ethernet_msgs/archive/b434f952e4550b69ec334dac8d259d4a5ea4a84a.zip"],
120152
sha256 = "dff505d1389fef8ec217eada3c7d8979641481b4608d87c7fd2c080c5d2baaf7",
121153
)
154+
155+
external_repository = use_extension("@bagzel//starlark/core/external_repository:external_repository.bzl", "external_repository")
156+
157+
external_repository.local_repo(
158+
repo_name = "example_data", # name des repository
159+
build_file = "@bagzel//starlark/macros/graph_build:BUILD.graph.bazel",
160+
empty_build_file = "@bagzel//starlark/macros/graph_build:BUILD.graph.empty.bazel",
161+
path = "data_example/", # path zum data ordner
162+
)
163+
164+
use_repo(external_repository, "example_data")
165+
166+
bazel_dep(name = "bagzel_config")
167+
168+
local_path_override(
169+
module_name = "bagzel_config",
170+
path = "config", # or wherever your default config lives inside bagzel
171+
)
172+

0 commit comments

Comments
 (0)