amogorkon / justuse

Just use() code from anywhere - a functional import alternative with advanced features like inline version checks, autoreload, module globals injection before import and more.
MIT License
49 stars 8 forks source link

Finally think we've smoothed out enough rough edges to warrant a new release #463

Closed amogorkon closed 2 years ago

codecov-commenter commented 2 years ago

Codecov Report

Merging #463 (bf06cdc) into main (c0244bd) will increase coverage by 2.3694%. The diff coverage is 64.7675%.

Impacted file tree graph

@@               Coverage Diff                @@
##               main       #463        +/-   ##
================================================
+ Coverage   66.8236%   69.1929%   +2.3694%     
================================================
  Files             9         12         +3     
  Lines          1275       1623       +348     
  Branches        284        340        +56     
================================================
+ Hits            852       1123       +271     
- Misses          324        394        +70     
- Partials         99        106         +7     
Impacted Files Coverage Δ
src/use/buffet.py 0.0000% <ø> (ø)
src/use/aspectizing.py 34.0426% <34.0426%> (ø)
src/use/messages.py 56.6667% <55.7143%> (+4.1667%) :arrow_up:
src/use/main.py 63.8744% <57.2728%> (+0.1104%) :arrow_up:
src/use/logutil.py 61.4036% <61.4036%> (ø)
src/use/pimp.py 71.8427% <71.5329%> (+15.6047%) :arrow_up:
src/use/tools.py 86.9566% <88.8889%> (+1.2423%) :arrow_up:
src/use/pydantics.py 94.8454% <92.1875%> (ø)
src/use/__init__.py 86.4078% <93.9394%> (+0.6935%) :arrow_up:
src/use/buffet_old.py 100.0000% <100.0000%> (ø)
... and 7 more

Impacted file tree graph

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.48 ⭐ 6.60 ⭐ -0.88 👍
Method Length 60.59 ⭐ 52.18 ⭐ -8.41 👍
Working memory 9.48 🙂 8.96 🙂 -0.52 👍
Quality 64.53% 🙂 69.44% 🙂 4.91% 👍
Other metrics Before After Change
Lines 43414 45026 1612
Changed files Quality Before Quality After Quality Change
src/.test4.py 95.51% ⭐ 91.80% ⭐ -3.71% 👎
src/.test5.py 86.86% ⭐ 91.87% ⭐ 5.01% 👍
src/.test6.py 100.00% ⭐
src/.test7.py 96.34% ⭐
src/.test8.py 99.50% ⭐
src/use/init.py 53.19% 🙂 55.78% 🙂 2.59% 👍
src/use/aspectizing.py 49.43% 😞
src/use/buffet.py 98.83% ⭐ 98.83% ⭐ 0.00%
src/use/buffet_old.py 63.35% 🙂 65.30% 🙂 1.95% 👍
src/use/hash_alphabet.py 91.24% ⭐ 86.90% ⭐ -4.34% 👎
src/use/logutil.py 84.83% ⭐
src/use/main.py 54.90% 🙂 52.68% 🙂 -2.22% 👎
src/use/messages.py 59.16% 🙂 63.87% 🙂 4.71% 👍
src/use/pimp.py 57.05% 🙂 60.71% 🙂 3.66% 👍
src/use/tools.py 65.91% 🙂 66.42% 🙂 0.51% 👍
tests/init.py 60.10% 🙂 57.43% 🙂 -2.67% 👎
tests/beast.py 67.28% 🙂
tests/beast_data_preparation.py 78.99% ⭐
tests/simple_funcs.py 100.00% ⭐ 100.00% ⭐ 0.00%
tests/tdd_test.py 85.51% ⭐ 88.77% ⭐ 3.26% 👍
tests/unit_test.py 84.60% ⭐ 84.24% ⭐ -0.36% 👎
tests/.tests/.test0.py 91.20% ⭐
tests/.tests/.test2.py 100.00% ⭐ 89.71% ⭐ -10.29% 👎
tests/.tests/.test3.py 86.67% ⭐ 100.00% ⭐ 13.33% 👍
tests/.tests/discord_enum.py 84.13% ⭐
tests/integration/init.py 57.56% 🙂
tests/integration/integration_test.py 79.67% ⭐ 77.96% ⭐ -1.71% 👎
tests/integration/test_pypi_model.py 52.97% 🙂 52.97% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
src/use/main.py Use._use_path 50 ⛔ 564 ⛔ 23 ⛔ 6.03% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/use/aspectizing.py apply_aspect 39 ⛔ 367 ⛔ 24 ⛔ 9.92% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/use/pimp.py _auto_install 18 🙂 333 ⛔ 18 ⛔ 24.98% ⛔ Try splitting into smaller methods. Extract out complex expressions
src/use/main.py Use._use_package 9 🙂 299 ⛔ 21 ⛔ 31.60% 😞 Try splitting into smaller methods. Extract out complex expressions
src/use/pimp.py _install 10 🙂 252 ⛔ 18 ⛔ 34.61% 😞 Try splitting into smaller methods. 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!