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

✨ Add show_zero_line option to plot_overview and plot_fitted_traces #128

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Jan 13, 2023

This change adds the option show_zero_line to plot_fitted_traces (applied to all axes) and plot_overview (only applied to spectra SAS/DAS). The zero lines are added by default since it falls more in line with plots by @ism200 which makes comparing plots to former publications easier.

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 January 13, 2023 00:04
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 13, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.50 ⭐ 3.89 ⭐ 0.39 👎
Method Length 133.15 😞 142.54 😞 9.39 👎
Working memory 15.20 ⛔ 15.93 ⛔ 0.73 👎
Quality 55.53% 🙂 53.15% 🙂 -2.38% 👎
Other metrics Before After Change
Lines 565 618 53
Changed files Quality Before Quality After Quality Change
pyglotaran_extras/plotting/plot_overview.py 50.01% 🙂 49.81% 😞 -0.20% 👎
pyglotaran_extras/plotting/plot_spectra.py 76.44% ⭐ 68.49% 🙂 -7.95% 👎
pyglotaran_extras/plotting/plot_traces.py 40.82% 😞 38.79% 😞 -2.03% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
pyglotaran_extras/plotting/plot_traces.py plot_data_and_fits 9 🙂 236 ⛔ 21 ⛔ 34.39% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_overview.py plot_overview 5 ⭐ 269 ⛔ 27 ⛔ 34.43% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_traces.py plot_fitted_traces 3 ⭐ 196 😞 26 ⛔ 40.96% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_overview.py plot_simple_overview 3 ⭐ 203 😞 14 😞 48.58% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_spectra.py plot_norm_sas 2 ⭐ 106 🙂 10 😞 66.20% 🙂 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!

@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran-extras/show-zero-line

@s-weigand s-weigand changed the title ✨ Added show_zero_line option to plot_overview and plot_fitted_traces ✨ Add show_zero_line option to plot_overview and plot_fitted_traces Jan 13, 2023
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

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

Coverage data is based on head (21a2f89) compared to base (21a2f89).
Patch has no changes to coverable lines.

❗ Current head 21a2f89 differs from pull request most recent head 0238ab5. Consider uploading reports for the commit 0238ab5 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #128   +/-   ##
=======================================
  Coverage   44.85%   44.85%           
=======================================
  Files          28       28           
  Lines         845      845           
  Branches      125      125           
=======================================
  Hits          379      379           
  Misses        460      460           
  Partials        6        6           

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.

@s-weigand
Copy link
Member Author

@s-weigand s-weigand merged commit 2a44a94 into glotaran:main Jan 27, 2023
@s-weigand s-weigand deleted the show-zero-line branch January 27, 2023 19:19
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