refactor: consolidate tooling, fix pipeline, modernize examples#9
refactor: consolidate tooling, fix pipeline, modernize examples#9
Conversation
b20d07d to
22d3c6d
Compare
- Add pyproject.toml replacing 16 scattered requirements.txt files - Rename external/ to submodules/ for consistency - Rewrite Makefile as central command center (OMB pattern) - Space-separated subcommands: make run opendrive, make check format - OS detection for cross-platform support (Windows + Unix) - Add .pre-commit-config.yaml with make-target-only hooks - Add CI workflow with multi-OS matrix and pipeline smoke tests - Add .github/copilot-instructions.md - Update all module READMEs and CONTRIBUTING.md - Fix check_readme_style.py stale 'external' reference Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
22d3c6d to
28c70b9
Compare
When a local LICENSE file is listed in uploadedFiles.json with a bare
filename, register_asset() received the unresolved Path('LICENSE')
and called relative_to(data_path), which raised ValueError because
the bare path is not within the output directory tree.
Root cause: the copy step resolves LICENSE to data_path/../LICENSE
(folder='../'), but the registration still used the original bare
filename from the JSON input.
Fix:
- Track the resolved destination path (license_dest) during copy
- Pass license_dest and data_path.parent to register_asset()
- URL-based licenses continue to work via the is_url() branch
Also:
- Remove dead register_licence() function (never called, superseded
by register_asset())
- Remove stale TODO comment (now resolved)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Fix image index counter: check 'isMedia' category instead of
obsolete 'visualization' category, so multiple images get unique
impression-{number} filenames instead of overwriting each other.
- Fix register_folder: change 'return' to 'continue' when a file
doesn't match any known category, so remaining files in the folder
are still registered in the manifest.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Add utils/input_manifest.py: JSON-LD format detection and conversion utility that auto-detects input format (JSON-LD manifest vs legacy array) and converts to internal representation - Update asset_extraction/main.py: use load_input_file() for format-agnostic input loading (backward compatible with legacy uploadedFiles.json) - Update structure_creator/main.py: use load_input_file() instead of json.load() - Update config_structure_creator.json: input path -> input_manifest.json - Add [qc-deps] optional dependency group in pyproject.toml for clean QC package installation without version conflicts - Fix subprocess PATH: ensure venv Scripts/bin dir is on PATH so that console_scripts entry points (e.g. qc_opendrive) are found by subprocess Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Fix double-underscore in filenames: lstrip('_- ') after common
prefix strip in create_filename()
- Remove auto-appended '_Documentation' suffix from PDF filenames
in fill_mask() — let the mask config control naming
- Move .bjson output from metadata/ to simulation-data/ in
config_asset_reducer.json to match EVES-003 asset structure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Replace the Java JAR wrapper (vcs-odr-converter) with a self-contained Python implementation achieving full feature parity. Architecture: - models/: Frozen, slotted dataclasses for the full OpenDRIVE tree - parser/: lxml-based XML parser with namespace-stripping - geometry/: Protocol-based sth->xyz handlers for all 5 geometry types (line, arc, spiral, poly3, paramPoly3), elevation, discretisation - generators/: Road/lane polygons, objects, signals, road marks - converter/: 9 GeoJSON FeatureCollection outputs (refLine, breakLines, roads, lanes, laneSections, objects, signals, roadMarks, junctions) - CLI: Same arg interface (filename, -out, -path) for pipeline compat Improvements over Java version: - Dict-dispatch geometry handlers instead of factory+class hierarchy - CRS extracted from geoReference (not hardcoded EPSG:32632) - Configurable step size (default 0.2m) - 103 tests (unit + integration) Enables step 11 in process.json (was disabled due to Java dependency). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Snapshot expected output metrics (feature counts, geometry types) from the reference .xodr file and verify the Python converter reproduces them exactly. Tests validate: - All 9 output layers produced with correct feature counts - Geometry types match per layer - Valid GeoJSON structure (FeatureCollections, closed polygon rings) - Reference line spans full road extent - Lane/breakline counts match road topology Resolves #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
420d463 to
8ad4688
Compare
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Remove .flake8 config file - Replace black/flake8/isort with ruff in pyproject.toml dev deps - Update Makefile lint/format/check targets to use ruff - Update CI to plain checkout (no submodules needed for lint/check) - Fix README check: exclude .pytest_cache, add Input section - Reformat all files with ruff format Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
The setup/install targets now check whether the OMB submodule directory actually contains a pyproject.toml or setup.py before attempting pip install -e. This allows CI to run lint/check jobs without cloning the OMB submodule (which pulls private GitLab nested submodules). The smoke-test CI job selectively inits only the OMB submodule (non-recursive) so the pipeline can still import OMB packages. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Use a valid Python identifier for the module directory name. Updates all references in pyproject.toml, configs, README, and copilot-instructions. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Add sd-creation-wizard-api and sd-creation-wizard-frontend from eclipse-xfsc as submodules for wizard_caller integration. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Replace the HTTP-based SD Creation Wizard client with a pure Python CLI that reads SHACL shapes via rdflib, identifies missing/required fields in the JSON-LD, and prompts the user interactively. No external service or Docker dependency needed. The -enable false bypass mode is preserved for automated pipeline runs. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- docs/STYLE.md: replace black formatter recommendation with ruff - copilot-instructions.md: fix Developer Checks section (ruff, not black+flake8) - README.md: update wizard_caller and xodr_to_geojson_caller descriptions Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Rename hdmap_instance.json → hdmap.json (drop _instance suffix) - Rename manifest_reference.json → manifest.json (simpler name) - Fix hdmap:hasManifest filePath: ./base-references/hdmap_manifest_reference.json → ../manifest.json - Replace test fixture IRI (test.fixture.net) with DID_ADRESS constant - Generate simple asset README instead of downloading wrong ENVITED-X README - Remove unused download_readme/update_readme functions and requests import - Update all 8 pipeline configs to use new filenames - Update copilot-instructions.md to reflect new naming Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Fix filePath using ipfs:// URI instead of relative path in manifest - Fix LICENSE placed in parent folder instead of asset root - Fix LICENSE MIME type (text/html -> text/plain) - Fix LICENSE base64 content read from wrong path - Add guard for empty file lists in manifest iteration - Add missing import json in asset_extraction Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- qualitychecker_caller: os.chmod/os.stat -> Path.chmod/Path.stat - ontologie_creator: os.path/os.makedirs -> Path methods - extract_osc: os.path -> Path, remove import os - asset_reducer, input_manifest, rdf: open() -> Path.open() Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
…flight checks - Replace hyphenated targets (setup-wizard, wizard-stop, clean-all, init-submodules) with subcommand groups (setup wizard, wizard stop, clean all); inline init-submodules into setup - Add wizard pre-flight checks: auto-init/start Podman machine on Windows, auto-install podman-compose, patch podman-compose path bug - Add proper error handling to wizard target with actionable hints - Add corporate proxy setup documentation to README (SSH tunnel, systemd drop-in, containers.conf) Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
…tring Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
|
I recreated the workflow in Readme.md; here are my findings:
Podman clients are still able to connect. I already asked ChatGPT about it, but it didn't work. |
|
Point 2) is strange as I fixed that upstream and pinned the Version. Maybe i did a mistake or you still have the old dependencies installed? |
|
|
- Fix download_or_get_file() to resolve relative paths against out_path (the manifest's directory) instead of CWD. Fixes FileNotFoundError when invoking the pipeline from any working directory. - Add INPUT_DIR/OUTPUT_DIR variable mode to generate target for generic pipeline invocation (used by downstream asset repos). - Remove cd-into-input-dir workaround from example generate path. - Improve OpenScenario dependency message to explain why OpenDRIVE builds. - Update help text with INPUT_DIR usage. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
dc15386 to
0b8f98d
Compare
- Fix Makefile comments referencing 'make run' (renamed to make generate) - Fix README wizard commands: wizard-stop -> wizard stop, setup-wizard -> setup wizard - Add INPUT_DIR/OUTPUT_DIR usage section to README - Fix configuration placeholder descriptions (asset_type is domain type, not extension) Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Remove 43 lines of unreachable code after early return in extract_osc.py set_manifest_data() (catalog links, env models, traffic space, licence — all dead after line 1744) - Replace 'test = 0' placeholder variables with 'pass' in jsonLD_creator/main.py register_key() and register_list() Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Aligns with the [INFO]/[OK]/[ERR]/[WARN]/[SKIP] convention used consistently across both Makefiles. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
|
Hey @MircoNierenz, thanks for the thorough testing! I've pushed a batch of fixes addressing all your findings. Here's what changed and how to retest: What was fixed#1 (PowerShell) — The README now has a dedicated Prerequisites section with Windows install steps, plus an "Option B" showing how to invoke the pipeline directly from PowerShell without Make. Both Makefiles also now set #2 (qc_opendrive contact_point error) — This is pinned to my fork ( pip show asam-qc-opendriveThe "Location" should point to the fork. If it still shows the upstream version, try: make clean all && make setupIf the error persists even with the fork installed, I'll need your #3 (OpenSCENARIO builds OpenDRIVE first) — This is expected: the OpenSCENARIO example references an OpenDRIVE map, so the pipeline auto-builds the dependency first. The message has been improved to make this clearer. #4 (custom input path resolution) — This was the real bug. Additionally, there's now a generic make generate INPUT_DIR=path/to/your/input OUTPUT_DIR=path/to/your/output#5 (debug mode in PowerShell) — The README now documents both syntaxes: # Bash / Git Bash
SL58_LOG_MODE=debug make generate opendrive
# PowerShell
$env:SL58_LOG_MODE = "debug"; make generate opendrive#6 (Podman pipe error) — Added a troubleshooting table to the README covering the How to retest# 1. Start fresh
git fetch origin && git checkout feature/consolidate-tooling
git pull
make clean all
# 2. Reinstall everything
make setup
# 3. Run the built-in examples
make generate opendrive
make generate openscenario
make validate
# 4. Test with your own input (the bug you hit in #4)
python -m asset_extraction.main your/input_manifest.json -out your/output -config ./configs
# Or via Make:
make generate INPUT_DIR=your/input OUTPUT_DIR=your/outputIf #2 still reproduces after step 2, run |
Add MAVEN_SETTINGS and NPM_CONFIG env vars to the wizard Makefile target. When set, images are built individually with podman build --volume to mount corporate Maven settings or npm registry config into the build container. This lets users behind corporate firewalls build the wizard without modifying any Dockerfiles. Usage: make wizard MAVEN_SETTINGS=~/.m2 NPM_CONFIG=~/.npmrc Also add 'Corporate registry mirrors' section to README with generic (non-org-specific) guidance on: - pre-pulling and re-tagging base images from a corporate Docker mirror - configuring Maven mirrors via ~/.m2/settings.xml - configuring npm mirrors via .npmrc - combining all options in a single make wizard call Update sd-creation-wizard-frontend submodule ref to include fix for Angular build crash when fonts.googleapis.com is unreachable (eclipse-xfsc/sd-creation-wizard-frontend#8). Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Add macos-latest to check and smoke matrices - Smoke tests now run on all 3 OSes (was ubuntu-only) - Replace manual venv/pip steps with make setup (DRY) - Remove direct pip install for QC deps (make setup handles it) Matrix: 3 OSes × 2 formats = 6 pipeline jobs + 3 check jobs Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Add .markdownlint.yaml with project-specific rules - Add lint-md / format-md / check md Make targets - Add lint-md pre-commit hook - Auto-fix blank-line issues across all 17 module READMEs - Fix meta_data_extractor/xodr/README.md heading levels and table columns Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
make setup was only installing [dev] dependencies, missing the [qc,qc-deps] extras needed for the pipeline's quality checker steps. This caused CI pipeline jobs to fail at step 07/15 (ASAM OpenDRIVE checks) because qc_opendrive was not installed. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Revert make setup to install [dev] only (check jobs don't need QC) - Add 'make install qc' target for quality checker extras - Enable core.longpaths in install qc (asam-qc-openscenarioxml has test filenames exceeding Windows 260-char path limit) - Add 'Enable long paths' and 'Install QC tools' steps to CI pipeline jobs (Windows only for longpaths, all OSes for QC install) Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Points to jdsika/sd-creation-wizard-api@all-fixes which includes: - fix: update OMB repo URL and support artifacts/ layout (upstream PR: eclipse-xfsc/sd-creation-wizard-api#12) Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Remove all references to the deprecated uploadedFiles.json format. The pipeline now exclusively uses input_manifest.json (JSON-LD). Changes: - Remove uploadedFiles.json documentation from READMEs and copilot instructions - Update CLI help text in asset_extraction and structure_creator - Remove backward-compatibility code in utils/input_manifest.py BREAKING CHANGE: uploadedFiles.json format is no longer supported. Use input_manifest.json instead. Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
|
Tried to create a simulation asset, but it was only possible with some changes in the Installation
Testing with contained example
Testing own example
|
|
Maybe I forgot that you need to "make setup qc "? Can you look for that in make help? |
|
Following your instructions from above for a clean reinstall. I just added a ERROR: Failed to build 'asam-qc-openscenarioxml' when git clone --filter=blob:none --quiet https://github.com/asam-ev/qc-openscenarioxml 'c:\users\admin_temp\appdata\local\temp\pip-install-v9ib616r\asam-qc-openscenarioxml_655c36674f3d439b840840384a8adc36' |
* feat: mount OMB submodule into wizard API container Mount ontology-management-base as read-only volume at /omb in the wizard API container, and set GX4FM_LOCAL_PATH=/omb so the API reads SHACL shapes locally instead of cloning from GitHub at startup. Signed-off-by: jdsika <carlo.van-driesten@bmw.de> * chore: point wizard submodules to openMSL forks and pin main - Change .gitmodules URLs from eclipse-xfsc to openMSL forks (the pinned commits only exist on the fork, not upstream) - Pin sd-creation-wizard-api to openMSL/main (ce10d9b) - Pin sd-creation-wizard-frontend to openMSL/main (4bb535b) Both forks' main branches now include: API: OMB URL fix + ENVITED-X ecosystem + static init fix Frontend: font inlining fix + dynamic ecosystem UI Signed-off-by: jdsika <carlo.van-driesten@bmw.de> * fix: pin wizard submodules to latest main with SHACL converter fixes - sd-creation-wizard-api: fix SHACL converter crashes, missing shapes, ecosystem deduplication, non-root shape inclusion - sd-creation-wizard-frontend: empty-shape guard, .dockerignore Signed-off-by: jdsika <carlo.van-driesten@bmw.de> --------- Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
- Fix structure_creator/main.py formatting (single-line add_argument) to pass ruff format --check in CI - Fix 'make install qc' on Windows: use git config --global core.longpaths so pip's temp clone of asam-qc-openscenarioxml (which has paths >260 chars) succeeds outside the local repo Resolves CI check failures on all 3 OSes and the KR-VUFO install error reported in PR #9. Signed-off-by: jdsika <carlo.van-driesten@bmw.de> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Users (KR-VUFO) were running 'make setup' then 'make generate' and hitting failures at step 7 because QC tools weren't installed. The separate 'make install qc' step was not discoverable enough. Changes: - make setup now installs [qc,qc-deps] extras automatically - git config --global core.longpaths set during setup (Windows) - CI smoke jobs simplified: remove separate 'Enable long paths' and 'Install QC tools' steps (make setup handles both) - CI check jobs also get QC installed (simpler, ~1 min overhead) Signed-off-by: jdsika <carlo.van-driesten@bmw.de> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d310e7a to
ec1ef16
Compare
- Remove 'make install qc' (QC is now part of make setup) - Remove 'make install dev' (setup already installs dev) - make install now reinstalls all deps (dev + QC + OMB) - Update help text to reflect simplified targets - Remove install from subcommand catch-all Signed-off-by: jdsika <carlo.van-driesten@bmw.de> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hey @KR-VUFO, thanks for testing and reporting! We pushed fixes that address all your issues: What changed
How to retestgit fetch origin && git checkout feature/consolidate-tooling && git pull
make clean all
make setup
make generate opendrive
make generate openscenarioCI is green on all 3 OSes (Ubuntu, Windows, macOS) × both pipelines. |
- Replace 'make install dev' with 'make install' (reinstall all) - Fix 'make run' references to 'make generate' - Update 'make setup' description to mention all dependencies Signed-off-by: jdsika <carlo.van-driesten@bmw.de> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Major consolidation of sl-5-8-asset-tools: modernized build system, overhauled pipeline with OMB-backed validation, structured logging, CID-named archives, Gaia-X metadata enrichment, and opt-in deterministic mode. Includes a pure-Python OpenDRIVE-to-GeoJSON converter, SHACL-driven CLI wizard, and comprehensive code quality improvements.
Build System & Tooling
pyproject.tomlreplacing 16 scatteredrequirements.txtfilesexternal/tosubmodules/for consistencyMakefileas central command center (OMB pattern)make generate opendrive,make check formatmake validateauto-discovers and validates generated examples.pre-commit-config.yamlwith make-target-only hooksblack+flake8+isortwithruff.gitattributesenforcing LF line endings.github/copilot-instructions.mdPipeline Overhaul
Validation
utils/rdf.py)jsonLD_validatorto thin OMB wrapper (from ~200 lines to ~50)jsonLD_creator(BFS over imports, filtered to ENVITED-X/Gaia-X namespaces)Logging & Reporting
utils/pipeline_reporting.py(~530 lines): stage-oriented output with[01/15] START/OK/FAILformatting, tool-specific summarizers for OMB validation, QC results, GeoJSON conversionutils/log_config.py:SL58_LOG_MODE=debugfor verbose subprocess diagnosticsutils/subprocess.py:CommandResult/CommandErrortypesCID-Named Archives
utils/cid.py: compute CIDv1 (base32, raw, SHA-256) from file contentasset.zipto<CID>.zipin the example directoryGaia-X Metadata Enrichment
meta_data_extractor/gaiax.py: extracts license, copyright owner, and resource policy from siblingLICENSEfilesdid:web:registry.gaia-x.eu:Manifest:uuid)Deterministic Mode (Opt-in)
SL58_DETERMINISTIC=1enables reproducible output: same input → same UUIDs, timestamps, ZIP bytes, CIDutils/ids.py: UUID5 seeded bySL58_INPUT_HASHwith counter for uniquenessstructure_creator/main.py:SL58_SOURCE_MTIMEfor generated file timestampscreate_zip(): sorted file iteration + fixed ZIP entry timestampsQC Checker
qc-opendriveto fork fixing crash on roads without<link>element (upstream PR Handle missing optional road links in contact-point check asam-ev/qc-opendrive#139)qualitychecker_callerNew Modules
Pure-Python OpenDRIVE-to-GeoJSON Converter
xodr_to_geojson_callerrewrite: parser, geometry engine (curves, elevation, discretisation), generators (road, lane, object, signal, roadmark), GeoJSON converterindent=2)SHACL-Driven CLI Wizard
wizard_caller/shacl_wizard.py: interactive SHACL-driven metadata wizardsd-creation-wizard-apiandsd-creation-wizard-frontendsubmodulesOther Improvements
input_manifest.jsonpipeline replacinguploadedFiles.json(JSON-LD format detection)os.pathusage topathlibos.sepin display paths, quoted$(MAKE)for Windowsinput/+output/structureDiff Stats (vs
main)Key new files:
utils/pipeline_reporting.py(529 lines)utils/cid.py,utils/ids.py,utils/input_manifest.pymeta_data_extractor/gaiax.py(127 lines)wizard_caller/shacl_wizard.py(321 lines)scripts/resolve_references.py(130 lines)xodr_to_geojson_caller/— 20+ new modules (parser, geometry, generators, tests)Commits
Known Follow-ups
ASCS-eV/ontology-management-base@mainonce upstream PRasam-ev/qc-opendrive#139is merged