# 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.
