hbmartin / graphviz2drawio

Convert graphviz (dot) files into draw.io / lucid (mxGraph) format
http://graphviz2drawio.rtfd.io
GNU General Public License v3.0
163 stars 33 forks source link

Clusters/Subgraphs (Sourcery refactored) #56

Closed sourcery-ai[bot] closed 5 days ago

sourcery-ai[bot] commented 1 year ago

Pull Request #55 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/hbmartin/graphviz2drawio pull/55/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.78 ⭐ 2.77 ⭐ -0.01 👍
Method Length 60.21 ⭐ 61.24 🙂 1.03 👎
Working memory 7.50 🙂 7.67 🙂 0.17 👎
Quality 74.39% 🙂 74.07% 🙂 -0.32% 👎
Other metrics Before After Change
Lines 233 249 16
Changed files Quality Before Quality After Quality Change
graphviz2drawio/graphviz2drawio.py 72.93% 🙂 68.85% 🙂 -4.08% 👎
graphviz2drawio/models/SvgParser.py 63.34% 🙂 56.75% 🙂 -6.59% 👎
graphviz2drawio/mx/MxGraph.py 68.71% 🙂 69.66% 🙂 0.95% 👍
test/test_graphs.py 86.42% ⭐ 86.05% ⭐ -0.37% 👎

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 7 ⭐ 162 😞 13 😞 49.60% 😞 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 ⭐ 155 😞 10 😞 58.42% 🙂 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!