Robustify solver, add warm-start API, and update docs (v0.11.2)#23
Merged
Robustify solver, add warm-start API, and update docs (v0.11.2)#23
Conversation
- Replace silent `_ => ()` cone type mismatches with proper error returns - Accept both Integer and Real for integer-expecting cones (z, l, q, ep, s) - Accept both Real and Integer for power cones - Add CscMatrix check_format() validation for P and A matrices - Replace .expect() panics with ok_or_else error propagation for GenPowerCone - Reorder regex checks: ^gp before ^p for clarity - Error on unknown cone types instead of warning-and-ignore - Remove commented-out debug code - Bump version to 0.11.9001 All 93 existing tests pass unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace all stop() calls with cli::cli_abort() for structured errors
- Use cli markup: {.arg}, {.val}, {.fn}, {.cls} for formatting
- Use cli pluralization ({?is/are}) for multi-item errors
- Improve error specificity: clarabel_control now names offending params
- Improve cone validation: separate errors for unknown vs repeated cones
- Add cli to Imports in DESCRIPTION
- Leave savvy-generated 000-wrappers.R stop() untouched
All 93 existing tests pass unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor lib.rs into reusable helpers (build_P_matrix, build_A_matrix, parse_cones, extract_solution) and add ClarabelSolver struct with new/solve/update_data/is_update_allowed methods via savvy external pointers. Add R-level convenience wrappers: clarabel_solver(), solver_solve(), solver_update(), solver_is_update_allowed(). All 93 existing tests pass unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
stop()calls replaced withcli::cli_abort()with markupclarabel_solver(),solver_solve(),solver_update(),solver_is_update_allowed().claude/andCLAUDE.mdfrom R build, allow empty cone specsTest plan
Rscript tests/tinytest.RR CMD checkpasses🤖 Generated with Claude Code