Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Entity model (Sourcery refactored) #410

Open
wants to merge 1 commit into
base: jaro/entity_model
Choose a base branch
from

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Aug 9, 2021

Pull Request #405 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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:

Review changes via command line

To manually merge these changes, make sure you're on the jaro/entity_model branch, then run:

git fetch origin sourcery/jaro/entity_model
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from jarosevcik August 9, 2021 12:45
Comment on lines -42 to +47
[len(steps) for tag, steps in get_service_steps(service)]
len(steps) for tag, steps in get_service_steps(service)
),
}
for service in self.get_queryset()
]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function GlobalChecklistsView.get_context_data refactored with the following changes:

@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch 2 times, most recently from 957e6fe to 75743c1 Compare August 9, 2021 12:47
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch 3 times, most recently from 962928a to 459f3a5 Compare August 9, 2021 12:50
@sonarcloud
Copy link

sonarcloud bot commented Aug 9, 2021

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch 2 times, most recently from be18e74 to 8d484b9 Compare September 20, 2021 13:49
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch 2 times, most recently from ca8fe85 to 32bf7cb Compare September 27, 2021 13:44
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch 3 times, most recently from 04e161c to 5238ed2 Compare October 1, 2021 09:58
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch from 5238ed2 to 40f22b8 Compare October 1, 2021 10:02
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch from 40f22b8 to a1920f1 Compare October 1, 2021 11:07
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch from a1920f1 to 8e63831 Compare October 1, 2021 12:25
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch from 8e63831 to 14da59f Compare October 1, 2021 13:06
@sourcery-ai sourcery-ai bot force-pushed the sourcery/jaro/entity_model branch from 14da59f to d204be6 Compare October 5, 2021 10:49
@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2021

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sourcery-ai
Copy link
Contributor Author

sourcery-ai bot commented Oct 29, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.86 ⭐ 5.86 ⭐ 0.00
Method Length 73.28 🙂 73.28 🙂 0.00
Working memory 8.28 🙂 8.31 🙂 0.03 👎
Quality 66.54% 🙂 66.47% 🙂 -0.07% 👎
Other metrics Before After Change
Lines 367 368 1
Changed files Quality Before Quality After Quality Change
zoo/checklists/views.py 66.51% 🙂 66.51% 🙂 0.00%
zoo/repos/tasks.py 66.55% 🙂 66.45% 🙂 -0.10% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
zoo/repos/tasks.py sync_repos.sync_entity_file.update_or_create_components.sync_enviroments_from_gitlab 7 ⭐ 161 😞 13 😞 49.70% 😞 Try splitting into smaller methods. Extract out complex expressions
zoo/repos/tasks.py sync_repos 14 🙂 151 😞 8 🙂 53.85% 🙂 Try splitting into smaller methods
zoo/repos/tasks.py sync_repos.index_api 11 🙂 124 😞 9 🙂 57.33% 🙂 Try splitting into smaller methods
zoo/checklists/views.py update_service_checklist 8 ⭐ 145 😞 8 🙂 59.88% 🙂 Try splitting into smaller methods
zoo/checklists/views.py ServiceChecklistView.get_context_data 3 ⭐ 109 🙂 12 😞 61.17% 🙂 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!

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

Successfully merging this pull request may close these issues.

None yet

0 participants