![]() This outputs the following PlantUML content: py2puml.domainĬlass. Once py2puml is installed at the system level, an eponymous command is available in your environment shell.įor example, to create the diagram of the classes used by py2puml, run: py2puml py2puml/domain py2puml.domain If you like tools related with PlantUML, you may also be interested in this lucsorel/plantuml-file-loader project:Ī webpack loader which converts PlantUML files into images during the webpack processing (useful to include PlantUML diagrams in your slides with RevealJS or RemarkJS). To generate image files, use the PlantUML runtime, a docker image of the runtime (see think/plantuml) or of a server (see the CLI documentation below) generated and hosted along other code documentation (better option: generated documentation should not be versioned with the codebase).versioned along your code with a unit-test ensuring its consistency (see the test_py2puml.py's test_py2puml_model_on_py2uml_domain example).Py2puml outputs diagrams in PlantUML syntax, which can be: Parsing abstract syntax trees to detect the instance attributes defined in _init_ constructors The detection of composition relationships relies on type annotations only, assigned values or expressions are never evaluated to prevent unwanted side-effects composition and inheritance relationships (between your domain classes only, for documentation sake).static class attributes and dataclass fields.Inspection and type annotations to detect: Featuresįrom a given path corresponding to a folder containing Python code, py2puml processes each Python module and generates a PlantUML script from the definitions of various data structures using: Some parsing features are available only since Python 3.8 (like ast.get_source_segment). Py2puml internally uses code inspection (also called reflexion in other programming languages) and abstract tree parsing to retrieve relevant information. Py2puml produces a class diagram PlantUML script representing classes properties (static and instance attributes) and their relations (composition and inheritance relationships). PlantUML is a component that allows you to quickly write the following diagrams in plain and simple intuitive language - a.k.a. Click on the link to 'Edit in settings.json'. Generate PlantUML class diagrams to document your Python application. 3 Answers Sorted by: 34 The GRAPHVIZDOT environment variable is specified in File > Preferences > Settings > Plantuml: Command Args.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |