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

Bringing Modopt to 2024's standards. #340

Merged
merged 34 commits into from
Mar 13, 2024

Conversation

paquiteau
Copy link
Contributor

@paquiteau paquiteau commented Feb 14, 2024

This PR goals is to:

  • move the packaging side to a pyproject toml file.
  • setup black and ruff for linting and style
  • Move the package to a src layout
  • Fixes the erros ruff gives.
  • Use a slicker, more efficient CI setup, more close to what is done in MRI-NUFFT.

This is going to be a big one...

Maybe the best is to merge previous PR (#338, #339) and fix the CI here. This supersed what @sfarrens started in #289.

@sfarrens
Copy link
Contributor

@paquiteau do you want me to review what you have done so far in this PR or wait till all the boxed are ticked?

@paquiteau
Copy link
Contributor Author

I would advise to start the review now, because the changelog is going to be very messy very fast.

@paquiteau paquiteau force-pushed the modopt-2024 branch 4 times, most recently from af304ae to 13fcd25 Compare February 19, 2024 14:40
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 81.15942% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 85.92%. Comparing base (64d6f85) to head (8e277aa).
Report is 15 commits behind head on master.

Files Patch % Lines
src/modopt/interface/errors.py 14.28% 12 Missing ⚠️
src/modopt/base/backend.py 56.25% 7 Missing ⚠️
src/modopt/interface/log.py 0.00% 6 Missing ⚠️
src/modopt/opt/algorithms/forward_backward.py 86.48% 5 Missing ⚠️
src/modopt/opt/linear/wavelet.py 61.53% 5 Missing ⚠️
src/modopt/opt/algorithms/gradient_descent.py 50.00% 3 Missing ⚠️
src/modopt/opt/proximity.py 93.02% 3 Missing ⚠️
src/modopt/signal/wavelet.py 50.00% 3 Missing ⚠️
src/modopt/opt/algorithms/base.py 77.77% 2 Missing ⚠️
src/modopt/base/observable.py 75.00% 1 Missing ⚠️
... and 5 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
- Coverage   90.58%   85.92%   -4.67%     
==========================================
  Files          36       37       +1     
  Lines        2454     2010     -444     
==========================================
- Hits         2223     1727     -496     
- Misses        231      283      +52     
Flag Coverage Δ
unittests 85.92% <81.15%> (-4.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@paquiteau
Copy link
Contributor Author

@sfarrens The CI is now in a pretty good state, apart from the documentation setup. Could you have a look ? I am not mastering what you set up ^^

I think we should drop the MacOs test suite, it takes time, and does not bring that much of value to do the unit test in it. Maybe we still want to at least check if Modopt is installable in MacOs (with M1 chip notably). It remains out of my scope of competence though.

@sfarrens
Copy link
Contributor

@paquiteau amazing work (as always)! I will go through everything next week (I am at a meeting this week). For the macOS test suite we can simply make it manually triggered rather than automatically to reduce the per commit overhead. 🙂

@paquiteau
Copy link
Contributor Author

@sfarrens any update on the review ?

@sfarrens
Copy link
Contributor

@paquiteau apologies for the delay. I will start going through it ASAP!

Copy link
Contributor

@sfarrens sfarrens left a comment

Choose a reason for hiding this comment

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

I only spotted a couple of very minor points. Once these threads are resolved I think we can merge. Nice work! 👏

src/modopt/opt/algorithms/admm.py Show resolved Hide resolved
src/modopt/opt/algorithms/admm.py Show resolved Hide resolved
src/modopt/signal/validation.py Outdated Show resolved Hide resolved
tests/test_math.py Show resolved Hide resolved
@sfarrens
Copy link
Contributor

I only spotted a couple of very minor points. Once these threads are resolved I think we can merge. Nice work! 👏

Unless you have further changes planned of course.

@paquiteau paquiteau merged commit ee4a6b5 into CEA-COSMIC:master Mar 13, 2024
2 of 8 checks passed
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.

3 participants