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 a-matrix inspection function #124

Merged
merged 12 commits into from
Jan 2, 2023
Merged

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Dec 30, 2022

This change adds a new sub package for inspection functions (pyglotaran_extras.inspect) and the show_a_matrixes function to render all a-matrixes in a ResultLike optimization result.
The rendered matrixes are wrapped in a html details tag per dataset, which is collapsed by default.
Inside the details tag, the matrixes are placed under a heading with the corresponding megacomplex name.

Here is an example of what output looks like, for more examples have a look at the markdown preview of the added unit test data:
image

Change summary

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)
  • 🧪 Adds new tests for the feature (mandatory for ✨ feature and 🩹 bug fix PR's)

@s-weigand s-weigand requested a review from a team as a code owner December 30, 2022 15:14
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 30, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.00 ⭐ 0.00 ⭐ 0.00
Method Length 11.00 ⭐ 26.40 ⭐ 15.40 👎
Working memory 1.00 ⭐ 2.67 ⭐ 1.67 👎
Quality 99.67% 97.65% -2.02% 👎
Other metrics Before After Change
Lines 4 24 20
Changed files Quality Before Quality After Quality Change
tests/__init__.py % 96.51% ⭐ %
tests/conftest.py 99.67% ⭐ 97.80% ⭐ -1.87% 👎

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/show-a-matrix

@codecov
Copy link

codecov bot commented Dec 30, 2022

Codecov Report

Base: 40.20% // Head: 44.85% // Increases project coverage by +4.64% 🎉

Coverage data is based on head (159e795) compared to base (bdb5a48).
Patch coverage: 90.54% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   40.20%   44.85%   +4.64%     
==========================================
  Files          25       28       +3     
  Lines         771      845      +74     
  Branches      108      125      +17     
==========================================
+ Hits          310      379      +69     
  Misses        460      460              
- Partials        1        6       +5     
Impacted Files Coverage Δ
pyglotaran_extras/inspect/a_matrix.py 87.17% <87.17%> (ø)
pyglotaran_extras/inspect/utils.py 93.93% <93.93%> (ø)
pyglotaran_extras/inspect/__init__.py 100.00% <100.00%> (ø)
pyglotaran_extras/io/utils.py 47.82% <0.00%> (+8.69%) ⬆️

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.

Copy link
Member

@jsnel jsnel left a comment

Choose a reason for hiding this comment

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

Rebase and minor changes

pyglotaran_extras/inspect/a_matrix.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/utils.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/utils.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/utils.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/utils.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/a_matrix.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/a_matrix.py Outdated Show resolved Hide resolved
pyglotaran_extras/inspect/a_matrix.py Show resolved Hide resolved
pyglotaran_extras/inspect/a_matrix.py Outdated Show resolved Hide resolved
@s-weigand s-weigand force-pushed the show-a-matrix branch 2 times, most recently from fd583a7 to 159e795 Compare January 2, 2023 00:09
@jsnel jsnel merged commit a6c91ab into glotaran:main Jan 2, 2023
@s-weigand s-weigand deleted the show-a-matrix branch January 2, 2023 21:16
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