Skip to content

Commit

Permalink
action to automatically update uml diagrams (#208)
Browse files Browse the repository at this point in the history
* create uml_action yml file

* debug

* fix path typo

* try a different action

first option tried was limited to master branch pushes

* add dot to args

* add class dot file from pyreverse

* update path to find dot files

* try different path to dot file

* run action to test graphviz install

* try different input file format

* add start and end flags to dot file

* Update uml_action.yml

* update path

* update path in second location

* add commit changes

* GitHub PlantUML generation auto-update

* remove graphvizdot flag

* GitHub PlantUML generation auto-update

* add graphviz testdot flag back

* switch to svg

* remove changes

* GitHub PlantUML generation auto-update

* try as a uml instead of dot

* try using pyreverse directly

* add package install

* try non-pip install of graphviz

* add sudo

* add requirements install

* ignore tests and install icepyx

* fix path to find file

* fix path to find file

* GitHub PlantUML generation auto-update

* try using current branch for commit

* remove plantuml and png files

* generate umls and remove extra files from testing

* update docs with new uml diagrams. Add visualization class to components list

* update action trigger to after approved pull request reviews

Co-authored-by: Romina Piunno <romina.piunno@gmail.com>
  • Loading branch information
JessicaS11 and RomiP authored Jul 1, 2021
1 parent 31ba438 commit 808296c
Show file tree
Hide file tree
Showing 10 changed files with 644 additions and 377 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/uml_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update UML diagrams
on:
workflow_dispatch:
pull_request_review:
types: [submitted]

jobs:
diagrams:
if: github.event.review.state == 'approved'
name: Update UML diagrams
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: set up environment
run: |
pip install -r requirements.txt
pip install icepyx pylint
sudo apt-get install graphviz
- name: run pyreverse
run: |
pyreverse ./icepyx/core -p user_uml -o svg
pyreverse ./icepyx/core -f ALL -p dev_uml -o svg
rm ./packages_dev_uml.svg
mv ./*.svg ./doc/source/user_guide/documentation/
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: GitHub Action
message: "GitHub action UML generation auto-update"
add: "./doc/source/user_guide/documentation/*"
ref: git branch --show-current
263 changes: 263 additions & 0 deletions doc/source/user_guide/documentation/classes_dev_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
221 changes: 221 additions & 0 deletions doc/source/user_guide/documentation/classes_user_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions doc/source/user_guide/documentation/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ variables
---------

.. automodule:: icepyx.core.variables
:members:
:undoc-members:
:show-inheritance:

visualize
---------

.. automodule:: icepyx.core.visualization
:members:
:undoc-members:
:show-inheritance:
14 changes: 11 additions & 3 deletions doc/source/user_guide/documentation/icepyx.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
icepyx Documentation (API Reference)
====================================

.. image:: icepyx_class_diagram.png
.. image:: packages_user_uml.svg
:width: 600
:alt: PlantUML Class Diagram illustrating the public-facing classes within icepyx, their attributes and methods, their relationships (e.g. component classes).
:alt: UML package Diagram illustrating the public-facing, high-level packages within icepyx and their relationships.

icepyx package diagram illustrating the library's public-facing, high-level package structure and their relationships.

icepyx class diagram illustrating the library's public-facing classes, their attributes and methods, and their relationships.

.. image:: classes_user_uml.svg
:width: 600
:alt: UML Class Diagram illustrating the public-facing classes within icepyx, their attributes and methods, their relationships (e.g. component classes).

icepyx class diagram illustrating the library's public-facing classes, their attributes and methods, and their relationships.
A more detailed, developer UML class diagram showing hidden parameters is available on GitHub in the ``icepyx/doc/source/user_guide/documentation/`` directory.
Diagrams are updated automatically after a pull request (PR) is approved and before it is merged to the development branch.

.. toctree::

Expand Down
187 changes: 0 additions & 187 deletions doc/source/user_guide/documentation/icepyx_architecture.wsd

This file was deleted.

Loading

0 comments on commit 808296c

Please sign in to comment.