Skip to content

Add MOF support for function generators - #53

Open
blegat wants to merge 4 commits into
mainfrom
bl/mof-public
Open

blegat wants to merge 4 commits into
mainfrom
bl/mof-public

Conversation

@blegat

@blegat blegat commented Nov 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

* Add MOF support for function generators

* MOI bump

* Cover the remaining MOF serialization paths

The MOF round trip was only tested with a `ScalarAffineFunction`
generator over a range iterator, leaving the quadratic and nonlinear
function types, the explicit iterator encoding (tuples, symbols and
unevenly spaced integers) and the two error branches uncovered.
The template is encoded as an ordinary ScalarNonlinearFunction and written
with MOF.moi_to_object and read with MOF.function_to_moi, instead of extending
and calling the internal _convert_nonlinear_to_mof and
_parse_scalar_nonlinear_function.
A template may index a vector of arbitrary variables instead of a
ContiguousArrayOfVariables, for instance when the variable indices of the
model are not contiguous.
A vector of values avoids writing a tuple of an arbitrary type, whose JSON
method a trimmed binary may not contain.
@blegat
blegat added this pull request to stack #55 November 13, 2026 13:42
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (60f1ff9) to head (0e6eab6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   97.89%   98.08%   +0.19%     
==========================================
  Files          11       12       +1     
  Lines        1851     1934      +83     
==========================================
+ Hits         1812     1897      +85     
+ Misses         39       37       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant