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

accept magnitude and units in with_rotation_time param (Sourcery refactored) #181

Closed
wants to merge 3 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Mar 25, 2021

Pull Request #180 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/whylabs/whylogs pull/180/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:

@sourcery-ai sourcery-ai bot requested a review from cswarth March 25, 2021 20:50
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Mar 25, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.60 ⭐ 4.07 ⭐ -0.53 👍
Method Length 61.81 🙂 66.53 🙂 4.72 👎
Working memory 9.48 🙂 9.14 🙂 -0.34 👍
Quality 67.67% 🙂 67.30% 🙂 -0.37% 👎
Other metrics Before After Change
Lines 635 671 36
Changed files Quality Before Quality After Quality Change
src/whylogs/app/logger.py 67.78% 🙂 67.55% 🙂 -0.23% 👎
tests/unit/app/test_log_rotation.py 67.40% 🙂 66.86% 🙂 -0.54% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/whylogs/app/logger.py Logger.log_local_dataset 11 🙂 141 😞 12 😞 49.65% 😞 Try splitting into smaller methods. Extract out complex expressions
src/whylogs/app/logger.py Logger.__init__ 2 ⭐ 119 🙂 20 ⛔ 52.23% 🙂 Extract out complex expressions
src/whylogs/app/logger.py Logger.flush 17 🙂 94 🙂 11 😞 52.27% 🙂 Extract out complex expressions
src/whylogs/app/logger.py Logger._rotate_time 7 ⭐ 138 😞 12 😞 53.71% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/whylogs/app/logger.py Logger._set_rotation 8 ⭐ 137 😞 11 😞 54.60% 🙂 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@coveralls
Copy link

coveralls commented Mar 25, 2021

Pull Request Test Coverage Report for Build 687952110

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 32 of 34 (94.12%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on sourcery/pull-180 at 84.206%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/whylogs/app/logger.py 32 34 94.12%
Totals Coverage Status
Change from base Build 687208813: 84.2%
Covered Lines: 3087
Relevant Lines: 3524

💛 - Coveralls

@sourcery-ai sourcery-ai bot closed this Mar 25, 2021
@lalmei lalmei deleted the sourcery/pull-180 branch July 6, 2021 20:14
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