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

👌 Convert plot style Enums to StrEnums for ease of use #144

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Feb 16, 2023

This allows using the enums directly without using the value property.

Before

from pyglotaran_extras.plotting.style import ColorCode

green = ColorCode.green.value

After

from pyglotaran_extras.plotting.style import ColorCode

green = ColorCode.green

Change summary

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)

@s-weigand s-weigand requested a review from a team as a code owner February 16, 2023 17:22
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 16, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.06 ⭐ 0.06 ⭐ 0.00
Method Length 38.64 ⭐ 37.27 ⭐ -1.37 👍
Working memory 4.52 ⭐ 4.63 ⭐ 0.11 👎
Quality 87.91% 87.83% -0.08% 👎
Other metrics Before After Change
Lines 160 158 -2
Changed files Quality Before Quality After Quality Change
pyglotaran_extras/plotting/style.py 87.91% ⭐ 87.83% ⭐ -0.08% 👎

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

File Function Complexity Length Working Memory Quality Recommendation

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!

@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran-extras/make-enums-accessible

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Base: 45.00% // Head: 45.00% // No change to project coverage 👍

Coverage data is based on head (d27c28e) compared to base (f4f5db1).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #144   +/-   ##
=======================================
  Coverage   45.00%   45.00%           
=======================================
  Files          29       29           
  Lines         920      920           
  Branches      133      129    -4     
=======================================
  Hits          414      414           
  Misses        499      499           
  Partials        7        7           
Impacted Files Coverage Δ
pyglotaran_extras/plotting/style.py 84.14% <100.00%> (ø)

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This allows to use the enums directly with useing the value property
@s-weigand s-weigand force-pushed the make-enums-accessible branch from 2b27097 to d27c28e Compare February 18, 2023 18:50
@jsnel jsnel merged commit 6ce9776 into glotaran:main Feb 18, 2023
@s-weigand s-weigand deleted the make-enums-accessible branch February 19, 2023 16:05
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.

2 participants