Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 67 #122

Draft
wants to merge 42 commits into
base: dev
Choose a base branch
from
Draft

Issue 67 #122

wants to merge 42 commits into from

Conversation

ryanmerolle
Copy link
Collaborator

@ryanmerolle ryanmerolle commented Jan 26, 2023

Pull Request

Related Issue

Closes #67

New Behavior

...

Contrast to Current Behavior

...

Discussion: Benefits and Drawbacks

...

Changes to the Documentation

...

Proposed Release Note Entry

...

Double Check

  • I have explained my PR according to the information in the comments
    or in a linked issue.
  • My PR targets the dev branch.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 26, 2023

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 9.48%.

Quality metrics Before After Change
Complexity 4.86 ⭐ 1.40 ⭐ -3.46 👍
Method Length 84.17 🙂 71.22 🙂 -12.95 👍
Working memory 11.04 😞 9.82 🙂 -1.22 👍
Quality 62.58% 🙂 72.06% 🙂 9.48% 👍
Other metrics Before After Change
Lines 1777 1944 167
Changed files Quality Before Quality After Quality Change
setup.py 90.09% ⭐ 89.94% ⭐ -0.15% 👎
netbox_acls/tables.py 40.46% 😞 40.40% 😞 -0.06% 👎
netbox_acls/views.py 82.12% ⭐ 82.03% ⭐ -0.09% 👎
netbox_acls/api/serializers.py 67.28% 🙂 80.24% ⭐ 12.96% 👍
netbox_acls/forms/filtersets.py 34.01% 😞 34.36% 😞 0.35% 👍
netbox_acls/forms/models.py 50.75% 🙂 76.40% ⭐ 25.65% 👍
netbox_acls/migrations/0002_alter_accesslist_options_and_more.py 61.79% 🙂 61.79% 🙂 0.00%
netbox_acls/migrations/0003_netbox_acls.py 75.10% ⭐ 75.10% ⭐ 0.00%
netbox_acls/models/access_list_rules.py 97.98% ⭐ 97.87% ⭐ -0.11% 👎
netbox_acls/models/access_lists.py 94.10% ⭐ 94.02% ⭐ -0.08% 👎
netbox_acls/tests/test_api.py 71.73% 🙂 69.88% 🙂 -1.85% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
netbox_acls/tests/test_api.py setUpTestData 0 ⭐ 296 ⛔ 7 🙂 59.96% 🙂 Try splitting into smaller methods
netbox_acls/api/serializers.py AccessListSerializer.validate 3 ⭐ 65 🙂 10 😞 71.13% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

@abhi1693 abhi1693 marked this pull request as draft February 2, 2023 16:27
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Housekeeping]: Address duplicate code as much as possible
1 participant