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

🩹 Fix ordering bug in MatrixProvider class #1512

Merged
merged 2 commits into from
Aug 18, 2024

Conversation

jsnel
Copy link
Member

@jsnel jsnel commented Aug 18, 2024

In the call to combine_megacomplex_matrices the matrices would be reordered independent of their labels resulting in a combined matrix that would be ordered differently than expected. This issue was specifically found in the case of multiple types of different megacomplexes.

This bug fix was orginally part of #1510 but was seperated out because of its broader scope.

Change summary

  • Fix an ordering bug in the combine_megacomplex_matrices method of MatrixProvider

Checklist

  • 🚧 Added changes to changelog (mandatory for all PR's)

Copy link

codecov bot commented Aug 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.6%. Comparing base (2c88dce) to head (dae1d94).
Report is 17 commits behind head on main.

Files Patch % Lines
glotaran/optimization/matrix_provider.py 0.0% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1512     +/-   ##
=======================================
- Coverage   88.6%   88.6%   -0.1%     
=======================================
  Files        107     107             
  Lines       5128    5134      +6     
  Branches     962     965      +3     
=======================================
+ Hits        4544    4549      +5     
- Misses       468     469      +1     
  Partials     116     116             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsnel jsnel marked this pull request as ready for review August 18, 2024 18:12
@jsnel jsnel requested a review from a team as a code owner August 18, 2024 18:12
Copy link
Contributor

sourcery-ai bot commented Aug 18, 2024

🧙 Sourcery has finished reviewing your pull request!


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

Copy link

sonarcloud bot commented Aug 18, 2024

@jsnel jsnel mentioned this pull request Aug 18, 2024
3 tasks
@jsnel jsnel merged commit e53fcd5 into glotaran:main Aug 18, 2024
37 of 38 checks passed
@jsnel jsnel deleted the fix/ordering_bug_in_matrixprovider branch August 18, 2024 18:18
jsnel added a commit that referenced this pull request Aug 23, 2024
The `PFIDMegacomplex` is a megacomplex used for fitting perturbed free induction decay as described in Hamm 1995: https://doi.org/10.1016/0301-0104(95)00262-6

*👌 Guard against zero standard errors for fixed parameters
*🧪👌 Add irf attribute to PFIDDatasetModel and update pfid unit tests
- OneOscillationWithIrf
- OneOscillationWithSequentialModel
* ♻️Refactor pfid_megacomplex to be always index dependent
* 📚 Added change to changelog
* 🩹 Modify unit test to be more suspectiable to orderin bug (fixed in PR #1512 )
* 🧪 Added test to catch AttributeError validating bad pfid model definition
* 🩹 Fix AttributeError validating bad pfid model definition
* 🧰 Remove pre-commit from dev dependencies


Co-authored-by: Sebastian Weigand <[email protected]>
Co-authored-by: Jörn Weißenborn <[email protected]>
Co-authored-by: Ivo van Stokkum <[email protected]>
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