jesrav / footy-tracker

4 stars 1 forks source link

Feature/web/suggest teams #25

Closed jesrav closed 2 years ago

jesrav commented 2 years ago

Suggest team functionality in in frontend + bugfixes to backend

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.69 ⭐ 2.01 ⭐ 0.32 👎
Method Length 65.41 🙂 68.82 🙂 3.41 👎
Working memory 6.25 🙂 6.53 🙂 0.28 👎
Quality 79.37% 76.79% -2.58% 👎
Other metrics Before After Change
Lines 886 970 84
Changed files Quality Before Quality After Quality Change
src/api/crud/user.py 81.86% ⭐ 80.53% ⭐ -1.33% 👎
src/api/routes/ml.py 76.13% ⭐ 76.13% ⭐ 0.00%
src/api/services/ml.py 72.75% 🙂 72.27% 🙂 -0.48% 👎
src/ml_api/main.py 85.74% ⭐ 85.43% ⭐ -0.31% 👎
src/web/config.py 92.54% ⭐ 92.21% ⭐ -0.33% 👎
src/web/models/team.py 90.63% ⭐ 91.54% ⭐ 0.91% 👍
src/web/services/tracking_service.py 82.12% ⭐ 79.30% ⭐ -2.82% 👎
src/web/services/user_service.py 82.18% ⭐ 79.72% ⭐ -2.46% 👎
src/web/viewmodels/tracking/submit_result_viewmodel.py 63.00% 🙂 55.79% 🙂 -7.21% 👎
src/web/views/tracking.py 87.12% ⭐ 80.92% ⭐ -6.20% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/web/viewmodels/tracking/submit_result_viewmodel.py SubmitResultViewModel.post_form 11 🙂 310 ⛔ 12 😞 38.65% 😞 Try splitting into smaller methods. Extract out complex expressions
src/api/services/ml.py suggest_most_fair_teams 0 ⭐ 342 ⛔ 53.49% 🙂 Try splitting into smaller methods
src/api/routes/ml.py add_ml_model 3 ⭐ 126 😞 9 🙂 64.71% 🙂 Try splitting into smaller methods
src/web/views/tracking.py suggest_teams 2 ⭐ 108 🙂 10 😞 65.93% 🙂 Extract out complex expressions
src/web/viewmodels/tracking/submit_result_viewmodel.py SubmitResultViewModel.load 4 ⭐ 120 😞 8 🙂 66.67% 🙂 Try splitting into smaller methods

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!