A webapp for exploring Capella models
Project description
Capella Model Explorer
A webapp for exploring Capella models through simple "auto-generated" textual and graphical views.
Longer story
We see a larger non-MBSE crowd struggling with the things hidden in the model. With this app we expose model contents in an easy to review readable form with basic graphical annotations. Under the hood it uses Jinja templates enabling the tooling teams to support their users with model-derived documents of any shape and form.
Use cases
-
Provide insights into / "spell-out" the model for non-MBSE stakeholders via document-a-like dynamic views that describe model elements in a human-readable form.
-
Provide meaningful default views (that can be further customized) for the key elements to kickstart the model exploration.
There are a few more use cases but we will reveal them a bit later.
Installation
You can install the latest released version directly from PyPI.
pip install capella-model-explorer
Run the app
The app comes with a command line interface (CLI). Run cme --help to get help
or cme SUBCOMMAND --help to get help for any subcommand.
cme run --help
When running the app, the used IP address and port are printed to the console.
Run the app locally
cme run
Build a Docker image and run the app in a container
docker build -t capella-model-explorer .
cme run --container --image capella-model-explorer
Above will start the app with a sample model which can be found here: In-Flight Entertainment System
Stop the app via CTRL+C.
Run the app in a container with a custom remote model
export CME_MODEL='git+https://github.com/dbinfrago/Capella-IFE-sample.git'
export CME_PORT=5000 # optional, default is 8000
cme run --container
More information describing what kinds of values can be specified via the
environment variable CME_MODEL can be found in the capellambse
documentation.
Run the app in a container with a custom local model
If you want to be able to explore a local Capella model, you can mount a local model into the container.
export CME_MODEL=/path/on/host/to/model
cme run --container
Run the app in a container and enable live report template editing
If you want to be able to live edit and test local templates, you can mount a local model and a templates folder into the container. Live template reloading and rendering will be enabled.
export CME_TEMPLATES_DIR=$(realpath ./templates)
cme run --container
Integration in the Capella Collaboration Manager
The Capella Model Explorer can be integrated into the Capella Collaboration
Manager. Navigate to
Settings > Tools, then Add a new tool with the following configuration:
name: Capella model explorer
integrations:
t4c: false
pure_variants: false
config:
resources:
cpu:
requests: 0.4
limits: 2
memory:
requests: 1.6Gi
limits: 6Gi
environment:
CME_MODEL:
stage: before
value:
path: "{CAPELLACOLLAB_SESSION_PROVISIONING[0][path]}"
diagram_cache:
path: "{CAPELLACOLLAB_SESSION_PROVISIONING[0][diagram_cache]}"
password: "{CAPELLACOLLAB_SESSION_API_TOKEN}"
username: "{CAPELLACOLLAB_SESSION_REQUESTER_USERNAME}"
fallback_render_aird: "true"
CME_LOG_FILE: /var/log/session/model-explorer.log
CME_LIVE_MODE: "0"
CME_ROUTE_PREFIX: "{CAPELLACOLLAB_SESSIONS_BASE_PATH}"
connection:
methods:
- id: f51872a8-1a4f-4a4d-b4f4-b39cbd31a75b
type: http
name: Browser connection
ports:
metrics: 8000
http: 8000
sharing:
enabled: true
redirect_url: "{CAPELLACOLLAB_SESSIONS_SCHEME}://{CAPELLACOLLAB_SESSIONS_HOST}:{CAPELLACOLLAB_SESSIONS_PORT}{CAPELLACOLLAB_SESSIONS_BASE_PATH}/"
monitoring:
prometheus:
path: /metrics
logging:
enabled: true
provisioning:
directory: /models
max_number_of_models: 1
required: true
provide_diagram_cache: true
persistent_workspaces:
mounting_enabled: false
supported_project_types:
- general
You can tune the resources according to your needs.
After saving the configuration, you have to add a version for the new tool. Since the Capella Model Explorer can load different Capella versions, we can use one generic version:
name: "Generic"
config:
is_recommended: true
is_deprecated: false
sessions:
persistent:
image: ghcr.io/dbinfrago/capella-model-explorer/model-explorer:latest
backups:
image: null
compatible_versions: [1, 2, 3, 4]
Replace the numbers in compatible_versions with the version IDs for the
versions you want to support.
When configured properly, users will be able to start read-only sessions for the Capella Model Explorer. More information about read-only sessions is available in the Capella Collaboration Manager documentation.
Theme
The app comes with a default light and dark theme and the hue value for the
primary color can be customized via the environment variable
CME_PRIMARY_COLOR_HUE. The default hue value is 231 which corresponds to the
purple/blue color used as primary color in the Capella Collaboration Manager
documentation.
Contributing
We'd love to see your bug reports and improvement suggestions! Please take a look at our guidelines for contributors for details. It also contains a short guide on how to set up a local development environment.
Licenses
This project is compliant with the REUSE Specification Version 3.0.
Copyright DB InfraGO AG, licensed under Apache 2.0 (see full text in LICENSES/Apache-2.0.txt)
Dot-files are licensed under CC0-1.0 (see full text in LICENSES/CC0-1.0.txt)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capella_model_explorer-0.3.9.tar.gz.
File metadata
- Download URL: capella_model_explorer-0.3.9.tar.gz
- Upload date:
- Size: 198.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59c0cec6d5bdcbb0a3fc2e040dba96aa9ebcb37678db1792307e833bab4c55af
|
|
| MD5 |
23fdcd3e7f576612dc22b120fc7f0137
|
|
| BLAKE2b-256 |
0e5b82f21518428bdadf922816fe2696f5b636ea58bf912198ea417b23f18a9d
|
Provenance
The following attestation bundles were made for capella_model_explorer-0.3.9.tar.gz:
Publisher:
build-test-publish.yml on dbinfrago/capella-model-explorer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capella_model_explorer-0.3.9.tar.gz -
Subject digest:
59c0cec6d5bdcbb0a3fc2e040dba96aa9ebcb37678db1792307e833bab4c55af - Sigstore transparency entry: 799606548
- Sigstore integration time:
-
Permalink:
dbinfrago/capella-model-explorer@791eac9b4a7c7622d504669abbb47a242b1a9eb0 -
Branch / Tag:
refs/tags/v0.3.9 - Owner: https://github.com/dbinfrago
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-publish.yml@791eac9b4a7c7622d504669abbb47a242b1a9eb0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file capella_model_explorer-0.3.9-py3-none-any.whl.
File metadata
- Download URL: capella_model_explorer-0.3.9-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0729d7b404296e57591aba641147132ad0955c36bb3015352894cbb64b635814
|
|
| MD5 |
6bd7324e22cf1381d82353a39aaadbd9
|
|
| BLAKE2b-256 |
d01029f3a0f00fd0e3f7dbd3124885c709a0c809a7d76ad5d8d8599615df0f02
|
Provenance
The following attestation bundles were made for capella_model_explorer-0.3.9-py3-none-any.whl:
Publisher:
build-test-publish.yml on dbinfrago/capella-model-explorer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capella_model_explorer-0.3.9-py3-none-any.whl -
Subject digest:
0729d7b404296e57591aba641147132ad0955c36bb3015352894cbb64b635814 - Sigstore transparency entry: 799606580
- Sigstore integration time:
-
Permalink:
dbinfrago/capella-model-explorer@791eac9b4a7c7622d504669abbb47a242b1a9eb0 -
Branch / Tag:
refs/tags/v0.3.9 - Owner: https://github.com/dbinfrago
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-publish.yml@791eac9b4a7c7622d504669abbb47a242b1a9eb0 -
Trigger Event:
push
-
Statement type: