ErikBjare / quantifiedme

Analyzing all my Quantified Self data
https://erik.bjareholt.com/quantifiedme/Dashboard.html
54 stars 2 forks source link

Sourcery refactored master branch #6

Open sourcery-ai[bot] opened 2 years ago

sourcery-ai[bot] commented 2 years ago

Branch master refactored by Sourcery.

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

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 master branch, then run:

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

Help us improve this pull request!

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

βœ…  Merging this PR will increase code quality in the affected files by 0.02%.

Quality metrics Before After Change
Complexity 5.27 ⭐ 5.24 ⭐ -0.03 πŸ‘
Method Length 60.77 ⭐ 60.33 ⭐ -0.44 πŸ‘
Working memory 8.11 πŸ™‚ 8.15 πŸ™‚ 0.04 πŸ‘Ž
Quality 69.39% πŸ™‚ 69.41% πŸ™‚ 0.02% πŸ‘
Other metrics Before After Change
Lines 635 632 -3
Changed files Quality Before Quality After Quality Change
src/quantifiedme/activitywatch.py 60.27% πŸ™‚ 60.30% πŸ™‚ 0.03% πŸ‘
src/quantifiedme/influxdb.py 88.92% ⭐ 88.20% ⭐ -0.72% πŸ‘Ž
src/quantifiedme/load_toggl.py 59.04% πŸ™‚ 59.50% πŸ™‚ 0.46% πŸ‘
src/quantifiedme/qslang.py 74.49% πŸ™‚ 74.68% πŸ™‚ 0.19% πŸ‘
tests/test_load.py 82.29% ⭐ 82.29% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
src/quantifiedme/activitywatch.py load_complete_timeline 16 πŸ™‚ 247 β›” 14 😞 33.94% 😞 Try splitting into smaller methods. Extract out complex expressions
src/quantifiedme/load_toggl.py _load_toggl 12 πŸ™‚ 220 β›” 15 😞 37.62% 😞 Try splitting into smaller methods. Extract out complex expressions
src/quantifiedme/qslang.py load_df 13 πŸ™‚ 191 😞 8 πŸ™‚ 51.00% πŸ™‚ Try splitting into smaller methods
src/quantifiedme/activitywatch.py create_fake_events 5 ⭐ 113 πŸ™‚ 11 😞 60.41% πŸ™‚ Extract out complex expressions
src/quantifiedme/load_toggl.py _load_toggl.entries_from_all_workspaces 1 ⭐ 77 πŸ™‚ 10 😞 71.30% πŸ™‚ 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!

codecov-commenter commented 2 years ago

Codecov Report

Merging #6 (722cb45) into master (77ea816) will decrease coverage by 0.14%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
- Coverage   60.14%   60.00%   -0.15%     
==========================================
  Files           4        4              
  Lines         281      280       -1     
==========================================
- Hits          169      168       -1     
  Misses        112      112              
Impacted Files Coverage Ξ”
src/quantifiedme/load_toggl.py 21.27% <0.00%> (ΓΈ)
src/quantifiedme/qslang.py 56.79% <33.33%> (ΓΈ)
src/quantifiedme/activitywatch.py 70.00% <83.33%> (-0.23%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 77ea816...722cb45. Read the comment docs.