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 typing #96

Merged
merged 1 commit into from
Jun 19, 2022
Merged

👌 Improve typing #96

merged 1 commit into from
Jun 19, 2022

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Jun 19, 2022

Just some minor typing improvements.

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 June 19, 2022 19:24
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 19, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.38%.

Quality metrics Before After Change
Complexity 4.94 ⭐ 4.72 ⭐ -0.22 👍
Method Length 116.67 🙂 117.25 🙂 0.58 👎
Working memory 13.17 😞 13.10 😞 -0.07 👍
Quality 51.89% 🙂 52.27% 🙂 0.38% 👍
Other metrics Before After Change
Lines 496 499 3
Changed files Quality Before Quality After Quality Change
pyglotaran_extras/io/load_data.py 74.34% 🙂 74.34% 🙂 0.00%
pyglotaran_extras/plotting/plot_data.py 49.27% 😞 49.24% 😞 -0.03% 👎
pyglotaran_extras/plotting/plot_doas.py 43.62% 😞 44.55% 😞 0.93% 👍
pyglotaran_extras/plotting/plot_guidance.py 65.93% 🙂 65.92% 🙂 -0.01% 👎
pyglotaran_extras/plotting/plot_overview.py 48.48% 😞 48.93% 😞 0.45% 👍

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_overview.py plot_overview 5 ⭐ 202 😞 24 ⛔ 39.13% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_doas.py plot_doas 6 ⭐ 323 ⛔ 12 😞 42.96% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_overview.py plot_simple_overview 5 ⭐ 252 ⛔ 14 😞 43.60% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_data.py plot_data_overview 4 ⭐ 207 ⛔ 16 ⛔ 44.92% 😞 Try splitting into smaller methods. Extract out complex expressions
pyglotaran_extras/plotting/plot_guidance.py plot_guidance 2 ⭐ 123 😞 10 😞 64.01% 🙂 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!

Help us improve this quality report!

@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran-extras/improve_typing

@codecov
Copy link

codecov bot commented Jun 19, 2022

Codecov Report

Merging #96 (ef70733) into main (b222ea0) will not change coverage.
The diff coverage is 25.00%.

@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   40.18%   40.18%           
=======================================
  Files          23       23           
  Lines         662      662           
  Branches       96       96           
=======================================
  Hits          266      266           
  Misses        396      396           
Impacted Files Coverage Δ
pyglotaran_extras/plotting/plot_data.py 37.50% <ø> (ø)
pyglotaran_extras/plotting/plot_doas.py 0.00% <0.00%> (ø)
pyglotaran_extras/plotting/plot_guidance.py 31.81% <ø> (ø)
pyglotaran_extras/plotting/plot_overview.py 27.41% <ø> (ø)
pyglotaran_extras/io/load_data.py 36.84% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b222ea0...ef70733. Read the comment docs.

@s-weigand s-weigand merged commit 295c955 into glotaran:main Jun 19, 2022
@s-weigand s-weigand deleted the improve_typing branch June 19, 2022 19:36
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