Skip to content

Commit ed80025

Browse files
committed
Merge branch 'main' into export_abstractmatrixcsc
2 parents 98b07ea + 0dd8d45 commit ed80025

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2980
-51736
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "monthly"

.github/workflows/CompatHelper.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
if: github.event.pull_request.merged
1212
steps:
1313
- name: Backport
14-
uses: tibdex/backport@v1
14+
uses: tibdex/backport@v2
1515
with:
1616
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: CI
22
on:
33
pull_request:
4-
branches:
5-
- 'main'
6-
- 'release-*'
74
push:
85
branches:
96
- 'main'
@@ -16,30 +13,34 @@ concurrency:
1613
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1714
jobs:
1815
test:
19-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
2016
runs-on: ${{ matrix.os }}
17+
timeout-minutes: 60
2118
strategy:
2219
fail-fast: false
2320
matrix:
24-
version:
21+
julia-version:
2522
- 'nightly'
2623
os:
2724
- ubuntu-latest
28-
- macOS-latest
2925
- windows-latest
30-
arch:
26+
- macOS-13 # intel
27+
julia-arch:
3128
- x64
3229
- x86
3330
exclude:
31+
- os: macOS-13
32+
julia-arch: x86
33+
include:
3434
- os: macOS-latest
35-
arch: x86
35+
julia-arch: aarch64
36+
3637
steps:
37-
- uses: actions/checkout@v2
38-
- uses: julia-actions/setup-julia@v1
38+
- uses: actions/checkout@v4
39+
- uses: julia-actions/setup-julia@v2
3940
with:
40-
version: ${{ matrix.version }}
41-
arch: ${{ matrix.arch }}
42-
- uses: actions/cache@v1
41+
version: ${{ matrix.julia-version }}
42+
arch: ${{ matrix.julia-arch }}
43+
- uses: actions/cache@v4
4344
env:
4445
cache-name: cache-artifacts
4546
with:
@@ -53,14 +54,41 @@ jobs:
5354
- uses: julia-actions/julia-buildpkg@v1
5455
- uses: julia-actions/julia-runtest@v1
5556
- uses: julia-actions/julia-processcoverage@v1
56-
- uses: codecov/codecov-action@v1
57+
- uses: codecov/codecov-action@v4
5758
with:
5859
file: lcov.info
60+
token: ${{ secrets.CODECOV_TOKEN }}
61+
aqua-test:
62+
runs-on: ${{ matrix.os }}
63+
timeout-minutes: 60
64+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
65+
actions: write
66+
contents: read
67+
strategy:
68+
matrix:
69+
julia-version:
70+
- 'nightly'
71+
os:
72+
- ubuntu-latest
73+
julia-arch:
74+
- x64
75+
steps:
76+
- uses: actions/checkout@v4
77+
- uses: julia-actions/setup-julia@v2
78+
with:
79+
version: ${{ matrix.julia-version }}
80+
arch: ${{ matrix.julia-arch }}
81+
- uses: julia-actions/cache@v2
82+
- run: julia --color=yes .ci/test_and_change_uuid.jl
83+
- uses: julia-actions/julia-buildpkg@v1
84+
- uses: julia-actions/julia-runtest@v1
85+
env:
86+
SPARSEARRAYS_AQUA_TEST: true
5987
docs:
6088
runs-on: ubuntu-latest
6189
steps:
62-
- uses: actions/checkout@v2
63-
- uses: julia-actions/setup-julia@latest
90+
- uses: actions/checkout@v4
91+
- uses: julia-actions/setup-julia@v2
6492
with:
6593
# version: '1.6'
6694
version: 'nightly'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest.toml
2+
Manifest-v*.*.toml
3+
docs/build

Project.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "SparseArrays"
22
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
3-
version = "1.10.0"
3+
version = "1.12.0"
44

55
[deps]
66
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -10,8 +10,18 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
1010
SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
1111

