Repository navigation
Test more error paths and refactorization, and update the docs - #54
Merged
Merged
Conversation
Line coverage hides that no test checked a dimension mismatch, since a check and its throw share a line. Also cover the pattern check of klu!, singular refactorization and recovery, complex matrices as right-hand sides, klu_refactor!, and error codes. Docs: add sections on reusing and checking a factorization, list klu_factor! and copy in the API, fix the dead KLU User Guide links and the Float64 cross-reference warnings, correct the relation between K and A, and fix the klu! arguments and typos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ViralBShah
force-pushed
the
test-coverage-and-docs
branch
from
October 30, 2026 21:17
3738fb1 to
3966679
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
==========================================
+ Coverage 71.26% 73.17% +1.90%
==========================================
Files 2 2
Lines 630 630
==========================================
+ Hits 449 461 +12
+ Misses 181 169 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Follows a review of test quality and coverage on
main. Merged across Julia 1.10 and 1.13, line coverage ofsrc/KLU.jlgoes from 91.4% to 95.8%. The more important gap is one line coverage can't show: no test checked a dimension mismatch, because each check and itsthrowshare a line. #53 fixes the bugs the review found.Tests
These are folded into existing testsets:
DimensionMismatchfromklu,ldiv!andklu!, for plain, adjoint and transposed solvesklu!pattern check, including that a failure leaves the factorization usablecheckandallowsingular, and recovery from itklu_refactor!,K.R,propertynames(K, true),trylock,showon an unfactored object, and thekluerrorcodesDocs
klu_factor!andcopyin the APIFloat64cross-reference warningsKandA:RsneedsDiagonal, andpandqare the row and column permutationsklu!arguments, which listed forms it doesn't accept, and some typosThe new section says
klu!computes the first factorization afterklu(A; full_factor = false), which needs #53. Merge #53 first.Still uncovered
What remains is mostly
kluerrorbranches for libklu failures that are hard to trigger, along with dead code:incrementand theBase.adjointmethod for Julia before 1.10. Theklu!methods that convertnzvalfrom other element types are covered once #53's test is in.src/wrappers.jlis at 39%. It's generated, and most of its functions are never called, which is what pulls Codecov's project figure down to about 52%.Testing
The full suite passes locally on Linux with Julia 1.13 and 1.10 at
-t 2. The docs build with no warnings or errors, other than the expected note that deployment is skipped locally.🤖 Generated with Claude Code