Codecov upload, badges, and tests to 100% line coverage - #2
Merged
Conversation
CI installs pytest-cov and cyipopt (its manylinux wheel needs no system Ipopt), runs pytest with coverage, and uploads coverage.xml with codecov-action@v5 using the org CODECOV_TOKEN; CI + codecov badges added to the README. With cyipopt present the solve_ipopt path runs in CI instead of skipping. The suite now covers every line (264/264 across __init__.py and ipopt.py): - the TABLE builder path via the fixture's new tb prefix, end-to-end plus its refusals (schema-column mismatch, differing column lengths, and a column the library rejects surfacing as its setter's status); - every builder failure stage, each with its own fixture surface: bf (data_begin fails), nf (new_from_data fails), ns (builder without a schema), zz (a fixed library whose constructor fails), and fx with a non-integer argument (no builder surface at all); - the value guards (bool/type/dtype/ndim), the schema key validation, the environment initialization of the search path, the directory-without-a-library error, and the x/y shape guards. CModel now instantiates before resolving the evaluation-symbol table — the order the Julia consumer already uses — so an instantiation failure surfaces as what it is, not as a missing evaluation symbol.
cyipopt publishes no binary wheel for this runner, and its sdist needs a system Ipopt discoverable through pkg-config — Ubuntu's coinor-libipopt-dev provides it. Keeps solve_ipopt exercised (and covered) in CI rather than skipped.
Mirrors CNLPModels.jl: the org CODECOV_TOKEN is repo-scoped and routes uploads to madnlp/examodels-py's slug; OIDC attributes the upload to the repo that ran the workflow.
The sdist compiled but failed at link on -ldmumps_seq: Ubuntu's coinor-libipopt-dev pulls the runtime MUMPS in, not the dev symlinks the linker needs.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytest --covwithcoverage.xmlthroughcodecov-action@v5and the orgCODECOV_TOKEN; CI and codecov badges added to the README. CI also installscyipopt(its manylinux wheel needs no system Ipopt), so thesolve_ipoptpath now runs in CI instead of skipping.__init__.pyandipopt.py. What was missing and is now tested:tbprefix, end-to-end plus its refusals (schema-column mismatch, differing column lengths, and a column the library rejects surfacing as its setter's status);bf(data_begin fails),nf(new_from_data fails),ns(builder without a schema),zz(a fixed library whose constructor fails), andfxwith a non-integer argument (no builder surface at all);CModelnow instantiates before resolving the evaluation-symbol table — the order the Julia consumer already uses — so an instantiation failure surfaces as what it is, not as a missing evaluation symbol on a library that never got that far.The fixture stays byte-identical with the CNLPModels.jl copy (companion PR there).
🤖 Generated with Claude Code