1212
[compat]
13-
SuiteSparse_jll = "7.2"
14-
julia = "1.10"
13+
Aqua = "0.8"
14+
Dates = "<0.0.1, 1"
15+
InteractiveUtils = "<0.0.1, 1"
16+
Libdl = "<0.0.1, 1"
17+
LinearAlgebra = "<0.0.1, 1"
18+
Pkg = "<0.0.1, 1"
19+
Printf = "<0.0.1, 1"
20+
Random = "<0.0.1, 1"
21+
Serialization = "<0.0.1, 1"
22+
SuiteSparse_jll = "7.8.0"
23+
Test = "<0.0.1, 1"
24+
julia = "1.11"
1525

1626
[extras]
1727
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "1"

docs/make.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ makedocs(
88
sitename = "SparseArrays",
99
pages = Any[
1010
"SparseArrays" => "index.md",
11-
"Sparse Linear Algebra" => "solvers.md",
11+
"Sparse Linear Algebra API" => "solvers.md",
1212
];
13-
# strict = true,
14-
strict = Symbol[:doctest],
13+
warnonly = [:missing_docs, :cross_references],
1514
)
1615

1716
deploydocs(repo = "github.com/JuliaSparse/SparseArrays.jl.git")

docs/src/index.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
EditURL = "https://github.com/JuliaSparse/SparseArrays.jl/blob/master/docs/src/index.md"
3+
```
4+
15
# Sparse Arrays
26

37
```@meta
@@ -7,7 +11,7 @@ DocTestSetup = :(using SparseArrays, LinearAlgebra)
711
Julia has support for sparse vectors and [sparse matrices](https://en.wikipedia.org/wiki/Sparse_matrix)
812
in the `SparseArrays` stdlib module. Sparse arrays are arrays that contain enough zeros that storing them in a special data structure leads to savings in space and execution time, compared to dense arrays.
913

10-
External packages which implement different sparse storage types, multidimensional sparse arrays, and more can be found in [Noteworthy external packages](@ref man-csc)
14+
External packages which implement different sparse storage types, multidimensional sparse arrays, and more can be found in [Noteworthy External Sparse Packages](@ref)
1115

1216
## [Compressed Sparse Column (CSC) Sparse Matrix Storage](@id man-csc)
1317

@@ -121,9 +125,9 @@ julia> R = sparsevec(I,V)
121125
```
122126

123127
The inverse of the [`sparse`](@ref) and [`sparsevec`](@ref) functions is
124-
[`findnz`](@ref), which retrieves the inputs used to create the sparse array.
125-
[`findall(!iszero, x)`](@ref) returns the cartesian indices of non-zero entries in `x`
126-
(including stored entries equal to zero).
128+
[`findnz`](@ref), which retrieves the inputs used to create the sparse array (including stored entries equal to zero).
129+
[`findall(!iszero, x)`](@ref) returns the Cartesian indices of non-zero entries in `x`
130+
(not including stored entries equal to zero).
127131

128132
```jldoctest sparse_function
129133
julia> findnz(S)
@@ -202,6 +206,25 @@ section of the standard library reference.
202206
| [`sprandn(m,n,d)`](@ref) | [`randn(m,n)`](@ref) | Creates a *m*-by-*n* random matrix (of density *d*) with iid non-zero elements distributed according to the standard normal (Gaussian) distribution. |
203207
| [`sprandn(rng,m,n,d)`](@ref) | [`randn(rng,m,n)`](@ref) | Creates a *m*-by-*n* random matrix (of density *d*) with iid non-zero elements generated with the `rng` random number generator |
204208

209+
## [Sparse Linear Algebra](@id stdlib-sparse-linalg)
210+
211+
Sparse matrix solvers call functions from [SuiteSparse](http://suitesparse.com). The following factorizations are available:
212+
213+
1. [`cholesky`](@ref SparseArrays.CHOLMOD.cholesky)
214+
2. [`ldlt`](@ref SparseArrays.CHOLMOD.ldlt)
215+
3. [`lu`](@ref SparseArrays.UMFPACK.lu)
216+
4. [`qr`](@ref SparseArrays.SPQR.qr)
217+
218+
| Type | Description |
219+
|:----------------------|:--------------------------------------------- |
220+
| `CHOLMOD.Factor` | Cholesky and LDLt factorizations |
221+
| `UMFPACK.UmfpackLU` | LU factorization |
222+
| `SPQR.QRSparse` | QR factorization |
223+
224+
```@meta
225+
DocTestSetup = nothing
226+
```
227+
205228
# [SparseArrays API](@id stdlib-sparse-arrays)
206229

207230
```@docs
@@ -243,7 +266,8 @@ SparseArrays.ftranspose!
243266
```@meta
244267
DocTestSetup = nothing
245268
```
246-
# Noteworthy external packages
269+
270+
# Noteworthy External Sparse Packages
247271

248272
Several other Julia packages provide sparse matrix implementations that should be mentioned:
249273

@@ -260,3 +284,17 @@ Several other Julia packages provide sparse matrix implementations that should b
260284
6. [LuxurySparse.jl](https://github.com/QuantumBFS/LuxurySparse.jl) provides static sparse array formats, as well as a coordinate format.
261285

262286
7. [ExtendableSparse.jl](https://github.com/j-fu/ExtendableSparse.jl) enables fast insertion into sparse matrices using a lazy approach to new stored indices.
287+
288+
8. [Finch.jl](https://github.com/willow-ahrens/Finch.jl) supports extensive multidimensional sparse array formats and operations through a mini tensor language and compiler, all in native Julia. Support for COO, CSF, CSR, CSC and more, as well as operations like broadcast, reduce, etc. and custom operations.
289+
290+
External packages providing sparse direct solvers:
291+
1. [KLU.jl](https://github.com/JuliaSparse/KLU.jl)
292+
2. [Pardiso.jl](https://github.com/JuliaSparse/Pardiso.jl/)
293+
294+
External packages providing solvers for iterative solution of eigensystems and singular value decompositions:
295+
1. [ArnoldiMethods.jl](https://github.com/JuliaLinearAlgebra/ArnoldiMethod.jl)
296+
2. [KrylovKit](https://github.com/Jutho/KrylovKit.jl)
297+
3. [Arpack.jl](https://github.com/JuliaLinearAlgebra/Arpack.jl)
298+
299+
External packages for working with graphs:
300+
1. [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl)

docs/src/solvers.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,18 @@
1-
# Sparse Linear Algebra
1+
# Sparse Linear Algebra (API)
22

33
```@meta
44
DocTestSetup = :(using LinearAlgebra, SparseArrays)
55
```
66

7-
Sparse matrix solvers call functions from [SuiteSparse](http://suitesparse.com). The following factorizations are available:
8-
9-
| Type | Description |
10-
|:--------------------------------- |:--------------------------------------------- |
11-
| `CHOLMOD.Factor` | Cholesky factorization |
12-
| `UMFPACK.UmfpackLU` | LU factorization |
13-
| `SPQR.QRSparse` | QR factorization |
14-
15-
Other solvers such as [Pardiso.jl](https://github.com/JuliaSparse/Pardiso.jl/) are available as external packages. [Arpack.jl](https://julialinearalgebra.github.io/Arpack.jl/stable/) provides `eigs` and `svds` for iterative solution of eigensystems and singular value decompositions.
16-
17-
These factorizations are described in more detail in [`Linear Algebra`](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/) section of the manual:
18-
1. [`cholesky`](@ref)
19-
2. [`ldlt`](@ref)
20-
3. [`lu`](@ref)
21-
4. [`qr`](@ref)
22-
23-
```@docs
7+
```@docs; canonical=false
248
SparseArrays.CHOLMOD.cholesky
259
SparseArrays.CHOLMOD.cholesky!
26-
SparseArrays.CHOLMOD.ldlt
27-
SparseArrays.SPQR.qr
28-
SparseArrays.UMFPACK.lu
29-
```
30-
31-
```@docs
32-
SparseArrays.CHOLMOD.lowrankupdate
33-
SparseArrays.CHOLMOD.lowrankupdate!
3410
SparseArrays.CHOLMOD.lowrankdowndate
3511
SparseArrays.CHOLMOD.lowrankdowndate!
3612
SparseArrays.CHOLMOD.lowrankupdowndate!
13+
SparseArrays.CHOLMOD.ldlt
14+
SparseArrays.SPQR.qr
15+
SparseArrays.UMFPACK.lu
3716
```
3817

3918
```@meta

0 commit comments

Comments
 (0)