a-luna / vigorish

MLB data web scraper, Python CLI application
https://aaronluna.dev/projects/vigorish
MIT License
2 stars 2 forks source link

v0.6.4 #850

Closed a-luna 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.15%.

Quality metrics Before After Change
Complexity 0.57 ⭐ 0.54 ⭐ -0.03 👍
Method Length 74.50 🙂 76.54 🙂 2.04 👎
Working memory 9.08 🙂 8.80 🙂 -0.28 👍
Quality 76.40% 76.25% -0.15% 👎
Other metrics Before After Change
Lines 2943 2950 7
Changed files Quality Before Quality After Quality Change
src/vigorish/version.py 99.50% ⭐ 99.50% ⭐ 0.00%
src/vigorish/data/metrics/pitchfx/pitchfx_metrics.py 89.35% ⭐ 89.18% ⭐ -0.17% 👎
src/vigorish/models/batter_percentiles.py 78.61% ⭐ 75.91% ⭐ -2.70% 👎
src/vigorish/models/pitch_type_percentiles.py 71.61% 🙂 72.70% 🙂 1.09% 👍
tests/test_with_single_game/test_data_player_data.py 48.16% 😞 48.16% 😞 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
tests/test_with_single_game/test_data_player_data.py test_pitchfx_pitching_metrics_career 0 ⭐ 3451 ⛔ 23 ⛔ 35.94% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/test_with_single_game/test_data_player_data.py test_bat_stats 0 ⭐ 934 ⛔ 11 😞 47.84% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/test_with_single_game/test_data_player_data.py test_pitch_stats 0 ⭐ 838 ⛔ 11 😞 47.85% 😞 Try splitting into smaller methods. Extract out complex expressions
src/vigorish/models/pitch_type_percentiles.py PitchTypePercentile.get_percentile_for_rhp_pos_stat 1 ⭐ 54 ⭐ 14 😞 68.24% 🙂 Extract out complex expressions
src/vigorish/models/pitch_type_percentiles.py PitchTypePercentile.get_percentile_for_lhp_pos_stat 1 ⭐ 54 ⭐ 14 😞 68.24% 🙂 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!