ysdede / jesse_strategies

Jesse ai strategies
Creative Commons Zero v1.0 Universal
55 stars 18 forks source link

Sourcery refactored master branch #1

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 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 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.39 ⭐ 4.82 ⭐ -0.57 👍
Method Length 46.67 ⭐ 46.00 ⭐ -0.67 👍
Working memory 7.72 🙂 7.58 🙂 -0.14 👍
Quality 70.53% 🙂 71.39% 🙂 0.86% 👍
Other metrics Before After Change
Lines 3841 3733 -108
Changed files Quality Before Quality After Quality Change
playground/optimization/ott2butKAMA1/custom_indicators/notlar.py 82.29% ⭐ 83.22% ⭐ 0.93% 👍
playground/optimization/ott2butKAMA1/strategies/Ott2butKAMA/init.py 81.05% ⭐ 82.88% ⭐ 1.83% 👍
playground/optimization/ott2butKAMA2-400days/custom_indicators/notlar.py 82.29% ⭐ 83.22% ⭐ 0.93% 👍
playground/optimization/ott2butKAMA2-400days/strategies/Ott2butKAMA/init.py 81.05% ⭐ 82.88% ⭐ 1.83% 👍
playground/optimization/ott2butKAMA2-400days-pairs/custom_indicators/notlar.py 82.29% ⭐ 83.22% ⭐ 0.93% 👍
playground/optimization/ott2butKAMA2-400days-pairs/strategies/Ott2butKAMA/init.py 81.05% ⭐ 82.88% ⭐ 1.83% 👍
playground/optimization/ott2butKAMA2-Gcloud-done-23it/strategies/Ott2butKAMA/init.py 80.95% ⭐ 82.78% ⭐ 1.83% 👍
playground/optimization/ott2butKAMA2-serenity/custom_indicators/notlar.py 82.29% ⭐ 83.22% ⭐ 0.93% 👍
playground/optimization/ott2butKAMA2-serenity/strategies/Ott2butKAMA/init.py 81.05% ⭐ 82.88% ⭐ 1.83% 👍
playground/optimization/ott2butKAMA2-serenity/strategies/Ott2butKAMAposs/init.py 79.71% ⭐ 81.61% ⭐ 1.90% 👍
playground/optimization/ottKama155it/custom_indicators/notlar.py 82.29% ⭐ 83.22% ⭐ 0.93% 👍
playground/optimization/ottKama155it/strategies/ottKama155it/init.py 82.42% ⭐ 84.20% ⭐ 1.78% 👍
playground/optimization/ottMultiTp-after-gcloud/strategies/ottMultiTp/init.py 76.87% ⭐ 82.71% ⭐ 5.84% 👍
playground/position-sizing/balancer/balancer.py 44.40% 😞 46.03% 😞 1.63% 👍
playground/position-sizing/balancer/strategies/emasharpe/init.py 65.63% 🙂 65.38% 🙂 -0.25% 👎
playground/position-sizing/balancer/strategies/ewoexitsharpe/init.py 83.40% ⭐ 83.81% ⭐ 0.41% 👍
playground/position-sizing/balancer-and-plot/balancer.py 42.43% 😞 44.05% 😞 1.62% 👍
playground/position-sizing/balancer-and-plot/bokehtest.py 49.92% 😞 51.23% 🙂 1.31% 👍
playground/position-sizing/balancer-and-plot/bqplottestt.py 60.24% 🙂 59.94% 🙂 -0.30% 👎
playground/position-sizing/balancer-and-plot/candle1.py 64.05% 🙂 63.63% 🙂 -0.42% 👎
playground/position-sizing/balancer-and-plot/matplottest2.py 76.32% ⭐ 79.74% ⭐ 3.42% 👍
playground/position-sizing/balancer-and-plot/sharpenorma.py 82.67% ⭐ 82.83% ⭐ 0.16% 👍
playground/position-sizing/balancer-and-plot/strategies/emacounter/init.py 69.55% 🙂 71.26% 🙂 1.71% 👍
playground/position-sizing/balancer-and-plot/strategies/emafilter/init.py 75.64% ⭐ 75.51% ⭐ -0.13% 👎
playground/position-sizing/balancer-and-plot/strategies/emafilterBalance/init.py 71.41% 🙂 71.73% 🙂 0.32% 👍
playground/position-sizing/balancer-and-plot/strategies/emasharpe/init.py 65.63% 🙂 65.38% 🙂 -0.25% 👎
playground/position-sizing/balancer-and-plot/strategies/emasharpe2/init.py 64.96% 🙂 64.70% 🙂 -0.26% 👎
playground/position-sizing/balancer-and-plot/strategies/wtewohp2chophp1/init.py 84.33% ⭐ 85.24% ⭐ 0.91% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
playground/position-sizing/balancer-and-plot/balancer.py balancer.stats 21 😞 389 ⛔ 20 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
playground/position-sizing/balancer/balancer.py balancer.stats 21 😞 371 ⛔ 17 ⛔ 22.90% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
playground/position-sizing/balancer-and-plot/strategies/emasharpe2/init.py emasharpe2.stats 18 🙂 462 ⛔ 16 ⛔ 25.02% 😞 Try splitting into smaller methods. Extract out complex expressions
playground/position-sizing/balancer/strategies/emasharpe/init.py emasharpe.stats 18 🙂 398 ⛔ 16 ⛔ 25.65% 😞 Try splitting into smaller methods. Extract out complex expressions
playground/position-sizing/balancer-and-plot/strategies/emasharpe/init.py emasharpe.stats 18 🙂 398 ⛔ 16 ⛔ 25.65% 😞 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!