Skip to content

Say why a full export or unpack of a non-full object fails - #640

Open
eriknw wants to merge 1 commit into
48-to-dicts-emptyfrom
47-ss-export-full-message
Open

eriknw wants to merge 1 commit into
48-to-dicts-emptyfrom
47-ss-export-full-message

Conversation

@eriknw

@eriknw eriknw commented Oct 19, 2026

Copy link
Copy Markdown
Member

ss.export and ss.unpack to "full", "fullr" or "fullc" on an object with
missing entries raised InvalidValue with an empty message, because SuiteSparse
sets no error string there (the object was left intact). It now raises
InvalidValue (same type) as "Matrix with 1 of 4 entries is not full, so it
cannot export to format 'fullr'". Tests: export and unpack, Vector and both
Matrix orders.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (48-to-dicts-empty@0660c85). Learn more about missing BASE report.

Additional details and impacted files
@@                 Coverage Diff                  @@
##             48-to-dicts-empty     #640   +/-   ##
====================================================
  Coverage                     ?   98.65%           
====================================================
  Files                        ?      105           
  Lines                        ?    29280           
  Branches                     ?     3447           
====================================================
  Hits                         ?    28885           
  Misses                       ?      252           
  Partials                     ?      143           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eriknw
eriknw added this pull request to stack #650 October 19, 2026 07:50
@eriknw
eriknw force-pushed the 47-ss-export-full-message branch from a3d3a06 to 9f1f0ef Compare October 19, 2026 07:55
@eriknw

eriknw commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Hooray better error messages! LGTM

@eriknw
eriknw force-pushed the 47-ss-export-full-message branch 2 times, most recently from 410a715 to b5615ad Compare October 21, 2026 04:14
@eriknw
eriknw force-pushed the 47-ss-export-full-message branch 2 times, most recently from 2668c6b to ff376e4 Compare October 28, 2026 04:29
@eriknw
eriknw removed this pull request from stack #650 October 28, 2026 04:29
@eriknw
eriknw added this pull request to stack #653 October 28, 2026 04:30
@eriknw
eriknw removed this pull request from stack #653 October 28, 2026 04:31
@eriknw
eriknw added this pull request to stack #655 October 28, 2026 04:32
@eriknw
eriknw removed this pull request from stack #655 October 28, 2026 04:33
@eriknw
eriknw added this pull request to stack #657 October 28, 2026 04:33
@eriknw
eriknw force-pushed the 47-ss-export-full-message branch from ff376e4 to e3ff3e3 Compare October 28, 2026 13:21
Vector.ss.export("full"), Matrix.ss.export("fullr") and "fullc", and
the same formats through ss.unpack, on an object with missing entries
raised InvalidValue with an empty message: SuiteSparse refuses with
GrB_INVALID_VALUE and sets no error string, so there was nothing to
show. The object itself was left intact.

Check the entry count first and raise InvalidValue (the same type as
before) with the count and the format:

    Matrix with 1 of 4 entries is not full, so it cannot export to
    format 'fullr'
@eriknw
eriknw force-pushed the 47-ss-export-full-message branch from e3ff3e3 to aca2f1f Compare October 29, 2026 02:01
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