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

[Backport] Improve ordering in k_matrix involved_compartments function #791

Merged

Conversation

jsnel
Copy link
Member

@jsnel jsnel commented Aug 25, 2021

Avoiding the use of set to improve ordering

Refactor at least guarantees better than random ordering using list(set(x))

Backport of a6a5a51 for improved consistency between v0.4.1 maintenance branch and staging-to-become-v0.5.0

Checklist

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

Avoiding the use of set to improve ordering

Refactor at least guarantees better than random ordering using list(set(x))

Backport of a6a5a51 for improved consistency between v0.4.1 maintenance branch and staging-to-become-v0.5.0
@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch jsnel/pyglotaran/maintenance/backport_fixes_to_v0.4.1

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 25, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.36 ⭐ 2.66 ⭐ 0.30 👎
Method Length 53.25 ⭐ 53.56 ⭐ 0.31 👎
Working memory 6.94 🙂 6.91 🙂 -0.03 👍
Quality 78.36% 78.13% -0.23% 👎
Other metrics Before After Change
Lines 274 278 4
Changed files Quality Before Quality After Quality Change
glotaran/builtin/models/kinetic_image/k_matrix.py 78.36% ⭐ 78.13% ⭐ -0.23% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
glotaran/builtin/models/kinetic_image/k_matrix.py KMatrix.matrix_as_markdown 4 ⭐ 87 🙂 10 😞 66.85% 🙂 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!

@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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

Benchmark is done. Checkout the benchmark result page.
Benchmark differences below 5% might be due to CI noise.

Benchmark diff
· Did not find results for commit 482a53bd2b04fa56a7808b97ef11892d94507243

Copy link
Member

@s-weigand s-weigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #791 (db34f0d) into maintenance/v0.4.1 (0ece818) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           maintenance/v0.4.1    #791   +/-   ##
==================================================
  Coverage                81.8%   81.8%           
==================================================
  Files                      79      79           
  Lines                    3923    3924    +1     
  Branches                  690     692    +2     
==================================================
+ Hits                     3211    3212    +1     
  Misses                    593     593           
  Partials                  119     119           
Impacted Files Coverage Δ
glotaran/builtin/models/kinetic_image/k_matrix.py 94.8% <100.0%> (+<0.1%) ⬆️

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 0ece818...db34f0d. Read the comment docs.

@jsnel jsnel merged commit 26387f7 into glotaran:maintenance/v0.4.1 Aug 25, 2021
@jsnel jsnel deleted the maintenance/backport_fixes_to_v0.4.1 branch August 25, 2021 04:42
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