hbmartin / graphviz2drawio

Convert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.
https://pypi.org/project/graphviz2drawio/
GNU General Public License v3.0
186 stars 32 forks source link

Clusters/Subgraphs #55

Closed samkhal closed 3 months ago

samkhal commented 1 year ago

Adds support for converting clusters. Basically just treats clusters as a kind of Node.

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.64%.

Quality metrics Before After Change
Complexity 2.78 ⭐ 2.96 ⭐ 0.18 👎
Method Length 60.21 ⭐ 61.20 🙂 0.99 👎
Working memory 7.50 🙂 7.70 🙂 0.20 👎
Quality 74.39% 🙂 73.75% 🙂 -0.64% 👎
Other metrics Before After Change
Lines 233 254 21
Changed files Quality Before Quality After Quality Change
graphviz2drawio/graphviz2drawio.py 72.93% 🙂 69.78% 🙂 -3.15% 👎
graphviz2drawio/models/SvgParser.py 63.34% 🙂 56.75% 🙂 -6.59% 👎
graphviz2drawio/mx/MxGraph.py 68.71% 🙂 68.71% 🙂 0.00%
test/test_graphs.py 86.42% ⭐ 86.09% ⭐ -0.33% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
graphviz2drawio/mx/MxGraph.py MxGraph.get_edge_style 8 ⭐ 164 😞 13 😞 48.45% 😞 Try splitting into smaller methods. Extract out complex expressions
graphviz2drawio/models/SvgParser.py SvgParser.get_elements 8 ⭐ 124 😞 14 😞 51.42% 🙂 Try splitting into smaller methods. Extract out complex expressions
graphviz2drawio/graphviz2drawio.py convert 4 ⭐ 154 😞 10 😞 58.52% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!