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

improve stats summary in cat_plot #34

Merged
merged 2 commits into from
Sep 23, 2022
Merged

Conversation

hasan-alper
Copy link
Contributor

# Before the changes
klib.cat_plot(df, top=3, bottom=3)

t3b3o

The first and fourth column in this summary seem to be incorrect. Top + bottom shouldn't be greater than unique value (column 4) or equal to zero (column 1) in these columns.

# After the changes
klib.cat_plot(df, top=3, bottom=3)

t3b3n

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 22, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 8.61 🙂 9.86 🙂 1.25 👎
Method Length 482.50 ⛔ 484.83 ⛔ 2.33 👎
Working memory 16.91 ⛔ 16.93 ⛔ 0.02 👎
Quality 32.94% 😞 31.88% 😞 -1.06% 👎
Other metrics Before After Change
Lines 774 776 2
Changed files Quality Before Quality After Quality Change
src/klib/describe.py 32.94% 😞 31.88% 😞 -1.06% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/klib/describe.py cat_plot 17 🙂 694 ⛔ 21 ⛔ 21.28% ⛔ Try splitting into smaller methods. Extract out complex expressions
src/klib/describe.py missingval_plot 6 ⭐ 822 ⛔ 19 ⛔ 32.20% 😞 Try splitting into smaller methods. Extract out complex expressions
src/klib/describe.py dist_plot 9 🙂 798 ⛔ 15 😞 33.10% 😞 Try splitting into smaller methods. Extract out complex expressions
src/klib/describe.py corr_plot 2 ⭐ 270 ⛔ 22 ⛔ 38.99% 😞 Try splitting into smaller methods. Extract out complex expressions
src/klib/describe.py corr_mat 8 ⭐ 199 😞 51.35% 🙂 Try splitting into smaller methods

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!

@akanz1 akanz1 self-requested a review September 23, 2022 07:32
@akanz1 akanz1 added the bug Something isn't working label Sep 23, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #34 (925ac98) into main (698010b) will decrease coverage by 0.11%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
- Coverage   53.43%   53.31%   -0.12%     
==========================================
  Files           3        3              
  Lines         466      467       +1     
  Branches       64       64              
==========================================
  Hits          249      249              
- Misses        210      211       +1     
  Partials        7        7              
Impacted Files Coverage Δ
src/klib/describe.py 19.57% <33.33%> (-0.09%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@akanz1 akanz1 merged commit a513342 into akanz1:main Sep 23, 2022
@akanz1
Copy link
Owner

akanz1 commented Sep 23, 2022

Thanks @hasan-alper for reporting and providing a fix!

@akanz1
Copy link
Owner

akanz1 commented Sep 23, 2022

I'll release 1.0.5 sometime early next week :)

@hasan-alper hasan-alper deleted the cat_plot branch September 23, 2022 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants