plasmo-dev / Plasmo.jl

A Platform for Scalable Modeling and Optimization
Other
143 stars 20 forks source link

Fix nlp block check #71

Closed jalving closed 1 year ago

jalving commented 1 year ago

This PR is intended to fix an issue where Plasmo.jl looked for NLPBlockDual() when setting the solution on an optigraph. This caused an error when using linear solvers because we were checking for an ArgumenError instead of the appropriate MathOptInterface error.

There are also many updates in this PR as we now use Blue style for the code formatting.

codecov-commenter commented 1 year ago

Codecov Report

Base: 90.95% // Head: 90.37% // Decreases project coverage by -0.58% :warning:

Coverage data is based on head (ffb9bbd) compared to base (2169adc). Patch coverage: 86.90% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #71 +/- ## ========================================== - Coverage 90.95% 90.37% -0.59% ========================================== Files 19 19 Lines 2256 2307 +51 ========================================== + Hits 2052 2085 +33 - Misses 204 222 +18 ``` | [Impacted Files](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/structure.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3N0cnVjdHVyZS5qbA==) | `50.00% <33.33%> (-21.80%)` | :arrow_down: | | [src/optiedge.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGllZGdlLmps) | `78.33% <56.52%> (+1.14%)` | :arrow_up: | | [src/partition\_interface/kahypar.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3BhcnRpdGlvbl9pbnRlcmZhY2Uva2FoeXBhci5qbA==) | `75.00% <69.23%> (ø)` | | | [src/optinode.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGlub2RlLmps) | `87.78% <79.62%> (-1.01%)` | :arrow_down: | | [src/optigraph.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGlncmFwaC5qbA==) | `85.53% <81.52%> (-1.89%)` | :arrow_down: | | [src/optimizer\_interface.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGltaXplcl9pbnRlcmZhY2Uuamw=) | `90.00% <82.35%> (+0.47%)` | :arrow_up: | | [src/aggregate.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2FnZ3JlZ2F0ZS5qbA==) | `92.54% <87.50%> (+0.04%)` | :arrow_up: | | [src/nlp\_evaluator.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL25scF9ldmFsdWF0b3Iuamw=) | `87.76% <87.80%> (+0.10%)` | :arrow_up: | | [src/moi\_backend\_node.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21vaV9iYWNrZW5kX25vZGUuamw=) | `90.22% <88.37%> (-0.56%)` | :arrow_down: | | [src/graph\_representations/bipartitegraph.jl](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2dyYXBoX3JlcHJlc2VudGF0aW9ucy9iaXBhcnRpdGVncmFwaC5qbA==) | `94.66% <90.62%> (-1.23%)` | :arrow_down: | | ... and [10 more](https://codecov.io/gh/plasmo-dev/Plasmo.jl/pull/71/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.