Skip to main content

Tools for comparing different versions of a Capella model

Project description

Capella Diff Tools

Lint Apache 2.0 License Code style: Black Imports: isort

Tools for comparing different versions of a Capella model

Screenshot of the HTML report comparing two versions of the coffee-machine demo model

Quick start

Run the capella-diff-tool with a Git repo and two versions, being either commit hashes or branch names:

capella-diff-tool coffee-machine index-links/base index-links/left
diagrams:
  sa:
    Missions Capabilities Blank:
      modified:
      - display_name: '[MCB] Capabilities'
        uuid: _J1uyIFucEe2iJbuWznnyfw
    System Architecture Blank:
      modified:
      - display_name: '[SAB] make coffee'
        uuid: _MWuNkFuvEe2iJbuWznnyfw
    System Data Flow Blank:
      modified:
      - display_name: '[SDFB] make coffee'
        uuid: _FOutoFujEe2iJbuWznnyfw
metadata:
  model:
    path: git+https://github.com/DSD-DBS/coffee-machine.git
  new_revision:
    author: martinlehmann
    date: 2023-09-27 14:31:03+02:00
    description: 'fix: Inflation is real, we cannot afford real coffee [skip ci]'
    hash: 908a6b909dcdc071ffc0c424502d8f47d82d9f49
    revision: index-links/left
  old_revision:
    author: martinlehmann
    date: 2023-09-27 14:30:47+02:00
    description: 'refactor: Fragment out SA and OA [skip ci]'
    hash: cb0918af3df822344a80eda3fef6463bcf4c36f3
    revision: index-links/base
objects:
  sa:
    SystemFunction:
      modified:
      - attributes:
          name:
            current: make black water
            previous: make coffee
        display_name: make black water
        uuid: 8b0d19df-7446-4c3a-98e7-4a739c974059

The CLI's first argument accepts the name of a known model, a local folder, or JSON describing a remote model. Currently it only supports Git, but a Python API is available for more advanced comparisons.

The capella-diff-tool can also generate a human-friendly report in HTML form. Use the -r / --report flag and specify a filename to write the HTML report:

capella-diff-tool coffee-machine index-links/base index-links/left -r coffee-machine.html

Installation

You can install the latest released version directly from PyPI.

pip install capella-diff-tools

To set up a development environment, clone the project and install it into a virtual environment.

git clone https://github.com/DSD-DBS/capella-diff-tools
cd capella-diff-tools
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

API Documentation

The capella_diff_tools Python package exposes a Python API, which can be used to compare arbitrary models programmatically. Documentation for this API is available on Github pages.

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 Netz 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capella_diff_tools-1.1.1.tar.gz (93.4 kB view details)

Uploaded Source

Built Distribution

capella_diff_tools-1.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file capella_diff_tools-1.1.1.tar.gz.

File metadata

  • Download URL: capella_diff_tools-1.1.1.tar.gz
  • Upload date:
  • Size: 93.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for capella_diff_tools-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8e001ac4440f0efb30d22e1dee0df4628e1ce18c4043fe8dd8f02ecf27f91598
MD5 480362a486ede8dc160f53ddaa05a977
BLAKE2b-256 aae45cb6da2799754526be4e1f6ff46df4150ef307ffbe74efe84c914753c823

See more details on using hashes here.

File details

Details for the file capella_diff_tools-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for capella_diff_tools-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aab6bade895c21e47caa923b3b41a5a4af0e2b648b545159c50cdac05f52c2cc
MD5 2d4b2b02d68c08e4c6c55253c4531bb2
BLAKE2b-256 2b79f8b3d4fff8cfbf438b77a1dd08b81ebccc2323a57a43fcf84e660a44522e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page