Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ jobs:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
aqua:
name: Aqua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/cache@v3
- run: |
julia --color=yes -e '
using Pkg
Pkg.activate(temp = true)
Pkg.develop(PackageSpec(path = pwd()))
Pkg.add(name = "Aqua", version = "0.8")
using Aqua, SuiteSparseGraphBLAS
# ambiguities: ~190 pre-existing.
Aqua.test_all(SuiteSparseGraphBLAS; ambiguities = false)'
docs:
name: Documentation
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Blobs = "1"
ChainRulesCore = "1"
KLU = "0.6"
Libdl = "1"
LinearAlgebra = "1"
MacroTools = "0.5"
Preferences = "1"
SSGraphBLAS_jll = "10.5"
Random = "1"
Serialization = "1"
SparseArrays = "1"
SpecialFunctions = "2"
SSGraphBLAS_jll = "10.5"
StorageOrders = "0.3.2"
SuiteSparse = "1"
julia = "1.10"
3 changes: 1 addition & 2 deletions src/SuiteSparseGraphBLAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ include("solvers/klu.jl")
include("solvers/umfpack.jl")
include("solvers/cholmod.jl")

export SparseArrayCompat
export LibGraphBLAS
# export UnaryOps, BinaryOps, Monoids, Semirings #Submodules
export unaryop, binaryop, Monoid, semiring #UDFs
Expand All @@ -131,7 +130,7 @@ export firsti, firstj, secondi, secondj
#SelectOps not found in Julia/stdlibs
export offdiag

export extract, extract!, subassign!, assign!, hvcat! #array functions
export extract, extract!, subassign!, assign! #array functions

#operations
export select, select!, eadd, eadd!, emul, emul!, gbtranspose, gbtranspose!,
Expand Down
4 changes: 2 additions & 2 deletions src/operators/binaryops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ using ..SuiteSparseGraphBLAS: isGxB, isGrB, TypedBinaryOperator, GBType,
valid_vec, juliaop, gbtype, symtotype, Itypes, Ftypes, Ztypes, FZtypes, Rtypes, optype,
Ntypes, Ttypes, suffix, valid_union, GBArrayOrTranspose, binaryop
using ..LibGraphBLAS
export BinaryOp, binaryop
export binaryop

export second, rminus, iseq, isne, isgt, islt, isge, isle, ∨, ∧, lxor, xnor, fmod,
export second, rminus, iseq, isne, isgt, islt, isge, isle, ∨, ∧, lxor, xnor,
bxnor, bget, bset, bclr, firsti0, firsti, firstj0, firstj, secondi0, secondi, secondj0,
secondj, pair

Expand Down
12 changes: 7 additions & 5 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,15 @@ StorageOrders.comptime_storageorder(::AbstractGBArray{<:Any, <:Any, O}) where O
defaultfill(::Type{T}) where {Te, T <: GBVecOrMat{Te}} = defaultfill(Te)
defaultfill(::Type{T}) where {Te, Tf, T <: GBVecOrMat{Te, Tf}} = defaultfill(Tf)

defaultfill(::Type{T}) where T = zero(T)
defaultfill(::Type{Nothing}) = nothing
defaultfill(::Type{Missing}) = missing
# Union{T, Nothing} and Union{T, Missing} default to zero(T) rather than nothing/missing.
# This is bold, I'm not sure if I like it...
# It boils down to whether we want numeric sparse arrays to be default
# or for graph sparse arrays to be default.
# I don't think it is onerous for graph algorithm writers to say `GBMatrix{Int64, Nothing}`,
# and provides better defaults for other users.
defaultfill(::Type{Union{T, Nothing}}) where T = T
defaultfill(::Type{Union{T, Missing}}) where T = T
function defaultfill(::Type{T}) where T
S = nonmissingtype(Base.nonnothingtype(T))
return S === T ? zero(T) : defaultfill(S)
end
defaultfill(::Type{Nothing}) = nothing
defaultfill(::Type{Missing}) = missing
Loading