Sign inSign up

chgio/python4capella-docker

By chgio

•Updated almost 2 years ago

Docker image for Python4Capella.

Image
Developer tools
0

988

chgio/python4capella-docker repository overview

⁠python4capella-docker

GitHub Repo stars GitHub Actions Workflow Status

Docker image to run Python4Capella⁠ scripts on Capella⁠ models, for continuous integration or containerised testing.

⁠Installation

$ docker pull chgio/python4capella-docker:latest

⁠Usage

⁠With sample content

The container comes pre-packaged with a number of sample Python4Capella scripts⁠ and the sample In-Flight Entertainment System Capella model⁠, so you can get a taste of how it works with:

$ docker run chgio/python4capella-docker:latest \
  sample/scripts/Python4Capella-Scripts/List_logical_components_in_console.py \
  sample/models/In-Flight\ Entertainment\ System/In-Flight\ Entertainment\ System.aird
⁠With custom content

The container expects bind mounts at /workspace/user/scripts and /workspace/user/models, so you can run your custom Python4Capella script on your custom Capella model with:

$ docker run \
  -v <path to Python4Capella project>:/workspace/user/scripts/<name of Python4Capella project> \
  -v <path to Capella project>:/workspace/user/models/<name of Capella project> \
  chgio/python4capella-docker:latest \
  /user/scripts/<name of Python4Capella project>/<path to Python4Capella script>.py \
  /user/models/<name of Python4Capella project>/<path to Capella model>.aird \
  <extra script args>

where:

fieldmeaning
<path to Python4Capella project>local path to the directory containing the .project file for your Python4Capella project
<name of Python4Capella project>the name of your Python4Capella project, matching the one between <name> tags in its .project file
<path to Capella project>local path to the directory containing the .project file for your Capella project
<name of Capella project>the name of your Capella project, matching the one between <name> tags in its .project file
<path to Python4Capella script>path to the .py script to run, relative to <path to Python4Capella project>
<path to Capella model>path to the .aird model to run the script on, relative to <path to Capella project>
<extra script args>space-separated list of any additional arguments to feed to the Python4Capella script

⁠Acknowledgements

The following projects were taken as significant reference on installing, configuring, and executing Capella and Python4Capella in Docker:

Tag summary

Content type

Image

Digest

sha256:8a2b57d4b…

Size

1.2 GB

Last updated

almost 2 years ago

docker pull chgio/python4capella-docker