Closed Remi-Gau closed 1 year ago
β Merging this PR will decrease code quality in the affected files by 0.40%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 10.37 π | 11.16 π | 0.79 π |
Method Length | 131.81 π | 133.71 π | 1.90 π |
Working memory | 12.92 π | 12.85 π | -0.07 π |
Quality | 52.35% π | 51.95% π | -0.40% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 9112 | 10306 | 1194 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
nilearn/decoding/__init__.py | 86.05% β | 86.05% β | 0.00% |
nilearn/decoding/decoder.py | 41.44% π | 41.38% π | -0.06% π |
nilearn/decoding/fista.py | 14.28% β | 14.04% β | -0.24% π |
nilearn/decoding/objective_functions.py | 77.42% β | 77.37% β | -0.05% π |
nilearn/decoding/proximal_operators.py | 29.17% π | 29.18% π | 0.01% π |
nilearn/decoding/searchlight.py | 60.86% π | 60.42% π | -0.44% π |
nilearn/decoding/space_net.py | 35.72% π | 35.48% π | -0.24% π |
nilearn/decoding/space_net_solvers.py | 60.64% π | 60.45% π | -0.19% π |
nilearn/decoding/tests/simulate_graph_net_data.py | 41.96% π | 41.96% π | 0.00% |
nilearn/decoding/tests/test_decoder.py | 57.24% π | 57.24% π | 0.00% |
nilearn/decoding/tests/test_fista.py | 55.39% π | 54.05% π | -1.34% π |
nilearn/decoding/tests/test_graph_net.py | 70.27% π | 71.38% π | 1.11% π |
nilearn/decoding/tests/test_objective_functions.py | 80.36% β | 80.36% β | 0.00% |
nilearn/decoding/tests/test_operators.py | 65.39% π | 65.39% π | 0.00% |
nilearn/decoding/tests/test_same_api.py | 65.32% π | 65.32% π | 0.00% |
nilearn/decoding/tests/test_searchlight.py | 40.96% π | 40.96% π | 0.00% |
nilearn/decoding/tests/test_sklearn_compatibility.py | 64.04% π | 63.74% π | -0.30% π |
nilearn/decoding/tests/test_space_net.py | 72.59% π | 72.49% π | -0.10% π |
nilearn/decoding/tests/test_tv.py | 72.72% π | 72.72% π | 0.00% |
nilearn/decomposition/_base.py | 57.66% π | 57.63% π | -0.03% π |
nilearn/decomposition/_multi_pca.py | 64.67% π | 64.67% π | 0.00% |
nilearn/decomposition/canica.py | 51.20% π | 51.20% π | 0.00% |
nilearn/decomposition/dict_learning.py | 62.73% π | 62.73% π | 0.00% |
nilearn/glm/second_level/second_level.py | 49.67% π | 49.07% π | -0.60% π |
nilearn/glm/tests/test_second_level.py | 61.73% π | 60.96% π | -0.77% π |
nilearn/glm/tests/test_utils.py | 71.32% π | 71.24% π | -0.08% π |
nilearn/mass_univariate/permuted_least_squares.py | 4.23% β | 3.57% β | -0.66% π |
nilearn/mass_univariate/tests/test_permuted_least_squares.py | 55.69% π | 54.14% π | -1.55% π |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
nilearn/mass_univariate/permuted_least_squares.py | permuted_ols | 84 β | 1371 β | 30 β | 1.30% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
nilearn/decoding/proximal_operators.py | _prox_tvl1 | 48 β | 486 β | 28 β | 5.31% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
nilearn/decoding/space_net.py | BaseSpaceNet.fit | 41 β | 841 β | 28 β | 6.46% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
nilearn/decoding/space_net.py | path_scores | 36 β | 549 β | 37 β | 7.48% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
nilearn/decoding/fista.py | mfista | 40 β | 422 β | 29 β | 7.64% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
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 #4 (2ee9bc1) into main (3e4652f) will increase coverage by
23.59%
. The diff coverage is89.71%
.
@@ Coverage Diff @@
## main #4 +/- ##
===========================================
+ Coverage 67.40% 91.00% +23.59%
===========================================
Files 133 133
Lines 15286 15356 +70
Branches 2937 3033 +96
===========================================
+ Hits 10304 13975 +3671
+ Misses 4546 817 -3729
- Partials 436 564 +128
Impacted Files | Coverage Ξ | |
---|---|---|
nilearn/decomposition/_base.py | 94.87% <ΓΈ> (ΓΈ) |
|
nilearn/decomposition/_multi_pca.py | 100.00% <ΓΈ> (ΓΈ) |
|
nilearn/decomposition/canica.py | 91.66% <ΓΈ> (ΓΈ) |
|
nilearn/decomposition/dict_learning.py | 89.06% <ΓΈ> (ΓΈ) |
|
nilearn/decoding/proximal_operators.py | 71.81% <73.07%> (ΓΈ) |
|
nilearn/decoding/space_net.py | 88.21% <81.25%> (ΓΈ) |
|
nilearn/decoding/fista.py | 87.65% <85.71%> (ΓΈ) |
|
nilearn/decoding/objective_functions.py | 86.58% <86.66%> (-0.17%) |
:arrow_down: |
nilearn/decoding/decoder.py | 95.97% <97.77%> (ΓΈ) |
|
nilearn/decoding/__init__.py | 100.00% <100.00%> (ΓΈ) |
|
... and 57 more |
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.