Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
77 changes: 77 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.venv/
.vscode/
asset.zip
/.venv/
output.log
*.zip
/generated/output/
!/generated/input/
/generated/input/uploadedFiles.json
.validate_paths
10 changes: 7 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -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
50 changes: 10 additions & 40 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Loading