diff --git a/.flake8 b/.flake8 deleted file mode 100644 index cb50e3a..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = E501 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cde0a18 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +# Enforce LF line endings for all text files +* text=auto eol=lf + +# Git LFS - track large binary assets in generated/input/ +# Enable when LFS is configured on the remote: +# generated/input/**/*.png filter=lfs diff=lfs merge=lfs -text +# generated/input/**/*.pdf filter=lfs diff=lfs merge=lfs -text +# generated/input/**/*.xosc filter=lfs diff=lfs merge=lfs -text diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..bc71acf --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,77 @@ +# Scenario Asset Example — Copilot Instructions + +## Project Overview + +This is a **reference asset repository** for onboarding OpenSCENARIO scenario data into the ENVITED-X Dataspace. Users stage input files in `generated/input/`, then `make generate` runs the sl-5-8 pipeline to produce a complete, EVES-003-conformant asset in `generated/output/`. + +Assets follow the [EVES-003](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html) specification. + +## Asset Creation Flow + +### Input → Output + +Users provide an OpenSCENARIO `.xosc` file and an `input_manifest.json` (plus optional images, docs, LICENSE) in `generated/input/`. The pipeline auto-extracts metadata, runs quality checks, and packages everything into an EVES-003 asset in `generated/output/`. + +### Two Paths + +1. **Automated (default):** `make generate` — pipeline auto-extracts all metadata from the `.xosc` and input manifest. No user interaction needed. +2. **Wizard-assisted (optional, experimental):** `make wizard` starts a SHACL-driven web UI (Podman containers, requires Podman ≥ 4.0) at `http://localhost:4200` for interactively enriching metadata. Users can also edit `input_manifest.json` and `metadata/scenario_instance.json` by hand as an alternative to the wizard. + +### Gaia-X Integration + +The pipeline adds [Gaia-X Trust Framework](https://gaia-x.eu/) vocabulary to every asset (`gx:name`, `gx:license`, `gx:copyrightOwnedBy`, `gx:resourcePolicy`) inside `metadata/scenario_instance.json`. These properties live in closed GX-compliant nodes, while domain-specific properties (scenario type, format version, content) go in open ENVITED-X wrapper shapes. Users don't need to understand Gaia-X — the pipeline handles compliance automatically. + +## Repository Structure + +- `generated/input/` — Staged pipeline inputs (manifest, `.xosc` files, media, docs) +- `generated/output/` — Pipeline output: complete EVES-003 asset ready for validation and release +- `submodules/sl-5-8-asset-tools/` — Asset creation and processing tools (git submodule from [openMSL/sl-5-8-asset-tools](https://github.com/openMSL/sl-5-8-asset-tools)) + - `external/ontology-management-base/` — Nested submodule: SHACL shapes, OWL ontologies, JSON-LD contexts, and Python validation tools (from [ASCS-eV/ontology-management-base](https://github.com/ASCS-eV/ontology-management-base)) +- `submodules/EVES/` — The [EVES specification](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html) defining Simulation Asset structure + +## Setup and Validation + +```bash +make setup +make validate +``` + +All commands are exposed via `make` targets — run `make help` for the full list. + +## Linting (pre-commit hooks) + +Configured in `.pre-commit-config.yaml` — all hooks delegate to `make` targets. + +## Key Conventions + +### Asset Structure (EVES-003) + +Every asset must contain: `simulation-data/`, `metadata/`, `media/`, `documentation/`, and a `manifest_reference.json` at the root. Optional: `validation-reports/`. + +### JSON-LD Metadata + +- `manifest_reference.json` — Content registry linking all asset files with access roles (`isOwner`, `isRegistered`, `isPublic`) and categories (`isSimulationData`, `isMetadata`, `isMedia`, etc.) +- `metadata/scenario_instance.json` — Domain-specific metadata (format, content, quantity, quality, data source, georeference) conforming to the Scenario SHACL shapes from ontology-management-base + +Both files use typed `@value`/`@type` pairs for literals and reference ontologies via `@context` prefixes like `scenario:`, `manifest:`, `envited-x:`, `georeference:`, `gx:`. + +### Submodules + +Two direct submodules: + +- `submodules/sl-5-8-asset-tools` — Asset creation and processing tools (which contains `ontology-management-base` as a nested submodule) +- `submodules/EVES` — The [EVES specification](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html) that defines the structure and requirements for Simulation Assets in the ENVITED-X Dataspace + +After cloning, initialize with: + +```bash +make setup +``` + +### Commits + +This project uses [DCO sign-off](CONTRIBUTING.md). All commits require `Signed-off-by` — use `git commit -s`. Do **not** add `Co-authored-by: Copilot` trailers. + +## Release Workflow + +The GitHub Actions workflow (`.github/workflows/release.yml`) triggers on version tags (`v*.*.*`), runs `make setup && make generate && make validate`, and uploads the pipeline-generated CID-named `.zip` as a GitHub release artifact. diff --git a/.gitignore b/.gitignore index 6f20b17..8f7de4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ -.venv/ -.vscode/ -asset.zip +/.venv/ +output.log +*.zip +/generated/output/ +!/generated/input/ +/generated/input/uploadedFiles.json +.validate_paths diff --git a/.gitmodules b/.gitmodules index 184cfeb..6692a47 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ -[submodule "ontology-management-base"] - path = ontology-management-base - url = https://github.com/GAIA-X4PLC-AAD/ontology-management-base.git +[submodule "submodules/sl-5-8-asset-tools"] + path = submodules/sl-5-8-asset-tools + url = https://github.com/openMSL/sl-5-8-asset-tools.git + branch = main +[submodule "submodules/EVES"] + path = submodules/EVES + url = https://github.com/ASCS-eV/EVES.git diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..52414b2 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,27 @@ +# Markdownlint configuration +# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +default: true + +# Allow long lines — tables and descriptive prose need room +MD013: + line_length: 300 + code_blocks: false + tables: false + +# Allow inline HTML for collapsible sections and formatting +MD033: + allowed_elements: + - a + - br + - details + - img + - noscript + - strong + - summary + - sup + +# Disable table column style — compact pipes are fine +MD060: false + +# Allow bold text as step labels (e.g., **Step 1 — ...**) +MD036: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ce777e..93cdb5c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,45 +2,15 @@ repos: - repo: local hooks: - - id: black - name: black - entry: black + - id: validate + name: validate asset JSON-LD + entry: bash -c 'if [ -d generated/output ] && [ "$(ls -A generated/output 2>/dev/null)" ]; then make validate; else echo "[SKIP] No generated output yet (run: make generate)"; fi' language: system - types: [python] - args: ["--config=pyproject.toml"] - pass_filenames: true - exclude: ontology-management-base/ - - - id: isort - name: isort - entry: isort + pass_filenames: false + always_run: true + - id: lint-md + name: lint markdown + entry: make lint-md language: system - types: [python] - args: ["--settings=pyproject.toml"] - pass_filenames: true - exclude: ontology-management-base/ - - - id: flake8 - name: flake8 - entry: flake8 - language: system - types: [python] - args: ["--config=.flake8"] - pass_filenames: true - exclude: ontology-management-base/ - - - id: jsonld-lint - name: JSON-LD Linter - entry: python ontology-management-base/src/jsonld_lint.py - language: system - types: [json] - files: \.json$ - exclude: ontology-management-base/ - - - id: turtle-lint - name: Turtle Linter - entry: python ontology-management-base/src/turtle_lint.py - language: system - types: [text] - files: \.(ttl)$ - exclude: ontology-management-base/ + pass_filenames: false + types: [markdown] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..17073ef --- /dev/null +++ b/Makefile @@ -0,0 +1,205 @@ +# Makefile for scenario-asset-example +# Build command center for common development tasks + +# Allow parent makefiles to override the venv path/tooling. +# NOTE: VENV must be a relative path — the root Makefile prefixes it with CURDIR +# when delegating to this submodule. +VENV ?= .venv + +# Submodule path aliases (hide deep paths) +ASSET_TOOLS := submodules/sl-5-8-asset-tools +OMB := $(ASSET_TOOLS)/external/ontology-management-base + +# OS detection for cross-platform support (Windows vs Unix) +ifeq ($(OS),Windows_NT) + SHELL := sh + VENV_BIN := $(VENV)/Scripts + PYTHON ?= $(VENV_BIN)/python.exe + BOOTSTRAP_PYTHON ?= python + ACTIVATE_SCRIPT := $(VENV_BIN)/activate + ACTIVATE_HINT := use the activation script under $(VENV_BIN) for your shell +else + VENV_BIN := $(VENV)/bin + PYTHON ?= $(VENV_BIN)/python3 + BOOTSTRAP_PYTHON ?= python3 + ACTIVATE_SCRIPT := $(VENV_BIN)/activate + ACTIVATE_HINT := source $(ACTIVATE_SCRIPT) +endif + +# Generated asset directory +GENERATED_DIR := generated +GEN_INPUT := $(GENERATED_DIR)/input +GEN_OUTPUT := $(GENERATED_DIR)/output +GEN_CONFIGS := $(ASSET_TOOLS)/configs + +# ── Subcommand support ─────────────────────────────────────────────── +# Enables: make generate clean, make wizard stop +SUBCMD = $(word 2,$(MAKECMDGOALS)) + +# ── Guards ─────────────────────────────────────────────────────────── +define check_dev_setup + @"$(PYTHON)" -c "True" 2>/dev/null || { \ + echo ""; \ + echo "[ERR] Development environment not set up."; \ + echo " Run: make setup"; \ + echo ""; \ + exit 1; \ + } +endef + +.PHONY: all setup install lint format validate generate clean wizard help + +# Default target +all: lint validate + +# ── Setup & Install ────────────────────────────────────────────────── + +setup: $(ACTIVATE_SCRIPT) + @echo "[INFO] Installing asset-tools pipeline dependencies..." + @"$(PYTHON)" -m pip install -r "$(ASSET_TOOLS)/requirements.txt" --quiet + @echo "[INFO] Installing ontology-management-base (editable)..." + @"$(PYTHON)" -m pip install -e "$(OMB)" --quiet + @echo "[INFO] Installing pre-commit..." + @"$(PYTHON)" -m pip install pre-commit --quiet + @echo "[INFO] Installing quality checker packages (--no-deps to avoid upstream lxml/numpy constraints)..." + @"$(PYTHON)" -m pip install poetry-core --quiet 2>/dev/null || true + @"$(PYTHON)" -m pip install --no-deps \ + "asam-qc-baselib@git+https://github.com/asam-ev/qc-baselib-py@v1.1.0" \ + "asam-qc-openscenarioxml@git+https://github.com/asam-ev/qc-openscenarioxml@v1.0.0" + @"$(PYTHON)" -m pre_commit install --allow-missing-config >/dev/null 2>&1 || true + @echo "[OK] Setup complete. Activate with: $(ACTIVATE_HINT)" + +$(PYTHON): + @echo "[INFO] Creating virtual environment at $(VENV)..." + @"$(BOOTSTRAP_PYTHON)" -m venv "$(VENV)" + @"$(PYTHON)" -m pip install --upgrade pip + +$(ACTIVATE_SCRIPT): $(PYTHON) + @touch "$(ACTIVATE_SCRIPT)" + +install: setup + @echo "[OK] Install complete" + +# ── Lint & Format ──────────────────────────────────────────────────── +# Root repo has no Python files -- lint validates JSON-LD asset data. + +lint: validate lint-md + +lint-md: + @echo "[INFO] Linting Markdown..." + @npx --yes markdownlint-cli2 "README.md" "CONTRIBUTING.md" + @echo "[OK] Markdown lint passed" + +format: format-md + +format-md: + @echo "[INFO] Formatting Markdown..." + @npx --yes markdownlint-cli2 --fix "README.md" "CONTRIBUTING.md" + @echo "[OK] Markdown format complete" + +# ── Validate ───────────────────────────────────────────────────────── +# Validates JSON-LD files for every generated asset in the output directory. + +validate: + $(call check_dev_setup) + @"$(PYTHON)" -c "\ +import pathlib, sys; \ +out = pathlib.Path('$(GEN_OUTPUT)'); \ +dirs = sorted(d for d in out.iterdir() if d.is_dir()) if out.exists() else []; \ +sys.exit('[SKIP] No generated asset found (run: make generate)') if not dirs else None; \ +bad = [str(d) for d in dirs if not [p for p in [d / 'manifest_reference.json', d / 'metadata' / 'scenario_instance.json'] if p.exists()]]; \ +sys.exit('[ERR] No manifest or metadata found in: ' + ', '.join(bad)) if bad else None; \ +all_paths = [str(p) for d in dirs for p in [d / 'manifest_reference.json', d / 'metadata' / 'scenario_instance.json'] if p.exists()]; \ +print(' '.join(all_paths)); \ +" > .validate_paths 2>&1 && \ + "$(PYTHON)" -m src.tools.validators.validation_suite \ + --run check-data-conformance \ + --data-paths $$(cat .validate_paths) \ + --artifacts "$(OMB)/artifacts" && \ + rm -f .validate_paths && \ + echo "[OK] Validation complete" || \ + { cat .validate_paths 2>/dev/null; rm -f .validate_paths; exit 1; } + +# ── Generate (full pipeline) ───────────────────────────────────────── + +generate: +ifeq ($(SUBCMD),clean) + @echo "[INFO] Removing generated/output/ directory..." + @"$(PYTHON)" -c "import shutil; shutil.rmtree('$(GEN_OUTPUT)', ignore_errors=True)" + @echo "[OK] Generated output removed (input/ blueprint preserved)" +else + $(call check_dev_setup) + @echo "[INFO] Preparing pipeline input..." + @"$(PYTHON)" scripts/convert_manifest.py "$(GEN_INPUT)/input_manifest.json" + @echo "[INFO] Running asset extraction pipeline..." + @cd "$(ASSET_TOOLS)" && "$(CURDIR)/$(PYTHON)" -X frozen_modules=off -m asset_extraction.main \ + "$(CURDIR)/$(GEN_INPUT)/uploadedFiles.json" \ + -config "$(CURDIR)/$(GEN_CONFIGS)" \ + -out "$(CURDIR)/$(GEN_OUTPUT)" + @echo "" + @echo "[OK] Asset generated in $(GEN_OUTPUT)/" +endif + +# ── Wizard (SD Creation Wizard frontend + API) ─────────────────────── + +wizard: + @echo "[INFO] SD Creation Wizard is not yet available for this asset type." + @echo " See: https://github.com/openMSL/sl-5-8-asset-tools for upstream status." + +# ── Clean ──────────────────────────────────────────────────────────── + +clean: +ifneq ($(firstword $(MAKECMDGOALS)),generate) +ifeq ($(SUBCMD),all) + @echo "[INFO] Cleaning everything..." + @rm -rf build/ dist/ .pytest_cache/ .mypy_cache/ "$(GEN_OUTPUT)" + @rm -rf *.egg-info + @rm -f *.zip .validate_paths + @rm -f "$(GEN_INPUT)/uploadedFiles.json" + @echo "[INFO] Removing virtual environment..." + @rm -rf "$(VENV)" + @echo "[OK] Full clean complete -- run 'make setup' to reinitialise" +else + @echo "[INFO] Cleaning..." + @rm -rf build/ dist/ .pytest_cache/ .mypy_cache/ "$(GEN_OUTPUT)" + @rm -rf *.egg-info + @rm -f *.zip .validate_paths + @rm -f "$(GEN_INPUT)/uploadedFiles.json" + @echo "[OK] Cleaned" +endif +else + @: +endif + +# ── Help ───────────────────────────────────────────────────────────── + +help: + @echo "scenario-asset-example -- Available Commands" + @echo "" + @echo " make setup Create venv and install all dependencies (incl. QC tools)" + @echo " make install Install packages" + @echo "" + @echo " make generate Run full pipeline: .xosc -> generated/ asset + zip" + @echo " make generate clean Remove generated/output/ directory" + @echo "" + @echo " make lint Lint (validates asset JSON-LD + Markdown)" + @echo " make lint-md Lint Markdown files only" + @echo " make format Auto-fix Markdown lint issues" + @echo " make validate Validate generated/output/ asset against SHACL" + @echo "" + @echo " make clean Remove all build artifacts, caches, and generated/" + @echo " make clean all Clean + remove venv (full reset)" + @echo "" + @echo "Debug logging:" + @echo " SL58_LOG_MODE=debug make generate" + @echo " Shows full subprocess command lines, stdout/stderr, and tracebacks." + @echo "" + @echo "Deterministic mode (reproducible output):" + @echo " SL58_DETERMINISTIC=1 make generate" + @echo " Same input files produce identical UUIDs, timestamps, and CID." + +# ── Catch-all for subcommand arguments ─────────────────────────────── +ifneq ($(filter setup generate clean install,$(firstword $(MAKECMDGOALS))),) +%: + @: +endif diff --git a/README.md b/README.md index fab46a1..5852fc5 100644 --- a/README.md +++ b/README.md @@ -1,82 +1,201 @@ -# Scenario Asset Example - -This repository serves as a reference for onboarding a Scenario asset into the ENVITED X Dataspace and can be used as a template for other dataspaces as well. It contains the full description as **`manifest_reference.json` - file** in addition to a consistent example of an Scenario asset data. - -A complete **`asset`** in a specific domain includes the data itself and all necessary files for describing, evaluating, and visualizing the dataset. - -The repository has the following folder structure and the asset sample can be downloaded as artifact from the lastest release (**`asset.zip`**). - -All ENVITED X Dataspace assets are defined according to [EVES-003](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html). - -## Installation - -If you want to use the validation scripts from 📁 `ontology-management-base/src` then you need to isntall the following dependencies: - -```bash -# clone and init submodules -git clone --recurse-submodules https://github.com/GAIA-X4PLC-AAD/scenario-asset-example.git - -# On Windows use python instead of python3 -sudo apt-get install python3-full -python3 -m venv .venv/ -source .venv/bin/activate # On Windows use: source .venv/Scripts/activate -python3 -m pip install -r ontology-management-base/requirements.txt -pre-commit install -# Example check -python3 ontology-management-base/src/check_jsonld_against_shacl_schema.py asset/manifest_reference.json asset/metadata/scenario_instance.json -``` - -## Repo Structure - -The Repo has the following structure: - -📁 `.github` *-> github workflows* - -📁 `asset` *-> contains the asset* - -- 📄 *`README.md`* (defines asset folder structure) -- 📄 *`..more..`* (see folder) - -📁 `ontology-management-base` - -- contains all SHACLs and ontologies needed for onboarding and registering datasets, including semantic and syntactic validation of the provided metadata. -- Versioned git submodule of [ontology-management-base](https://github.com/GAIA-X4PLC-AAD/ontology-management-base). - -📄 `CONTRIBUTING.md` *-> contributing guidelines* - -📄 `README.md` *-> documentation of the Repo and the asset* - -### Legend - -- 📁 `folder-name`: A folder in the repo. -- 📄 `assetName`: A file in the repo. -- (optional) : This file or folder is optional and can be added or omitted as needed. - -## FAQ - -### How can I easily create a Simulation Asset? - -- **Preparation :** *Ensure you understood this repository and the necessary data to create a SimulationAsset for the ENVITED-X Data Space and familiarize yourself with the concept of an asset [EVES-003](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html).* - -- **Provider Tools :** *You can use the [GaiaX 4 PLC-AAD Provider Tools](https://github.com/GAIA-X4PLC-AAD/provider-tools) to create your own asset in a guided way.* - -### Which roles can I define for access management? - -- **isOwner** *: The owner has full access to the asset and its associated files. This role includes permissions to download the asset.* - -- **isRegistered** *: A registered user has access to certain files and data within the asset but can't download the asset.* - -- **isPublic** *: A public user has only viewing rights to certain files or metadata.* - -### Which SCHAL - Files are used to generate the domainMetadata.json ? - --You need to use the following Ontology from [Ontology Management Base Repository](https://github.com/GAIA-X4PLC-AAD/ontology-management-base) - [Scenario Ontology](https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/main/scenario/scenario_ontology.ttl). - -## Usage - - 1. Read the `README.md` - file. - 2. Download the lastest `asset.zip` - file release. - 3. Explore the provided data files and documentation. - 4. Create the same folder and file structure for your asset, along with an appropriate `scenario_instance.json` - file and `manifest_reference.json` - file. - 5. Zip your fills to an `asset.zip` - file. - 6. You are now ready to upload `asset.zip` - file and start registration of your asset. +# Scenario Asset Example + +Reference repository for onboarding an **OpenSCENARIO Scenario** simulation asset into the [ENVITED-X Dataspace](https://envited-x.net). Use it as a template for your own scenario assets. + +All assets conform to [EVES-003](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html). + +## Prerequisites + +| Tool | Version | Notes | +|------|---------|-------| +| Python | ≥ 3.10 | `python3 --version` | +| Git | ≥ 2.34 | with LFS support (`git lfs install`) | +| Make | any | GNU Make recommended | +| Node.js | ≥ 18 | needed for Markdown linting (`npx markdownlint-cli2`) | +| Podman *(optional)* | ≥ 4.0 | only for `make wizard` | + +**macOS:** `brew install python git git-lfs make` + +**Ubuntu/Debian:** `sudo apt-get install python3-full python3-venv git git-lfs make` + +**Windows:** install [Python](https://python.org/downloads), [Git for Windows](https://git-scm.com) (includes Git Bash + Make). Use Git Bash or PowerShell. For Podman: [Podman Desktop](https://podman-desktop.io). + +## Quick Start + +```bash +# Clone with submodules +git clone --recurse-submodules https://github.com/ASCS-eV/scenario-asset-example.git +cd scenario-asset-example + +# Setup environment +make setup + +# Generate asset from input blueprint +make generate + +# Validate generated asset +make validate +``` + +## Asset Creation Flow + +### Input → Output + +```text +generated/input/ generated/output// +├── input_manifest.json ──┐ ├── manifest_reference.json +├── *.xosc (scenario) │ make ├── simulation-data/ +├── *.xosc (catalogs) ├──────→ │ └── *.xosc +├── impression-01.png │ generate ├── metadata/ +├── docs / readme │ │ └── scenario_instance.json +└── LICENSE ──┘ ├── media/ + ├── documentation/ + ├── validation-reports/ + └── .zip +``` + +### Two Creation Paths + +| | Automated (default) | Wizard-assisted | +|---|---|---| +| **Command** | `make generate` | `make wizard` → `make generate` | +| **How** | Pipeline auto-extracts metadata from `.xosc` + input manifest | SHACL-driven web UI enriches metadata interactively | +| **User action** | Place files in `generated/input/`, run one command | Start wizard at `http://localhost:4200`, fill forms, generate | +| **Best for** | CI/CD, batch processing, reproducible builds | First-time users, complex metadata, manual enrichment | + +> **Note:** `make wizard` requires **Podman** and is currently optional/experimental. The wizard may not yet support all asset types — see [sl-5-8-asset-tools](https://github.com/openMSL/sl-5-8-asset-tools) for upstream status. + +## Available Make Targets + +| Command | Description | +|---------|-------------| +| `make setup` | Create venv, install all dependencies (incl. QC tools) | +| `make generate` | Run full pipeline: `.xosc` → complete asset + zip | +| `make generate clean` | Remove `generated/output/` (preserves input blueprint) | +| `make validate` | Validate generated asset JSON-LD against SHACL shapes | +| `make lint` | Lint everything (JSON-LD validation + Markdown) | +| `make lint-md` | Lint Markdown files only | +| `make format` | Auto-fix Markdown lint issues | +| `make wizard` | Start SD Creation Wizard (requires Podman) | +| `make wizard stop` | Stop wizard containers | +| `make clean` | Remove build artifacts, caches, generated output | +| `make clean all` | Full reset (+ remove venv) | +| `make help` | Show all available commands | + +### Debug Logging + +```bash +SL58_LOG_MODE=debug make generate +``` + +### Deterministic Mode (Reproducible Output) + +```bash +SL58_DETERMINISTIC=1 make generate +``` + +Same input files produce identical UUIDs, timestamps, and CID. + +## Repository Structure + +```text +scenario-asset-example/ +├── generated/ +│ ├── input/ ← Pipeline inputs (tracked in git) +│ │ ├── input_manifest.json ← JSON-LD manifest describing inputs +│ │ ├── *.xosc ← OpenSCENARIO files +│ │ ├── *.png ← Preview images +│ │ ├── *_readme.txt ← Documentation +│ │ └── LICENSE ← Asset license +│ └── output/ ← Pipeline output (gitignored) +├── submodules/ +│ ├── sl-5-8-asset-tools/ ← Asset creation pipeline +│ │ └── external/ +│ │ └── ontology-management-base/ ← SHACL + ontologies +│ └── EVES/ ← EVES specification +├── Makefile ← Central command center +├── .pre-commit-config.yaml ← Pre-commit hooks +├── .github/ +│ ├── workflows/release.yml ← CI/CD pipeline +│ └── copilot-instructions.md ← AI agent instructions +└── README.md +``` + +## Metadata & Gaia-X + +The pipeline automatically adds [Gaia-X Trust Framework](https://gaia-x.eu/) vocabulary to every generated asset: + +- `gx:name`, `gx:license`, `gx:copyrightOwnedBy`, `gx:resourcePolicy` +- These live in closed GX-compliant nodes inside `metadata/scenario_instance.json` +- Domain-specific properties (scenario type, format version, content) use open ENVITED-X wrapper shapes + +Users don't need to understand Gaia-X — the pipeline handles compliance automatically. + +## Option B — Manual Pipeline (Without Make) + +```bash +# Setup +python3 -m venv .venv +source .venv/bin/activate +pip install -r submodules/sl-5-8-asset-tools/requirements.txt +pip install -e submodules/sl-5-8-asset-tools/external/ontology-management-base + +# Prepare input (converts input_manifest.json to uploadedFiles.json) +python3 scripts/convert_manifest.py generated/input/input_manifest.json + +# Generate +cd submodules/sl-5-8-asset-tools && \ +python3 -X frozen_modules=off -m asset_extraction.main \ + ../../generated/input/uploadedFiles.json \ + -config configs \ + -out ../../generated/output +``` + +## FAQ + +### How do I create my own Scenario asset? + +1. Fork this repository +2. Replace files in `generated/input/` with your `.xosc` scenario, catalogs, images, and docs +3. Update `generated/input/input_manifest.json` to list your files +4. Run `make generate && make validate` +5. Tag a release (`git tag v1.0.0 && git push --tags`) to trigger CI + +### Which access roles exist? + +| Role | Description | +|------|-------------| +| `isOwner` | Full access — can download the asset | +| `isRegistered` | Access to certain files but no download | +| `isPublic` | Viewing rights to metadata and previews | + +### Which SHACL shapes validate scenario metadata? + +The [Scenario Ontology](https://github.com/ASCS-eV/ontology-management-base/blob/main/scenario/) from ontology-management-base. Shapes are loaded offline from the `submodules/sl-5-8-asset-tools/external/ontology-management-base/` submodule — no internet required for validation. + +### How do I enable debug logging? + +```bash +SL58_LOG_MODE=debug make generate +``` + +Shows full subprocess command lines, stdout/stderr, and tracebacks. + +### How do I fix stale QC checker packages? + +```bash +make clean all +make setup +``` + +## Release Workflow + +The GitHub Actions workflow triggers on version tags (`v*.*.*`): + +1. Checks out repository with LFS and recursive submodules +2. Runs `make setup && make generate && make validate` +3. Uploads the pipeline-generated CID-named `.zip` as a GitHub release artifact via `softprops/action-gh-release@v2` + +## License + +[MPL-2.0](LICENSE) diff --git a/asset/README.md b/asset/README.md deleted file mode 100644 index ba0b93d..0000000 --- a/asset/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Testfeld Niedersachsen ALKS Scenario 4_4_1 Cut-In No Collision xosc template - -An ALKS Scenario for testing the ALKS Cut-In reaction ability. - -## Digital Assets - -This is a digital asset according to the ENVITED Ecosystem Specification [EVES-003](https://ascs-ev.github.io/EVES/EVES-003/eves-003.html) for the ENVITED-X Data Space. It can be used as a template for other dataspaces as well. It contains a fully described and consistent example of a digital asset including a **`manifest_referene.json` - file** as content registry. - -A complete **`digital asset`** in a specific domain includes the data itself and all necessary files for describing, evaluating, and visualizing the dataset. - -## Example Asset Folder Structure - -A sample **`digital asset`** can be downloaded from the [GAIA-X4PLC-AAD/scenario-asset-example](https://github.com/GAIA-X4PLC-AAD/scenario-asset-example) as artifact of the lastest release (**`asset.zip`**) containing the following structure: - -📁 `asset` - -- 📁 `simulation-data` - - 📄 `assetName.xodr` - - 📄 *`assetName_offset.xodr`* (optional) -- 📁 `documentation` - - 📄 `assetName_Documentation.pdf` - - 📄 *`assetName_[Name].[ext]`* (optional) -- 📁 `metadata` - - 📄 `scenario_instance.json` -- 📁 *`validation-reports`* (optional) - - 📄 *`qcReport.txt`* (optional) -- 📁 `media` - - 📁 `3d_preview` *-> 3d preview files* (optional) - - 📄 `assetName_01.png` *-> eyecatcher* - - 📄 *`assetName_[XX].png`* *-> impression* (optional) - - 📄 `bbox.geojson` - - 📄 *`roadNetwork.geojson`* (optional) - - 📄 *`detailRoadNetwork.geojson`* (optional) -- 📄 `README` -- 📄 `manifest.json` - -### Legend - -- 📁 `folder-name`: A folder in the repo. -- 📄 `assetName`: A file in the repo. -- (optional) : This file or folder is optional and can be added or omitted as needed. - -### Description of the respective folders - -- 📁 `simulation-data` : *Contains all valuble data files of the asset.* -- 📁 `documentation` : *Contains an instruction as well as technical specification of the asset.* -- 📁 `metadata` : *Contains all metadata which are necassary to describe this asset, that includes all domain sepcific metadata from the [Ontology Management Base Repository](https://github.com/GAIA-X4PLC-AAD/ontology-management-base) (and all GAIA-X metadata form the [gaia-x-compliant-claims-example](https://github.com/GAIA-X4PLC-AAD/gaia-x-compliant-claims-example) to be compliant with the [GAIA-X Trust Framework](https://docs.gaia-x.eu/policy-rules-committee/trust-framework/22.10/). -> needs to be defined in a next step)* -- 📁 `validation-reports` : *Contains the results provided by a validation suite.* -- 📁 `media` : *Contains all viusalization content from the asset which includes positionings decribed by a bounding box or maps as well as images and videos.* - -### Description of the respective files - -📄 `manifest_reference.json`: - -- *This manifest file defined the link structure depending on the domain sepecific asset.zip. It includes a context section defining namespaces for various terms, an identifier (`@id`) for the asset, and a type (`@type`) indicating it is a manifest. The `manifest:links` section contains multiple entries, each specifying a type of link (e.g., license, simulation-data, media) with details such as relative paths, formats, and access roles. Optional metadata and visualization files are also included, with different access roles like `isOwner`,`isRegistered`, and `isPublic`.* - -📄 `scenario_instance.json` (domain metadata): - -- *This JSON file describes the metadata and links associated with a scenario used in the Gaia-X 4 PLC-AAD project. It includes a context section defining namespaces for various terms, an identifier (@id) for the scenario, and a type (@type) indicating it is a scenario SimulationAsset. The `DataResource` section provides details such as the name, description, and the GAIA-X metadata from the [gaia-x-compliant-claims-example](https://github.com/GAIA-X4PLC-AAD/gaia-x-compliant-claims-example) to be compliant with the [GAIA-X Trust Framework](https://docs.gaia-x.eu/policy-rules-committee/trust-framework/22.10/). The `manifest` section contains multiple entries, each specified by a category of link (e.g., simulation-data, metadata, media, documentation, validation-report) with details such as URLs and types. The `format` section specifies the type and version of the scenario format. The `content` section describes road types, lane types, and traffic direction. The `quantity` section provides measurements like length, elevation range, and counts of intersections, traffic lights, and signs. The `quality` section details precision and accuracy metrics. The `dataSource` section lists the data sources and measurement system used. Finally, the `georeference` section provides geolocation information, including the bounding box and geodetic reference system.* - -### Create an asset - -You can use the GaiaX 4 PLC-AAD [Provider Services](https://github.com/GAIA-X4PLC-AAD/provider-services) and [Provider Tools](https://github.com/GAIA-X4PLC-AAD/provider-tools) to create your own digital asset. diff --git a/asset/manifest_reference.json b/asset/manifest_reference.json deleted file mode 100644 index 2bb3212..0000000 --- a/asset/manifest_reference.json +++ /dev/null @@ -1,510 +0,0 @@ -{ - "@context": { - "scenario": "https://ontologies.envited-x.net/scenario/v4/ontology#", - "envited-x": "https://ontologies.envited-x.net/envited-x/v2/ontology#", - "manifest": "https://ontologies.envited-x.net/manifest/v4/ontology#", - "georeference": "https://ontologies.envited-x.net/georeference/v3/ontology#", - "openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/", - "environment-model": "https://ontologies.envited-x.net/environment-model/v4/ontology#" , - "hdmap": "https://ontologies.envited-x.net/hdmap/v4/ontology#" , - "gx": "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#", - "sh": "http://www.w3.org/ns/shacl#", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "skos": "http://www.w3.org/2004/02/skos/core#" - }, - "@id": "did:web:registry.gaia-x.eu:Manifest:ZNh6G-tHPpkpxJhNobhXVmauYxrfTAZdQy9L", - "@type": "scenario:Manifest", - "rdf:type": { - "@id": "scenario:Manifest" - }, - "manifest:hasManifestReference": { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isManifest" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./manifest_reference.json", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/ld+json", - "@type": "xsd:string" - } - } - }, - "manifest:hasLicense": { - "@type": "manifest:License", - "gx:license": { - "@value": "MPL-2.0" - }, - "manifest:licenseData": { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isLicense" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "https://www.mozilla.org/en-US/MPL/2.0/", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "text/html", - "@type": "xsd:string" - } - } - } - }, - "manifest:hasReferencedArtifacts": [ - { - "@type": "manifest:Link", - "manifest:iri": { - "@id": "did:web:registry.gaia-x.eu:HdMap:DjHgK5ErTBow1Ya3J05tW9l12skGWgZn6kA9" - }, - "skos:note": { - "@value": "Referenced HD Map Simulation Asset from .", - "@type": "xsd:string" - }, - "sh:conformsTo": [ - { - "@id": "https://ontologies.envited-x.net/hdmap/v4/ontology" - }, - { - "@id": "https://ontologies.envited-x.net/manifest/v4/ontology" - } - ], - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isReferencedSimulationData" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "https://github.com/GAIA-X4PLC-AAD/hd-map-asset-example/releases/download/v0.2.2/Testfeld_Niedersachsen_ALKS_xodr_sample.zip", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/zip", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 7711574, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "Testfeld_Niedersachsen_ALKS_xodr_sample.zip", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:iri": { - "@id": "did:web:registry.gaia-x.eu:environment-model:xwsY5p3Z4Jjvf7XGp2PDnDFt36AlVhYnahHU" - }, - "skos:note": { - "@value": "Reference to Environment Model Simulation Asset from: .", - "@type": "xsd:string" - }, - "sh:conformsTo": [ - { - "@id": "https://ontologies.envited-x.net/environment-model/v4/ontology" - }, - { - "@id": "https://ontologies.envited-x.net/manifest/v4/ontology" - } - ], - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isReferencedSimulationData" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "https://github.com/GAIA-X4PLC-AAD/environment-model-asset-example/releases/download/v0.2.1/Testfeld_Niedersachsen_ALKS_3DModel_opt_osgb_sample.zip", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/zip", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 157944593, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "Testfeld_Niedersachsen_ALKS_3DModel_opt_osgb_sample.zip", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isReferencedSimulationData" - }, - "skos:note": { - "@value": "Reference to ALKS Vehicle Catalog from: .", - "@type": "xsd:string" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "https://github.com/openMSL/sl-3-1-osc-alks-scenarios/blob/master/logical_scenarios/concrete_scenarios/catalogs/vehicles/vehicle_catalog.xosc", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/x-xosc", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 10500, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "vehicle_catalog.xosc", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isReferencedSimulationData" - }, - "skos:note": { - "@value": "Reference to ALKS Pedestrian Catalog from: .", - "@type": "xsd:string" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "https://github.com/openMSL/sl-3-1-osc-alks-scenarios/blob/master/logical_scenarios/concrete_scenarios/catalogs/pedestrians/pedestrian_catalog.xosc", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/x-xosc", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 818, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "pedestrian_catalog.xosc", - "@type": "xsd:string" - } - } - } - ], - "manifest:hasArtifacts": [ - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isOwner" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isSimulationData" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./simulation-data/Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/x-xosc", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 13554, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isSimulationData" - }, - "skos:note": { - "@value": "Reference to ALKS Controllers Catalog from: .", - "@type": "xsd:string" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./simulation-data/controller_catalog.xosc", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/x-xosc", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 577, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "controller_catalog.xosc", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isDocumentation" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./README.md", - "@type": "xsd:anyURI" - }, - "manifest:cid": { - "@value": "bafkreihc5u3mpb3nzp7cnheqv4cv7z3y5e3yxyxyruy4a3g5emob4uidha", - "@type": "xsd:string" - }, - "manifest:mimeType": { - "@value": "text/markdown", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 5378, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "README.md", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:iri": { - "@id": "did:web:registry.gaia-x.eu:scenario:jvf7XGp2PDnDFt36AlVhYnahHUxwsY5p3Z4J" - }, - "skos:note": { - "@value": "The scenario_instance.json file that describes the full simulation asset.", - "@type": "xsd:string" - }, - "sh:conformsTo": [ - { - "@id": "https://ontologies.envited-x.net/envited-x/v2/ontology#" - }, - { - "@id": "https://ontologies.envited-x.net/manifest/v4/ontology#" - }, - { - "@id": "https://ontologies.envited-x.net/scenario/v4/ontology#" - }, - { - "@id": "https://ontologies.envited-x.net/georeference/v3/ontology#" - }, - { - "@id": "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#" - } - ], - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isMetadata" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./metadata/scenario_instance.json", - "@type": "xsd:anyURI" - }, - "manifest:cid": { - "@value": "bafkreihc5u3mpb3nzp7cnheqv4cv7z3y5e3yxyxyruy4a3g5emob4uidha", - "@type": "xsd:string" - }, - "manifest:mimeType": { - "@value": "application/ld+json", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 6838, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "scenario_instance.json", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isRegistered" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isValidationReport" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/x-xqar", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 7463, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isRegistered" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isDocumentation" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./documentation/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt", - "@type": "xsd:anyURI" - } - , - "manifest:mimeType": { - "@value": "text/plain", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 90, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isRegistered" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isValidationReport" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc_QCReport.txt", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "text/plain", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 11570, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc_QCReport.txt", - "@type": "xsd:string" - } - } - }, - { - "@type": "manifest:Link", - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isMedia" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./media/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_impression-01.png", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "image/png", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 2382216, - "@type": "xsd:integer" - }, - "manifest:filename": { - "@value": "ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_impression-01.png", - "@type": "xsd:string" - } - } - } - ] -} diff --git a/asset/metadata/scenario_instance.json b/asset/metadata/scenario_instance.json deleted file mode 100644 index d0415f6..0000000 --- a/asset/metadata/scenario_instance.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "@context": { - "scenario": "https://ontologies.envited-x.net/scenario/v4/ontology#", - "envited-x": "https://ontologies.envited-x.net/envited-x/v2/ontology#", - "manifest": "https://ontologies.envited-x.net/manifest/v4/ontology#", - "georeference": "https://ontologies.envited-x.net/georeference/v3/ontology#", - "openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/", - "environment-model": "https://ontologies.envited-x.net/environment-model/v4/ontology#" , - "hdmap": "https://ontologies.envited-x.net/hdmap/v4/ontology#" , - "gx": "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#", - "sh": "http://www.w3.org/ns/shacl#", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "skos": "http://www.w3.org/2004/02/skos/core#" - }, - "@id": "did:web:registry.gaia-x.eu:scenario:jvf7XGp2PDnDFt36AlVhYnahHUxwsY5p3Z4J", - "@type": "scenario:Scenario", - "scenario:hasDataResource": { - "@type": "envited-x:DataResource", - "gx:name": { - "@value": "Testfeld Niedersachsen ALKS Scenario 4_4_1 Cut-In No Collision xosc template", - "@type": "xsd:string" - }, - "gx:description": { - "@value": "An ALKS Scenario for testing the ALKS Cut-In reaction ability.", - "@type": "xsd:string" - } - }, - "scenario:hasDataResourceExtension": { - "@type": "scenario:DataResourceExtension", - "scenario:hasFormat": { - "@type": "scenario:Format", - "scenario:formatType": "ASAM OpenSCENARIO", - "scenario:version": { - "@value": "1.1", - "@type": "xsd:string" - } - }, - "scenario:hasContent": { - "@type": "scenario:Content", - "scenario:abstractionLevel": "Logical", - "scenario:timeDate": { - "@value": "2021-07-09T10:00:00", - "@type": "xsd:dateTime" - }, - "scenario:aim": { - "@value": "Test the reaction of an ALKS system with regards to a cut-in maneuver.", - "@type": "xsd:string" - }, - "scenario:movementDescription": { - "@value": "LaneChangeAction", - "@type": "xsd:string" - }, - "scenario:usedStandardFunctions": { - "@value": "ConstraintGroup, Init, LanePosition, Center, Performance, SpeedActionDynamics, Storyboard, PrivateAction, LateralAction, StoryboardElementStateCondition, LongitudinalAction, FileHeader, RelativeLanePosition, ScenarioObject, Condition, Vehicle, BoundingBox, LaneChangeAction, ManeuverGroup, ParameterDeclarations, RoadNetwork, Properties, SimulationTimeCondition, TeleportAction, EntityCondition, Axles, Actors, RelativeDistanceCondition, RearAxle, Act, Property, LaneChangeActionDynamics, StopTrigger, SceneGraphFile, ObjectController, StartTrigger, TriggeringEntities, ControllerAction, ByEntityCondition, ParameterDeclaration, Position, ByValueCondition, CatalogLocations, Actions, SpeedActionTarget, Maneuver, Event, Dimensions, ValueConstraint, FrontAxle, SpeedAction, Action, Entities, ConditionGroup, RelativeTargetLane, LogicFile, Controller, Story, EntityRef, RelativeTargetSpeed, Private, ActivateControllerAction, AbsoluteTargetSpeed, LaneChangeTarget", - "@type": "xsd:string" - } - }, - "scenario:hasQuantity": { - "@type": "scenario:Quantity", - "scenario:numberTrafficObjects": { - "@value": 2, - "@type": "xsd:unsignedInt" - }, - "scenario:controllers": [ - "ALKSController" - ] - }, - "scenario:hasQuality": { - "@type": "scenario:Quality" - }, - "scenario:hasDataSource": { - "@type": "scenario:DataSource" - }, - "scenario:hasGeoreference": { - "@type": "georeference:Georeference", - "georeference:hasProjectLocation": { - "@type": "georeference:ProjectLocation", - "georeference:country": { - "@value": "DE", - "@type": "xsd:string" - }, - "georeference:state": { - "@value": "DE-NI", - "@type": "xsd:string" - }, - "georeference:region": { - "@value": "Landkreis Helmstedt", - "@type": "xsd:string" - }, - "georeference:city": { - "@value": "Koenigslutter am Elm", - "@type": "xsd:string" - }, - "georeference:relationOrArea": { - "@value": "A 39", - "@type": "xsd:string" - }, - "georeference:hasBoundingBox": { - "@type": "georeference:BoundingBox", - "georeference:xMin": { - "@value": 10.720740862799195, - "@type": "xsd:float" - }, - "georeference:yMin": { - "@value": 52.29672229543727, - "@type": "xsd:float" - }, - "georeference:xMax": { - "@value": 10.730432209669724, - "@type": "xsd:float" - }, - "georeference:yMax": { - "@value": 52.31580272353997, - "@type": "xsd:float" - } - } - }, - "georeference:hasGeodeticReferenceSystem": { - "@type": "georeference:GeodeticReferenceSystem", - "georeference:codeEPSG": { - "@value": 32632, - "@type": "xsd:int" - }, - "georeference:hasOrigin": { - "@type": "georeference:LatLonCoordinate", - "georeference:lat": { - "@value": 52.275329463992996, - "@type": "xsd:float" - }, - "georeference:lon": { - "@value": 10.685571633942278, - "@type": "xsd:float" - } - }, - "georeference:hasViewPoint": { - "@type": "georeference:LatLonCoordinate", - "georeference:lat": { - "@value": 52.30626250948862, - "@type": "xsd:float" - }, - "georeference:lon": { - "@value": 10.72558653623446, - "@type": "xsd:float" - } - }, - "georeference:heightSystem": "Ellipsoidal height" - } - } - }, - "scenario:hasManifest": { - "@type": "manifest:Link", - "manifest:iri": { - "@id": "did:web:registry.gaia-x.eu:Manifest:Rp5Ny9lS8DcK3hB2uQ0fTm7jW4vXz1YgRkE6" - }, - "skos:note": { - "@value": "Ensure that 'manifest_reference.json' contains all required categories: simulationData, documentation, metadata, media.", - "@type": "xsd:string" - }, - "sh:conformsTo": [ - { - "@id": "https://ontologies.envited-x.net/envited-x/v2/ontology#" - }, - { - "@id": "https://ontologies.envited-x.net/manifest/v4/ontology#" - }, - { - "@id": "https://ontologies.envited-x.net/scenario/v4/ontology#" - } - ], - "manifest:hasAccessRole": { - "@type": "manifest:AccessRole", - "@id": "envited-x:isPublic" - }, - "manifest:hasCategory": { - "@type": "manifest:Category", - "@id": "envited-x:isManifest" - }, - "manifest:hasFileMetadata": { - "@type": "manifest:FileMetadata", - "manifest:filePath": { - "@value": "./manifest_reference.json", - "@type": "xsd:anyURI" - }, - "manifest:mimeType": { - "@value": "application/ld+json", - "@type": "xsd:string" - }, - "manifest:cid": { - "@value": "bafkreihc5u3mpb3nzp7cnheqv4cv7z3y5e3yxyxyruy4a3g5emob4uidha", - "@type": "xsd:string" - }, - "manifest:fileSize": { - "@value": 6838, - "@type": "xsd:integer" - } - } - } -} diff --git a/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar b/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar deleted file mode 100644 index 933f10e..0000000 --- a/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc_QCReport.txt b/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc_QCReport.txt deleted file mode 100644 index 60dc418..0000000 --- a/asset/validation-reports/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc_QCReport.txt +++ /dev/null @@ -1,218 +0,0 @@ -==================================================================================================== -QC4OpenX - Pooled results -==================================================================================================== - -InputFile: ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen.xosc - -==================================================================================================== - CheckerBundle: xoscBundle - Build date: 2025-03-07 - Build version: v1.0.0-rc.1 - Description: OpenScenario checker bundle - Summary: 17 checker(s) are executed. 5 checker(s) are completed. 12 checker(s) are skipped. 0 checker(s) have internal error and 0 checker(s) do not contain status. - Parameters: InputFile = E:/Test/uploads/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen.xosc - resultFile = E:/Test/output/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen/validation/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_asam_cb_xosc.xqar - - - Checker: check_asam_xosc_xml_valid_xml_document - Description: The given file to check must be a valid XML document. - Status: completed - Summary: 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.0.0:xml.valid_xml_document - - Checker: check_asam_xosc_xml_root_tag_is_openscenario - Description: The root element of a valid XML document must be OpenSCENARIO. - Status: completed - Summary: 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.0.0:xml.root_tag_is_openscenario - - Checker: check_asam_xosc_xml_fileheader_is_present - Description: Below the root element a tag with FileHeader must be defined. - Status: completed - Summary: 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.0.0:xml.fileheader_is_present - - Checker: check_asam_xosc_xml_version_is_defined - Description: The FileHeader tag must have the attributes revMajor and revMinor and of type unsignedShort. - Status: completed - Summary: 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.0.0:xml.version_is_defined - - Checker: check_asam_xosc_xml_valid_schema - Description: Input xml file must be valid according to the schema. - Status: completed - Summary: 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.0.0:xml.valid_schema - - Checker: check_asam_xosc_reference_control_uniquely_resolvable_entity_references - Description: Reference names must be unique - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.uniquely_resolvable_entity_references - - Checker: check_asam_xosc_reference_control_resolvable_signal_id_in_traffic_signal_state_action - Description: TrafficSignalStateAction:name -> Signal ID must exist within the given road network. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.resolvable_signal_id_in_traffic_signal_state_action - - Checker: check_asam_xosc_reference_control_resolvable_traffic_signal_controller_by_traffic_signal_controller_ref - Description: The trafficSignalController according to the trafficSignalControllerRef property must exist within the scenarios RoadNetwork definition. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.resolvable_traffic_signal_controller_by_traffic_signal_controller_ref - - Checker: check_asam_xosc_reference_control_valid_actor_reference_in_private_actions - Description: In a ManeuverGroup, if the defined action is a private action an actor must be defined. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.valid_actor_reference_in_private_actions - - Checker: check_asam_xosc_reference_control_resolvable_entity_references - Description: A named reference in the EntityRef must be resolvable. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.resolvable_entity_references - - Checker: check_asam_xosc_reference_control_resolvable_variable_reference - Description: The VariableDeclaration according to the variableRef property must exist within the ScenarioDefinition. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.resolvable_variable_reference - - Checker: check_asam_xosc_reference_control_resolvable_storyboard_element_reference - Description: The attribute storyboardElementRef shall point to an existing element of the corresponding type and shall be uniquely resolvable. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.resolvable_storyboard_element_reference - - Checker: check_asam_xosc_reference_control_unique_element_names_on_same_level - Description: Element names at each level shall be unique at that level. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:reference_control.unique_element_names_on_same_level - - Checker: check_asam_xosc_parameters_valid_parameter_declaration_in_catalogs - Description: All parameters used within a catalog shall be declared within their ParameterDeclaration in the same catalog, which sets a default value for each parameter. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:parameters.valid_parameter_declaration_in_catalogs - - Checker: check_asam_xosc_data_type_allowed_operators - Description: Expressions in OpenSCENARIO must only use the allowed operands. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:data_type.allowed_operators - - Checker: check_asam_xosc_data_type_non_negative_transition_time_in_light_state_action - Description: Expressions in OpenSCENARIO must only use the allowed operands. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:data_type.non_negative_transition_time_in_light_state_action - - Checker: check_asam_xosc_positive_duration_in_phase - Description: Expressions in OpenSCENARIO must only use the allowed operands. - Status: skipped - Summary: Version 1.1.0 is lower than definition setting 1.2.0. Skip the check. 0 issue(s) are found. - - Addressed Rules: - - rule: asam.net:xosc:1.2.0:data_type.positive_duration_in_phase -==================================================================================================== - -Rules report - - -Total number of addressed rules: 17 - -> Addressed RuleUID: asam.net:xosc:1.0.0:xml.fileheader_is_present - - -> Addressed RuleUID: asam.net:xosc:1.0.0:xml.root_tag_is_openscenario - - -> Addressed RuleUID: asam.net:xosc:1.0.0:xml.valid_schema - - -> Addressed RuleUID: asam.net:xosc:1.0.0:xml.valid_xml_document - - -> Addressed RuleUID: asam.net:xosc:1.0.0:xml.version_is_defined - - -> Addressed RuleUID: asam.net:xosc:1.2.0:data_type.allowed_operators - - -> Addressed RuleUID: asam.net:xosc:1.2.0:data_type.non_negative_transition_time_in_light_state_action - - -> Addressed RuleUID: asam.net:xosc:1.2.0:data_type.positive_duration_in_phase - - -> Addressed RuleUID: asam.net:xosc:1.2.0:parameters.valid_parameter_declaration_in_catalogs - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.resolvable_entity_references - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.resolvable_signal_id_in_traffic_signal_state_action - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.resolvable_storyboard_element_reference - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.resolvable_traffic_signal_controller_by_traffic_signal_controller_ref - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.resolvable_variable_reference - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.unique_element_names_on_same_level - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.uniquely_resolvable_entity_references - - -> Addressed RuleUID: asam.net:xosc:1.2.0:reference_control.valid_actor_reference_in_private_actions - -Total number of rules with found issues: 0 - -Rules for information: 0 -Rules with warning issues: 0 -Rules with error issues: 0 -==================================================================================================== - -==================================================================================================== - -Note - -Rule UID format: - ::x.y.z:rule_set.for_rules.rule_name - -where - Emanating Entity: a domain name for the entity (organization or company) that declares the rule UID - Standard: a short string that represents the standard or the domain to which the rule is applied - Definition Setting: the version of the standard or the domain to which the rule appears or is applied for the first time - Rule Full Name: the full name of the rule, as dot separated, snake lower case string. - The full name of a rule is composed by the rule set, a categorization for the rule, - and the rule name, a unique string inside the categorization. - The rule set can be nested (meaning that can be defined as an - arbitrary sequence of dot separated names, while the name is the snake - case string after the last dot of the full name) - -==================================================================================================== - diff --git a/asset/documentation/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt b/generated/input/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt similarity index 100% rename from asset/documentation/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt rename to generated/input/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt diff --git a/generated/input/LICENSE b/generated/input/LICENSE new file mode 100644 index 0000000..7505c05 --- /dev/null +++ b/generated/input/LICENSE @@ -0,0 +1,382 @@ +Scenario Asset Example +=============================== + +Copyright (C) see contributors + +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/asset/simulation-data/Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc b/generated/input/Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc similarity index 100% rename from asset/simulation-data/Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc rename to generated/input/Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc diff --git a/asset/simulation-data/controller_catalog.xosc b/generated/input/controller_catalog.xosc similarity index 100% rename from asset/simulation-data/controller_catalog.xosc rename to generated/input/controller_catalog.xosc diff --git a/asset/media/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_impression-01.png b/generated/input/impression-01.png similarity index 100% rename from asset/media/ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_impression-01.png rename to generated/input/impression-01.png diff --git a/generated/input/input_manifest.json b/generated/input/input_manifest.json new file mode 100644 index 0000000..e9bb0e0 --- /dev/null +++ b/generated/input/input_manifest.json @@ -0,0 +1,82 @@ +{ + "@context": [ + "https://w3id.org/ascs-ev/envited-x/manifest/v5/", + { + "envited-x": "https://w3id.org/ascs-ev/envited-x/envited-x/v3/" + } + ], + "@id": "did:web:registry.gaia-x.eu:Scenario:generated", + "@type": "envited-x:Manifest", + "hasArtifacts": [ + { + "@type": "Link", + "hasCategory": { + "@id": "envited-x:isSimulationData" + }, + "hasAccessRole": { + "@id": "envited-x:isOwner" + }, + "hasFileMetadata": { + "@type": "FileMetadata", + "filePath": "Testfeld_Niedersachsen_ALKS_Scenario_4_4_1_Cut-In_No_Collision_xosc_template.xosc", + "mimeType": "application/x-xosc" + } + }, + { + "@type": "Link", + "hasCategory": { + "@id": "envited-x:isSimulationData" + }, + "hasAccessRole": { + "@id": "envited-x:isPublic" + }, + "hasFileMetadata": { + "@type": "FileMetadata", + "filePath": "controller_catalog.xosc", + "mimeType": "application/x-xosc" + } + }, + { + "@type": "Link", + "hasCategory": { + "@id": "envited-x:isMedia" + }, + "hasAccessRole": { + "@id": "envited-x:isPublic" + }, + "hasFileMetadata": { + "@type": "FileMetadata", + "filePath": "impression-01.png", + "mimeType": "image/png" + } + }, + { + "@type": "Link", + "hasCategory": { + "@id": "envited-x:isDocumentation" + }, + "hasAccessRole": { + "@id": "envited-x:isPublic" + }, + "hasFileMetadata": { + "@type": "FileMetadata", + "filePath": "ALKS_Scenario_4_4_1_CutInNoCollision_TEMPLATE_TestfeldNiedersachsen_readme.txt", + "mimeType": "text/plain" + } + } + ], + "hasLicense": { + "@type": "Link", + "hasCategory": { + "@id": "envited-x:isLicense" + }, + "hasAccessRole": { + "@id": "envited-x:isPublic" + }, + "hasFileMetadata": { + "@type": "FileMetadata", + "filePath": "LICENSE", + "mimeType": "text/plain" + } + } +} diff --git a/ontology-management-base b/ontology-management-base deleted file mode 160000 index c79c77d..0000000 --- a/ontology-management-base +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c79c77dee00ac1f367ffd6111dcde6596dbaa2b0 diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 6958883..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,5 +0,0 @@ -[tool.black] -line-length = 88 - -[tool.isort] -profile = "black" diff --git a/scripts/convert_manifest.py b/scripts/convert_manifest.py new file mode 100755 index 0000000..1943a96 --- /dev/null +++ b/scripts/convert_manifest.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Convert input_manifest.json (JSON-LD) to uploadedFiles.json (pipeline format). + +Usage: + python3 scripts/convert_manifest.py generated/input/input_manifest.json + # writes uploadedFiles.json next to input_manifest.json +""" + +import json +import pathlib +import sys + + +TYPE_MAP = { + "isSimulationData": "Asset", + "isMedia": "Image", + "isDocumentation": "Document", + "isLicense": "License", +} + + +def convert(manifest_path: pathlib.Path) -> pathlib.Path: + """Read a JSON-LD input_manifest and produce uploadedFiles.json. + + Local filenames are resolved to absolute paths so the pipeline can + locate them regardless of the working directory. + """ + manifest = json.loads(manifest_path.read_text(encoding="utf-8")) + input_dir = manifest_path.parent.resolve() + + artifacts = list(manifest.get("hasArtifacts", [])) + lic = manifest.get("hasLicense") + if lic: + artifacts.append(lic) + + uploaded = [] + for artifact in artifacts: + meta = artifact.get("hasFileMetadata", {}) + filepath = meta.get("filePath", "") + # Resolve local paths to absolute so the pipeline finds them + if filepath and not filepath.startswith(("http://", "https://")): + abs_path = input_dir / filepath + if abs_path.exists(): + filepath = str(abs_path) + category = ( + artifact.get("hasCategory", {}).get("@id", "").replace("envited-x:", "") + ) + file_type = TYPE_MAP.get(category, "Document") + entry = {"filename": filepath, "type": file_type, "category": category} + did = manifest.get("@id") + if did: + entry["did"] = did + uploaded.append(entry) + + out_path = manifest_path.parent / "uploadedFiles.json" + out_path.write_text(json.dumps(uploaded, indent=2, ensure_ascii=False) + "\n") + return out_path + + +def main() -> None: + if len(sys.argv) < 2: + print(f"Usage: {sys.argv[0]} ", file=sys.stderr) + sys.exit(1) + + manifest_path = pathlib.Path(sys.argv[1]) + if not manifest_path.exists(): + sys.exit(f"[ERR] {manifest_path} not found. Stage input files first.") + + out = convert(manifest_path) + print(f"[OK] Generated {out}") + + +if __name__ == "__main__": + main() diff --git a/submodules/EVES b/submodules/EVES new file mode 160000 index 0000000..2a6cbb1 --- /dev/null +++ b/submodules/EVES @@ -0,0 +1 @@ +Subproject commit 2a6cbb12d0566ca989620e75e98719e378b78efe diff --git a/submodules/sl-5-8-asset-tools b/submodules/sl-5-8-asset-tools new file mode 160000 index 0000000..e5f7c63 --- /dev/null +++ b/submodules/sl-5-8-asset-tools @@ -0,0 +1 @@ +Subproject commit e5f7c63afedd00ee376623be56d6e9a696a4c89f