-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
[docs] tick off macro refactoring from roadmap #3629
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3629 +/- ##
=======================================
Coverage 98.27% 98.27%
=======================================
Files 43 43
Lines 5636 5636
=======================================
Hits 5539 5539
Misses 97 97 ☔ View full report in Codecov by Sentry. |
cd5b0c3
to
9f4f355
Compare
So Plasmo uses cc @dlcole3 |
So clean. How confident are we about the test coverage and not breaking things with this big refactor? |
I'm fairly confident. I actually made very minimal changes to how the macros process code and the steps they do it in. it was mainly just refactoring common operations into some now public That said, we know that the test coverage is not comprehensive, because #3631 was only picked up by the extension tests. So there are some unknown unknowns, where we don't know what parts we're missing tests for. The main risk is probably The extension tests pass now though: https://github.com/jump-dev/JuMP.jl/actions/runs/7216451785 (With the exception of an unrelated printing change in DisjunctiveProgramming) |
Do we have good coverage for error messages also? |
We're not quite at 100%. Just a few lines missing, but from a glance they look okay: https://app.codecov.io/gh/jump-dev/JuMP.jl/blob/master/src%2Fmacros%2F%40constraint.jl#L671 I can open another PR that adds some more tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's have benoit approve the roadmap item completion also
b1b76ac
to
fdd4b6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too, it's nice to have this refactored into the Containers submodule so that the non-optimization specific part is decoupled. Actually, if this submodule was a separate package, I could use it in DynamicPolynomials in the @polyvar
macro.
It's starting to seem like that might be good. But there's no rush. |
Closes #3513
I have made a whole suite of changes recently:
Looking at a diff isn't too useful, but here was the code before I started:
https://github.com/jump-dev/JuMP.jl/blob/v1.17.0/src/macros.jl
And here it is now:
https://github.com/jump-dev/JuMP.jl/blob/master/src/macros.jl
https://github.com/jump-dev/JuMP.jl/tree/master/src/macros
https://github.com/jump-dev/JuMP.jl/blob/master/src/Containers/macro.jl
I'm particularly pleased with the now very readable:
JuMP.jl/src/macros/@expression.jl
Lines 66 to 98 in 65d12dc
when it was
JuMP.jl/src/macros.jl
Lines 1923 to 1975 in 419c334
For extensions, @pulsipher has been trying this out in InfiniteOpt: infiniteopt/InfiniteOpt.jl#334, and I think it's a big win.
Now is the chance to take a read through and open up any bike shedding, etc.