Skip to content

Export AbstractSparseMatrixCSC, getcolptr, indtype - #767

Open
j-fu wants to merge 6 commits into
JuliaSparse:mainfrom
j-fu:export-abstractsparsematrixcsc
Open

Export AbstractSparseMatrixCSC, getcolptr, indtype#767
j-fu wants to merge 6 commits into
JuliaSparse:mainfrom
j-fu:export-abstractsparsematrixcsc

Conversation

@j-fu

@j-fu j-fu commented Sep 8, 2026

Copy link
Copy Markdown
Member

AbstractSparseMatrixCSC and getcolptr are heavily used in LinearSolve.jl.

We find uses of getcolptr in Sparspak.jl and Pardiso.jl (and yes, in my package ExtendableSparse.jl)

indtype is a useful complement to eltype which could be extended for subtypes of AbstractSparseArray.SparseMatrixCSC

I intend to replace #395 with this PR. My main concern ist "ExplicitImports sanity" of the package ecosystem. IMHO #395 was (perceived as) too ambitious, probably because of the word 'interface' in the title. The present PR doesn't care about "interface", but just pragmatically tries to formalize what is current practice.

As for 'indtype', this is a slightly different discussion, we may just make it public, and I would also agree with keeping it internal, in order to prevent delaying of fixing the situation with AbstractSparseMatrixCSC and getcolptr.

AbstractSparseMatrixCSC and getcolptr are heavily used in LinearSolve.jl.

We find uses of getcolptr in Sparspak.jl and Pardiso.jl

indtype is a useful complement to eltype which could be extended for subtypes of AbstractSparseArray.
@ViralBShah

Copy link
Copy Markdown
Member

Let’s get it done.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.19%. Comparing base (c9deb4a) to head (4a8a355).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
+ Coverage   84.16%   84.19%   +0.03%     
==========================================
  Files          13       13              
  Lines        9393     9405      +12     
==========================================
+ Hits         7906     7919      +13     
+ Misses       1487     1486       -1     

☔ 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The public getcolptr documentation incorrectly guarantees writability for fixed-sparsity matrices.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Exports key CSC sparse-matrix APIs and documents their use.

Changes:

  • Exports AbstractSparseMatrixCSC, getcolptr, and indtype.
  • Adds docstrings for getcolptr and indtype.
File summaries
File Description
src/SparseArrays.jl Exports the three APIs.
src/sparsematrix.jl Documents getcolptr.
src/abstractsparse.jl Documents indtype.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/sparsematrix.jl Outdated
Suggested by copilot.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@j-fu

j-fu commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Should be ok now.

@ViralBShah

Copy link
Copy Markdown
Member

I am ok with merging this. Let's give it a few days for feedback since we are exporting a couple new things here.

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.

3 participants