Model your architecture in an easy to understand language inspired by Yaml, and generate XMI (UML2) and PlantUML outputs.
Project description
SofaMan
SofaMan is an easy to use software architecture modeling language inspired by YAML. It is designed to be easy to read and write, and to be easily converted to other modeling language formats. At present there are two languages supported, XMI (UML2) and PlantUML.
The project uses Pixi for project management.
Example
The following shows an example model using the SofaMan modeling language.
#
# Sample sofa model.
#
package Retail.CRM:
visibility: public
stereotype Regulatory: [GDPR]
stereotype Security: [PIDRelevant]
actor Client
actor RelationshipManager
component RESTService:
ports: [443]
component CustomerDB:
name: Customer Database
description:|
Holds customer data
stereotypes: [Regulatory.GDPR]
package: Retail.CRM
ports: [443, REST]
component CustomerSearch(RESTService):
package: Retail
ports: [443]
relation CustomerSearch@443 flow CustomerDB@REST:
name: Execute search query
description: |
Search for customers by name or address
stereotypes: [Regulatory.GDPR]
The above model generates the following PUML.
@startuml sample
allowmixing
actor Client
actor RelationshipManager
component RESTService {
port 443
}
package Retail.CRM {
component CustomerDB <<GDPR>> {
port 443
port REST
}
}
package Retail {
component CustomerSearch {
port 443
}
}
443 ..> REST
@enduml
All the supported modeling syntax can be found in tests/test_cases/full_all.sofa
Usage
Run
pixi run python sofaman/sofamangen.py --help
Run tests
pixi run test
Test coverage
pixi run coverage
Documentation
pixi run doc
The latest documentation can be found at: https://ruhati.net/sofaman/
Using without Pixi
pip install sofaman
python -m sofaman.sofamangen --help
Generate UML2 XMI
python -m sofaman.sofamangen generate a_model.sofa a_model.xmi
If you already have a XMI file and want to ensure updates to it are done using the same IDs (so as to preserve the diagram and other elements)
-
Generate the ID file
python -m sofaman.sofamangen export a_model.xmi a_model_id.json -
You can use the id file while re-generating the XMI
python -m sofaman.sofamangen generate a_model.sofa a_model.xmi --ids_file
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 sofaman-0.1.7.tar.gz.
File metadata
- Download URL: sofaman-0.1.7.tar.gz
- Upload date:
- Size: 91.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27eb9aebc37d4830a0369f93ecbfbe594a7765522bf166a19d1d0d29a545301b
|
|
| MD5 |
51d96b07c4457afbdf64ebc51d374377
|
|
| BLAKE2b-256 |
453ff11b614409314614cbe1c39124402ff6dc920c2643f7ce713a0d343d770c
|
Provenance
The following attestation bundles were made for sofaman-0.1.7.tar.gz:
Publisher:
python-publish.yml on ivellapillil/sofaman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sofaman-0.1.7.tar.gz -
Subject digest:
27eb9aebc37d4830a0369f93ecbfbe594a7765522bf166a19d1d0d29a545301b - Sigstore transparency entry: 196710743
- Sigstore integration time:
-
Permalink:
ivellapillil/sofaman@fd6ee4969af66716649cd87a856b552901453c01 -
Branch / Tag:
refs/tags/sofaman-0.1.7 - Owner: https://github.com/ivellapillil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fd6ee4969af66716649cd87a856b552901453c01 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sofaman-0.1.7-py3-none-any.whl.
File metadata
- Download URL: sofaman-0.1.7-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c79ac9fa9b6d4c7658f1c1fe66172c29259a844e219f92d25450be1bdd77c29e
|
|
| MD5 |
48b07a0d7b85389d1dfaacafd18843f9
|
|
| BLAKE2b-256 |
996cde793ac7b56294bb35a78a000bd1f459af07d35de38ef121cc872185eca6
|
Provenance
The following attestation bundles were made for sofaman-0.1.7-py3-none-any.whl:
Publisher:
python-publish.yml on ivellapillil/sofaman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sofaman-0.1.7-py3-none-any.whl -
Subject digest:
c79ac9fa9b6d4c7658f1c1fe66172c29259a844e219f92d25450be1bdd77c29e - Sigstore transparency entry: 196710744
- Sigstore integration time:
-
Permalink:
ivellapillil/sofaman@fd6ee4969af66716649cd87a856b552901453c01 -
Branch / Tag:
refs/tags/sofaman-0.1.7 - Owner: https://github.com/ivellapillil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fd6ee4969af66716649cd87a856b552901453c01 -
Trigger Event:
release
-
Statement type: