thesis
thesis copied to clipboard
Sourcery refactored master branch
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 Code Quality Report
✅ Merging this PR will increase code quality in the affected files by 0.06%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 5.78 ⭐ | 5.61 ⭐ | -0.17 👍 |
Method Length | 52.96 ⭐ | 52.60 ⭐ | -0.36 👍 |
Working memory | 8.81 🙂 | 8.84 🙂 | 0.03 👎 |
Quality | 68.75% 🙂 | 68.81% 🙂 | 0.06% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 1170 | 1155 | -15 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
src/eegclassify/clean.py | 79.76% ⭐ | 79.91% ⭐ | 0.15% 👍 |
src/eegclassify/transform.py | 56.46% 🙂 | 56.67% 🙂 | 0.21% 👍 |
src/eegclassify/util.py | 68.38% 🙂 | 69.02% 🙂 | 0.64% 👍 |
src/eegwatch/load.py | 74.86% 🙂 | 75.31% ⭐ | 0.45% 👍 |
src/eegwatch/lslutils.py | 69.50% 🙂 | 69.45% 🙂 | -0.05% 👎 |
src/eegwatch/main.py | 52.78% 🙂 | 53.49% 🙂 | 0.71% 👍 |
src/eegwatch/util.py | 84.52% ⭐ | 84.88% ⭐ | 0.36% 👍 |
src/eegwatch/devices/_brainflow.py | 72.25% 🙂 | 72.25% 🙂 | 0.00% |
src/eegwatch/devices/muse.py | 74.68% 🙂 | 73.92% 🙂 | -0.76% 👎 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
src/eegwatch/main.py | connect | 23 😞 | 276 ⛔ | 21 ⛔ | 21.30% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
src/eegwatch/devices/_brainflow.py | BrainflowDevice._init_brainflow | 17 🙂 | 214 ⛔ | 11 😞 | 39.84% 😞 | Try splitting into smaller methods. Extract out complex expressions |
src/eegwatch/lslutils.py | _get_inlets | 16 🙂 | 125 😞 | 15 😞 | 43.02% 😞 | Try splitting into smaller methods. Extract out complex expressions |
src/eegclassify/util.py | aggregate_windows_to_epochs | 8 ⭐ | 181 😞 | 14 😞 | 45.48% 😞 | Try splitting into smaller methods. Extract out complex expressions |
src/eegwatch/devices/muse.py | MuseDevice.start | 11 🙂 | 133 😞 | 15 😞 | 46.32% 😞 | Try splitting into smaller methods. Extract out complex expressions |
Legend and Explanation
The emojis denote the absolute quality of the code:
- ⭐ excellent
- 🙂 good
- 😞 poor
- ⛔ very poor
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 Report
Merging #32 (bf732a7) into master (b927849) will decrease coverage by
0.39%
. The diff coverage is29.16%
.
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 65.93% 65.53% -0.40%
==========================================
Files 22 22
Lines 1224 1213 -11
==========================================
- Hits 807 795 -12
- Misses 417 418 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/eegwatch/devices/muse.py | 35.52% <0.00%> (+1.34%) |
:arrow_up: |
src/eegwatch/lslutils.py | 28.04% <0.00%> (ø) |
|
src/eegwatch/main.py | 26.56% <0.00%> (ø) |
|
src/eegwatch/util.py | 41.17% <0.00%> (+2.28%) |
:arrow_up: |
src/eegwatch/devices/_brainflow.py | 65.42% <66.66%> (-0.64%) |
:arrow_down: |
src/eegclassify/clean.py | 64.13% <100.00%> (-1.14%) |
:arrow_down: |
src/eegclassify/transform.py | 77.14% <100.00%> (ø) |
|
src/eegclassify/util.py | 100.00% <100.00%> (ø) |
|
src/eegwatch/load.py | 100.00% <100.00%> (ø) |
|
src/eegclassify/load.py | 87.94% <0.00%> (-2.84%) |
:arrow_down: |
... and 1 more |
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 b927849...bf732a7. Read the comment docs.