Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] lint (Sourcery refactored) #75

Merged
merged 2 commits into from
Oct 17, 2022
Merged

[MNT] lint (Sourcery refactored) #75

merged 2 commits into from
Oct 17, 2022

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Oct 17, 2022

Pull Request #74 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/cpp-lln-lab/bidsMReye pull/74/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Remi-Gau October 17, 2022 19:32
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Oct 17, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 11.05 🙂 10.63 🙂 -0.42 👍
Method Length 85.45 🙂 85.18 🙂 -0.27 👍
Working memory 8.12 🙂 8.25 🙂 0.13 👎
Quality 59.26% 🙂 59.47% 🙂 0.21% 👍
Other metrics Before After Change
Lines 4448 4436 -12
Changed files Quality Before Quality After Quality Change
setup.py 76.62% ⭐ 75.89% ⭐ -0.73% 👎
versioneer.py 48.64% 😞 48.68% 😞 0.04% 👍
bidsmreye/init.py 98.33% ⭐ 97.50% ⭐ -0.83% 👎
bidsmreye/_version.py 53.77% 🙂 53.92% 🙂 0.15% 👍
bidsmreye/download.py 65.42% 🙂 65.39% 🙂 -0.03% 👎
bidsmreye/generalize.py 65.72% 🙂 65.71% 🙂 -0.01% 👎
bidsmreye/methods.py 80.03% ⭐ 80.15% ⭐ 0.12% 👍
bidsmreye/prepare_data.py 68.04% 🙂 68.02% 🙂 -0.02% 👎
bidsmreye/run.py 62.37% 🙂 62.34% 🙂 -0.03% 👎
bidsmreye/utils.py 73.96% 🙂 73.39% 🙂 -0.57% 👎
docs/source/conf.py 79.05% ⭐ 78.41% ⭐ -0.64% 👎
tests/init.py % % %
tests/test_generalize.py 90.60% ⭐ 90.60% ⭐ 0.00%
tests/test_methods.py 93.85% ⭐ 93.85% ⭐ 0.00%
tests/test_prepare.py 85.92% ⭐ 85.92% ⭐ 0.00%
tests/test_utils.py 93.08% ⭐ 93.08% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
versioneer.py git_pieces_from_vcs 29 😞 479 ⛔ 15 😞 19.09% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
bidsmreye/_version.py git_pieces_from_vcs 29 😞 479 ⛔ 15 😞 19.09% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
versioneer.py do_setup 22 😞 390 ⛔ 11 😞 30.02% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
versioneer.py run_command 18 🙂 199 😞 15 😞 34.17% 😞 Try splitting into smaller methods. Extract out complex expressions
bidsmreye/_version.py run_command 18 🙂 199 😞 15 😞 34.17% 😞 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!

@Remi-Gau Remi-Gau merged commit 83222ac into main Oct 17, 2022
@Remi-Gau Remi-Gau deleted the sourcery/pull-74 branch November 2, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant