App that generates UML diagram based on your code
For the UMLGenerator to work, you should download Graphviz
Note: Remember add Graphviz to the system path
Write #@UML ignore before defintition of the class, so that it is ignored:
# class A won't be drawn
#@UML ignore
class A: To ignore field / method, write #@UML ignore on the same line:
# variable example won't be drawn
self.example = 10 #@UML ignore# function func won't be drawn
def func(self): #@UML ignoreTo indicate a composition, point the type of variable using typing
class A:
pass
class B:
def __init__(self):
# a is composition of class A
self.a: A = A()If this an aggregation, just write #@UML aggr after variable:
(any prefix of "aggregation" can be used instead of "aggr")
self.a: A = A() #@UML aggrIn order for the class in the diagram to be in some group / groups, write before definition #@UML clusters and then names of all groups, separated by commas. It is better to write names from a larger group to a smaller one, but not necessarily
#@UML clusters Group1
class A:
pass
#@UML clusters Group1, Group2
class B:
pass
#@UML clusters Group1, Group2, Group3
class CorrectOrder:
pass
#@UML clusters Group2, Group1, Group4, Group3
class IncorrectOrder:
passNote: If you want to use several modifications at once, separate them with ';' :
#@UML clusters Group1, Group2; ignore
class B:
def __init__(self):
self.a: int = 10 #@UML ignore; aggrIf you want to enable option, write true/1/yes, otherwise - false/0/no
Ignores private fields
By default - true
ignores protected fields
By default - true
If IgnorePrivate enabled, ignores private fields that are composition/aggregation
By default - false
If IgnoreProtected enabled, ignores protected fields that are composition/aggregation
By default - false
If enabled, reads files only in this directory, otherwise goes recursively through all folders
By default - false
Enable drawing classes that are someone's composition/aggregation or parent class, but have no declaration in the code
By default - true
Enables grouping of classes into groups in the same way as they are defined in files
By default - true
If GroupByFiles enabled, enable drawing group (not its classes) which contains one class
By default - false
Remove access prefixes from private and protected fields
By default - true
Enable alternative graphviz engine. By default it is DOT engine, the alternative - FDP. Almost always FDP works much worse
By default - false
Changes the color of diagram. There can be any HTML color here
By default - yellow
There you can write a list of local file paths to be read
By default - Read all *.py files
There you can write a list of local file paths to be ignored
By default - ignores nothing



