kiwicom / the-zoo

🐒 A service registry for humans
MIT License
92 stars 6 forks source link

jaro/Introduce Arbitrary Links for Service #393

Closed jarosevcik closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.17 ⭐ 1.12 ⭐ -0.05 👍
Method Length 43.93 ⭐ 45.72 ⭐ 1.79 👎
Working memory 10.01 😞 9.96 😞 -0.05 👍
Quality 77.06% 76.86% -0.20% 👎
Other metrics Before After Change
Lines 1933 2232 299
Changed files Quality Before Quality After Quality Change
test/conftest.py 81.83% ⭐ 81.15% ⭐ -0.68% 👎
test/api/query/test_services.py 87.44% ⭐ 86.36% ⭐ -1.08% 👎
test/api/query/snapshots/snap_test_services.py 33.56% 😞 33.46% 😞 -0.10% 👎
test/repos/test_zoo_yml.py 81.77% ⭐ 77.04% ⭐ -4.73% 👎
test/services/test_forms.py 83.32% ⭐ 83.96% ⭐ 0.64% 👍
zoo/factories.py 51.95% 🙂 54.22% 🙂 2.27% 👍
zoo/api/types.py 84.94% ⭐ 85.42% ⭐ 0.48% 👍
zoo/repos/zoo_yml.py 79.32% ⭐ 74.69% 🙂 -4.63% 👎
zoo/services/forms.py 74.57% 🙂 73.99% 🙂 -0.58% 👎
zoo/services/models.py 79.28% ⭐ 77.09% ⭐ -2.19% 👎
zoo/services/views.py 74.58% 🙂 74.96% 🙂 0.38% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
zoo/repos/zoo_yml.py generate 2 ⭐ 101 🙂 25 ⛔ 52.39% 🙂 Extract out complex expressions
zoo/services/models.py Service.rate_according_to_sentry 1 ⭐ 126 😞 16 ⛔ 55.65% 🙂 Try splitting into smaller methods. Extract out complex expressions
test/api/query/test_services.py generate_services 0 ⭐ 152 😞 14 😞 56.10% 🙂 Try splitting into smaller methods. Extract out complex expressions
zoo/services/forms.py SplitArrayField.has_changed 13 🙂 72 🙂 11 😞 58.78% 🙂 Extract out complex expressions
zoo/services/views.py ServiceList.get_queryset 8 ⭐ 113 🙂 10 😞 59.42% 🙂 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

sonarcloud[bot] commented 3 years ago

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

63.4% 63.4% Coverage
5.5% 5.5% Duplication