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

[ENH] remove ampty authors, references (Sourcery refactored) #33

Closed
wants to merge 1 commit into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jan 20, 2023

Pull Request #32 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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:

Review changes via command line

To manually merge these changes, make sure you're on the authors branch, then run:

git fetch origin sourcery/authors
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Remi-Gau January 20, 2023 09:56
@ghost
Copy link

ghost commented Jan 20, 2023

Review on Crocodile

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jan 20, 2023

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.15%.

Quality metrics Before After Change
Complexity 7.25 ⭐ 7.30 ⭐ 0.05 👎
Method Length 76.81 🙂 76.52 🙂 -0.29 👍
Working memory 8.64 🙂 8.66 🙂 0.02 👎
Quality 63.73% 🙂 63.58% 🙂 -0.15% 👎
Other metrics Before After Change
Lines 403 400 -3
Changed files Quality Before Quality After Quality Change
bids2cite/authors.py 65.08% 🙂 64.78% 🙂 -0.30% 👎
bids2cite/references.py 62.14% 🙂 62.17% 🙂 0.03% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
bids2cite/authors.py update_authors 13 🙂 198 😞 11 😞 44.28% 😞 Try splitting into smaller methods. Extract out complex expressions
bids2cite/references.py get_reference_info_from_pmid 15 🙂 148 😞 11 😞 47.17% 😞 Try splitting into smaller methods. Extract out complex expressions
bids2cite/authors.py parse_author 11 🙂 157 😞 8 🙂 55.85% 🙂 Try splitting into smaller methods
bids2cite/references.py update_references 9 🙂 136 😞 9 🙂 57.74% 🙂 Try splitting into smaller methods
bids2cite/references.py get_reference_details 3 ⭐ 96 🙂 11 😞 64.67% 🙂 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-commenter
Copy link

Codecov Report

Merging #33 (0afb96c) into authors (4721cc8) will increase coverage by 0.06%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           authors      #33      +/-   ##
===========================================
+ Coverage    67.51%   67.58%   +0.06%     
===========================================
  Files            6        6              
  Lines          508      506       -2     
  Branches       105      105              
===========================================
- Hits           343      342       -1     
+ Misses         136      135       -1     
  Partials        29       29              
Flag Coverage Δ
tests 67.58% <50.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bids2cite/authors.py 71.90% <0.00%> (+0.58%) ⬆️
bids2cite/references.py 73.83% <100.00%> (-0.25%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sourcery-ai sourcery-ai bot closed this Jan 20, 2023
@sourcery-ai sourcery-ai bot deleted the sourcery/authors branch January 20, 2023 10:15
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.

None yet

1 participant