Closed Remi-Gau closed 1 year ago
β Merging this PR will increase code quality in the affected files by 0.25%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 3.17 β | 3.04 β | -0.13 π |
Method Length | 112.62 π | 112.50 π | -0.12 π |
Working memory | 9.20 π | 9.15 π | -0.05 π |
Quality | 63.32% π | 63.57% π | 0.25% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 1792 | 2000 | 208 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
nilearn/decomposition/__init__.py | 98.83% β | 98.83% β | 0.00% |
nilearn/decomposition/_base.py | 56.85% π | 57.66% π | 0.81% π |
nilearn/decomposition/_multi_pca.py | 64.67% π | 64.67% π | 0.00% |
nilearn/decomposition/canica.py | 51.17% π | 51.20% π | 0.03% π |
nilearn/decomposition/dict_learning.py | 62.73% π | 62.73% π | 0.00% |
nilearn/decomposition/tests/test_base.py | 56.47% π | 58.01% π | 1.54% π |
nilearn/decomposition/tests/test_canica.py | 73.98% π | 73.98% π | 0.00% |
nilearn/decomposition/tests/test_dict_learning.py | 70.66% π | 70.66% π | 0.00% |
nilearn/decomposition/tests/test_multi_pca.py | 63.36% π | 63.16% π | -0.20% π |
nilearn/maskers/base_masker.py | 52.53% π | 52.53% π | 0.00% |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
nilearn/maskers/base_masker.py | _filter_and_extract | 13 π | 325 β | 16 β | 31.10% π | Try splitting into smaller methods. Extract out complex expressions |
nilearn/decomposition/_base.py | _mask_and_reduce | 14 π | 240 β | 14 π | 35.96% π | Try splitting into smaller methods. Extract out complex expressions |
nilearn/decomposition/canica.py | CanICA.__init__ | 2 β | 168 π | 32 β | 43.36% π | Try splitting into smaller methods. Extract out complex expressions |
nilearn/decomposition/dict_learning.py | DictLearning.__init__ | 0 β | 167 π | 35 β | 45.21% π | Try splitting into smaller methods. Extract out complex expressions |
nilearn/decomposition/canica.py | CanICA._unmix_components | 11 π | 272 β | 9 π | 45.70% π | Try splitting into smaller methods |
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!
Merging #2 (0cb1d65) into main (00a87e3) will increase coverage by
0.01%
. The diff coverage is86.88%
.
@@ Coverage Diff @@
## main #2 +/- ##
==========================================
+ Coverage 90.94% 90.96% +0.01%
==========================================
Files 133 133
Lines 15335 15332 -3
Branches 3024 3022 -2
==========================================
Hits 13947 13947
+ Misses 820 819 -1
+ Partials 568 566 -2
Impacted Files | Coverage Ξ | |
---|---|---|
nilearn/maskers/base_masker.py | 83.95% <ΓΈ> (ΓΈ) |
|
nilearn/decomposition/dict_learning.py | 89.06% <72.72%> (ΓΈ) |
|
nilearn/decomposition/canica.py | 91.66% <80.00%> (ΓΈ) |
|
nilearn/decomposition/_base.py | 94.87% <91.89%> (+1.79%) |
:arrow_up: |
nilearn/decomposition/__init__.py | 100.00% <100.00%> (ΓΈ) |
|
nilearn/decomposition/_multi_pca.py | 100.00% <100.00%> (ΓΈ) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
π @Remi-Gau Thanks for creating a PR!
Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.
Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.
We will review it as quick as possible, feel free to ping us with questions if needed.