Remi-Gau / nilearn

Machine learning for NeuroImaging in Python
http://nilearn.github.io
Other
1 stars 1 forks source link

temp #2

Closed Remi-Gau closed 1 year ago

github-actions[bot] commented 1 year ago

πŸ‘‹ @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.

ghost commented 1 year ago

Review on Crocodile

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

βœ…  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

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!

codecov-commenter commented 1 year ago

Codecov Report

Merging #2 (0cb1d65) into main (00a87e3) will increase coverage by 0.01%. The diff coverage is 86.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.