bo4e / BO4E-python

Python Library that Implements the BO4E Standard
MIT License
13 stars 5 forks source link

Visualiserung / UML-Diagramme #374

Closed hf-kklein closed 2 years ago

hf-kklein commented 2 years ago

Die Anforderung an die UML-Diagramme sind:

Dieses Ticket dient dazu, unsere bisherigen Versuche mit ihren jeweiligen Vor- und Nachteilen zu dokumentieren.

hf-krechan commented 2 years ago

Pyreverse and Graphviz

Requirements

How to

// create .dot file
pyreverse src/bo4e/bo
// draw uml diagram
dot -Tpng classes.dot -o bo4e-uml.png

Man kann damit verschiedene Formate erstellen

dot -Kdot -Tpng classes.dot -o bo4e-uml-dot.png
dot -Kneato -Tpng classes.dot -o bo4e-uml-neato.png
dot -Ktwopi -Tpng classes.dot -o bo4e-uml-twopi.png
dot -Kcirco -Tpng classes.dot -o bo4e-uml-twopi.png
dot -Ktwopi -Tpng classes.dot -o bo4e-uml-twopi.png
dot -Kcirco -Tpng classes.dot -o bo4e-uml-circo.png
dot -Kfdp -Tpng classes.dot -o bo4e-uml-fdp.png
dot -Kosage -Tpng classes.dot -o bo4e-uml-osage.png
dot -Kpatchwork -Tpng classes.dot -o bo4e-uml-patchwork.png
dot -Ksfdp -Tpng classes.dot -o bo4e-uml-sfdp.png

Diese sehen unterschiedlich gut aus

Results

circo

bo4e-uml-circo

dot

bo4e-uml-dot

fdp

bo4e-uml-fdp

neato

bo4e-uml-neato

osage

bo4e-uml-osage

patchwork

bo4e-uml-patchwork

sfdp

bo4e-uml-sfdp

twopi

bo4e-uml-twopi

Probleme

Resumé

✅ Die Diagramme sollen mindestens teilweise automatisiert erstellt werden um Schiefständen zwischen Doku und Code-Realität vorzubeugen. ✅ Die Diagramme sollen die lowerCamelCase Nomenklatur verwenden. ❌ Die Diagramme sollen 1:[0-n] Kardinalitäten sauber abbilden können. ❌ Die Diagramme sollen vollständig aber nicht unübersichtlich sein.

hf-kklein commented 2 years ago

@snsttr die json-schemas liegen auch alle im git (also außerhalb von sphinx) https://github.com/bo4e/BO4E-python/tree/main/json_schemas/bo

hf-kklein commented 2 years ago

For the record: I also tried gituml: https://plantuml.atug.com/svg/nLDDJyCm3BtdLrZY0eZr1qnJ9H1IB-mqE5TfwgvXIr8bALC7_7UyDcND-13Y09NQEiyljf_ZY2rt3gxr6WlZuPa1FLnNbg_HOaMltWUiPxYI-rP527tHHeZ6Mfr2hHgXGkeIAokT7vOczrtJcwxXrcDljjgZtQCKjKQRVqprkN-I-8bRoOcasIjZ6JfHSwoyCyKZRZmiNcQZPZPglvpDKhWnzrq3yx6go4VIqKk5v8wx4R5MlGZY13MHyrZ8mKcbJs8DudvC3reZVbYuKJpHZttuIilaF4w2kSQYg8-flstwh_OEcfcO3k5ArAZuVunYNqQkkSA_7SUWU3AK0nBw4iBbJGUBXJ9bkyKq9HFEbrV6YbgM5q30sIstcnNop29gQXybcknCalTBFWTXjETIEqW_fuI28gB0WqQeZ3dyCYIXD4Cb51raqZyixs2tsoLhIMUoJOHHx0q0

https://gituml.com/ztree_scratchpad also I do have a paid account but the problems described above are testable/reproducable with the free version, too.

lord-haffi commented 2 years ago

Does it have to be in one diagram? 'Cause with pyreverse you can define the scope so I think it should be possible to make several little UML diagram which could easily be placed inside the docs with the extension sphinx.ext.graphviz.

hf-kklein commented 2 years ago

Does it have to be in one diagram?

no. one diagram per business object is just fine.