-
Notifications
You must be signed in to change notification settings - Fork 28
/
README.uml
32 lines (28 loc) · 1.44 KB
/
README.uml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# To make pyreverse provide a reasonably complete UML diagram we need to add
# in fake declarations where it does not realise there is a "has a"
# relationship. We simply qualify these with if False so they never get called.
# All fake declarations have a comment "# for pyreverse"
# The two cases that require fake declarations are
# 1: when a class creates a list of other classes,
# 2: when class names are passed by argument.
# for the dynamo 0.3 api:
pyreverse -A -p dynamo0p3 dynamo0p3.py # -A includes base classes
dotty classes_dynamo0p3.dot # to view
dot -Tsvg classes_dynamo0p3.dot > classes_dynamo0p3.svg # to generate svg
dot -Tpng classes_dynamo0p3.dot > classes_dynamo0p3.png # to generate png
# for the gocean 1.0 api:
pyreverse -A -p gocean1p0 gocean1p0.py
dotty classes_gocean1p0.dot
dot -Tsvg classes_gocean1p0.dot > classes_gocean1p0.svg
dot -Tpng classes_gocean1p0.dot > classes_gocean1p0.png
# To make the (dynamo0p3) topclasses.png file:
# 1) Create the required dynamo0p3 dot file as described above.
# 2) Manually edit the dot file to remove any unwanted nodes and
edges.
# 3) Add ... style=filled, fillcolor="antiquewhite" ... to the nodes
that require shading.
# 4) Manually remove internal variables (note, there may be a way to
avoid outputting these in the first place). The resultant dot file -
dynamo0p3_topclasses.dot - has been kept in the doc directory for
reference.
# 5) Create the png file from the dot file as described above.