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.
Quick start
Clone, then build and run locally with Docker:
docker build -t model-explorer:latest .
docker run --name=cme -e ROUTE_PREFIX="" \
-v /absolute/path/to/your/model/folder/on/host:/model \
-v "$PWD/templates:/views" -p 8000:8000 model-explorer
Then open your browser at http://localhost:8000/views and start exploring
your model.
While the thing is running you can edit the templates in the templates folder
and see the changes immediately in the browser.
Development (local)
To run the app in dev mode you'll need to first run make build-frontend. This
is needed by the backend to have some statics to serve. Then run make dev-backend in one terminal and make dev-frontend in another terminal. The
backend and statically built frontend will be served at
http://localhost:8000. The live frontend will be served by vite at
http://localhost:5173 (or similar, it will be printed in the terminal where
you ran make dev-frontend).
Installation
You can install the latest released version directly from PyPI.
pip install capella-model-explorer
To set up a development environment, clone the project and install it into a virtual environment.
git clone https://github.com/DSD-DBS/capella-model-explorer
cd capella-model-explorer
python -m venv .venv
source .venv/bin/activate.sh # for Linux / Mac
.venv\Scripts\activate # for Windows
pip install -U pip pre-commit
pip install -e '.[docs,test]'
pre-commit install
Development
This repo contains a Makefile with recipes for a few commonly needed tasks
during development. Run make help for more details.
Developing the frontend
To develop frontend components, run:
make storybook
To develop the app as a whole, run:
make dev-frontend
Note that this requires a running backend server, see the next section.
Backend development
To run the backend, use the following command:
make run MODEL=../path/to/model.aird
This will start the API server on http://localhost:8000, where it will serve
the frontend in production mode. These static files can be rebuilt with make build-frontend, although it is usually more convenient to run the frontend in
development mode with make dev-frontend (see above).
The MODEL parameter can be set to anything that
capellambse.loadcli
understands, but some functionality requires a Git-backed model (e.g. using a
git+https:// URL).
Integration in the Capella Collaboration Manager
The Capella Model Explorer can be integrated into the Capella Collaboration Manager.
To do so, you need a running instance of the Capella Collaboration Manager.
Navigate to Menu > Settings > Tools > Add a new tool and fill in the
following configuration:
name: "Capella model explorer"
integrations:
t4c: false
pure_variants: false
jupyter: false
config:
resources:
cpu:
requests: 0.4
limits: 2
memory:
requests: 1.6Gi
limits: 6Gi
environment:
MODEL_ENTRYPOINT:
stage: before
value: "{CAPELLACOLLAB_SESSION_PROVISIONING[0][path]}"
ROUTE_PREFIX: "{CAPELLACOLLAB_SESSIONS_BASE_PATH}"
connection:
methods:
- id: f51872a8-1a4f-4a4d-b4f4-b39cbd31a75b
type: http
name: Direct Browser connection
sharing:
enabled: true
ports:
metrics: 8000
http: 8000
redirect_url: "{CAPELLACOLLAB_SESSIONS_SCHEME}://{CAPELLACOLLAB_SESSIONS_HOST}:{CAPELLACOLLAB_SESSIONS_PORT}{CAPELLACOLLAB_SESSIONS_BASE_PATH}/"
monitoring:
prometheus:
path: /metrics
provisioning:
directory: /models
max_number_of_models: 1
persistent_workspaces:
mounting_enabled: false
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/dsd-dbs/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.
Contributing
We'd love to see your bug reports and improvement suggestions! Please take a look at our guidelines for contributors for details.
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)
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.2.5.tar.gz.
File metadata
- Download URL: capella_model_explorer-0.2.5.tar.gz
- Upload date:
- Size: 142.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09c335123f569ad21486c62431bf17460ebbc570e519621f7789883359526da5
|
|
| MD5 |
3180e4926998762072b04ab615cad3b3
|
|
| BLAKE2b-256 |
c9f5d93b3828a7acbc5ba6ac33856b7ddc77da2d8dac40ca2759d207d0bce2b3
|
Provenance
The following attestation bundles were made for capella_model_explorer-0.2.5.tar.gz:
Publisher:
build-test-publish.yml on DSD-DBS/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.2.5.tar.gz -
Subject digest:
09c335123f569ad21486c62431bf17460ebbc570e519621f7789883359526da5 - Sigstore transparency entry: 169277027
- Sigstore integration time:
-
Permalink:
DSD-DBS/capella-model-explorer@37fb705c339971f805bb0de84bf8dc8f6e0ae6f1 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/DSD-DBS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-publish.yml@37fb705c339971f805bb0de84bf8dc8f6e0ae6f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file capella_model_explorer-0.2.5-py3-none-any.whl.
File metadata
- Download URL: capella_model_explorer-0.2.5-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d1e0c80ff0ae9b04a8e60fd288198f6d14386181407e306c7979f78ea99664
|
|
| MD5 |
c053f03aadd389c71337afb61788ac35
|
|
| BLAKE2b-256 |
d86e94d4301fcbd8ac57307b0384f8e9eacb5395db40b33b33363cdd9dba33d5
|
Provenance
The following attestation bundles were made for capella_model_explorer-0.2.5-py3-none-any.whl:
Publisher:
build-test-publish.yml on DSD-DBS/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.2.5-py3-none-any.whl -
Subject digest:
25d1e0c80ff0ae9b04a8e60fd288198f6d14386181407e306c7979f78ea99664 - Sigstore transparency entry: 169277028
- Sigstore integration time:
-
Permalink:
DSD-DBS/capella-model-explorer@37fb705c339971f805bb0de84bf8dc8f6e0ae6f1 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/DSD-DBS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-test-publish.yml@37fb705c339971f805bb0de84bf8dc8f6e0ae6f1 -
Trigger Event:
push
-
Statement type: