pyMDG

所属分类:自动编程
开发工具:Python
文件大小:1379KB
下载次数:0
上传日期:2023-03-01 08:57:08
上 传 者sh-1993
说明:  UML模型驱动模式、代码、数据和文档的生成。
(UML Model Driven Generation of schema, code, data and documentation.)

文件列表:
LICENSE (7652, 2023-03-01)
MANIFEST.in (79, 2023-03-01)
confluence.py (726, 2023-03-01)
docs (0, 2023-03-01)
docs\Corporate.PNG (85739, 2023-03-01)
docs\Makefile (634, 2023-03-01)
docs\_static (0, 2023-03-01)
docs\_static\css (0, 2023-03-01)
docs\_static\css\custom.css (1744, 2023-03-01)
docs\_static\image (0, 2023-03-01)
docs\_static\image\Class.JPG (46443, 2023-03-01)
docs\_static\image\MDGUML.JPG (22858, 2023-03-01)
docs\_static\image\Package.JPG (28044, 2023-03-01)
docs\_static\image\Sample.JPG (533341, 2023-03-01)
docs\_static\image\sparx_tut_datamodel.png (50217, 2023-03-01)
docs\_static\image\testmodel.png (49110, 2023-03-01)
docs\conf.py (2028, 2023-03-01)
docs\feature-tests.rst (584, 2023-03-01)
docs\feature-tools.rst (866, 2023-03-01)
docs\index.rst (2191, 2023-03-01)
docs\make.bat (760, 2023-03-01)
docs\metamodel.rst (884, 2023-03-01)
docs\nomenclature.rst (827, 2023-03-01)
docs\recipes.rst (2852, 2023-03-01)
docs\source (0, 2023-03-01)
docs\source\mdg.generate.confluence.rst (793, 2023-03-01)
docs\source\mdg.generate.rst (412, 2023-03-01)
docs\source\mdg.parse.rst (934, 2023-03-01)
docs\source\mdg.rst (397, 2023-03-01)
docs\source\mdg.tests.rst (1140, 2023-03-01)
docs\source\mdg.tools.rst (1177, 2023-03-01)
docs\source\mdg.uml.rst (144, 2023-03-01)
docs\source\modules.rst (46, 2023-03-01)
... ...

![Test](https://github.com/Semprini/pyMDG/workflows/Test/badge.svg) ![PyPI](https://github.com/Semprini/pyMDG/workflows/PyPI/badge.svg) [![Documentation Status](https://readthedocs.org/projects/pymdg/badge/?version=latest)](https://pymdg.readthedocs.io/en/latest/?badge=latest) # pyMDG ## Overview Parser and tools to perform model driven generation of artifacts (code, schema, documentation etc) from UML models. Current version supports Sparx EA Generated XMI 2.1, Sparx DB (including sqlite which is the '.qea' native file format for Sparx v16+) or diagrams.net XML. Coming soon is ERWIN XMI 1.0 Used to parse model files to native classes (see metamodel below) which are passed to jinja2 templates for generation of code (POJO, POCO, Django etc), JSON data and HTML documentation. Quickstart and docs can be found here: [readthedocs](https://pymdg.readthedocs.io/en/latest/index.html) ## Test Testing (powershell): > .\test.ps1 Testing (unittest): > python -m unittest ## Generate To generate code call the generate script and pass in the recipe folder. A sample recipe folder is provided in the github repo: > python mdg-tool.py generate ./sample_recipe/drawio/config-drawio-django.yaml Or once installed into site-packages execute: > mdg-tool generate See the sample_recipe configs for examples ## Sparx EA XMI (versions earlier than V16) Export Process The UML parser expects a specific package hierarchy, please see the sample EA file. - In Sparx select the domain root node (e.g. Model/Sample ) - Select the publish tab at the top - Select Publish As... from top menu - Set export type as XMI 2.1 - Optionally select 'Export Diagrams', 'Generate Diagram Images' and PNG format - Export to folder where you want to generate from Note: Sparx V16+ does not need to be export. Parser uses native SQLite file format which is the same schema as database repositories. ## Draw.io Export Process The UML parser expects a specific package layout which mimics the Sparx hierarchy, please see the sample files. - In the web editor select Export As -> XML - Uncheck 'Compressed' ## Wiki documentation upload If your generation recipe has created a file for your wiki (Confluence) then an uploader utilitity can be used. This assumes that you have done the XMI export from Sparx EA with export diagrams and generate diagram images. To generate a confluence token please see: https://confluence.atlassian.com/cloud/api-tokens-938839638.html > python mdg/confluence.py {your email} {your confluence token} {confluence page id} {path to images} {doc filename} ## Nomenclature: This diagram shows all the features and how to model in UML ![Nomenclature](https://github.com/Semprini/pyMDG/raw/master/sample_recipes/images/EAID_9100ADB5_EFF8_4ded_BA61_E85***C8134AC.png) ## Sample model ![Sample model](https://github.com/Semprini/pyMDG/raw/master/sample_recipes/images/EAID_96AC850E_2FD0_4e6c_B00E_C030EDA89F42.png) ## Metamodel This diagram shows the internal classes which are passed to the templates during generation. ![Metamodel](https://github.com/Semprini/pyMDG/raw/master/sample_recipes/images/EAID_B080F856_9EFB_46f2_8D69_1C79956D714A.png) ## Build the docs Install sphinx ``` > cd pyMDG > sphinx-apidoc -o docs\source mdg > cd docs > make html ```

近期下载者

相关文件


收藏者