Skip to content
Closed
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "SparseArraysBase"
uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208"
version = "0.9.20"
version = "0.9.21"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[deps]
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ITensorFormatter = "b6bf39f1-c9d3-4bad-aad8-593d802f65fd"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
SparseArraysBase = "0d5efcca-f356-4864-8770-e1ed8d78f208"

Expand All @@ -10,5 +11,6 @@ path = ".."
[compat]
Dictionaries = "0.4.4"
Documenter = "1.8.1"
ITensorFormatter = "0.2.27"
Literate = "2.20.1"
SparseArraysBase = "0.9"
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Documenter: Documenter, DocMeta, deploydocs, makedocs
using ITensorFormatter: ITensorFormatter
using SparseArraysBase: SparseArraysBase

DocMeta.setdocmeta!(
SparseArraysBase, :DocTestSetup, :(using SparseArraysBase); recursive = true
)

include("make_index.jl")
ITensorFormatter.make_index!(pkgdir(SparseArraysBase))

makedocs(;
modules = [SparseArraysBase],
Expand Down
21 changes: 0 additions & 21 deletions docs/make_index.jl

This file was deleted.

17 changes: 0 additions & 17 deletions docs/make_readme.jl

This file was deleted.

2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
FunctionImplementations = "7c7cc465-9c6a-495f-bdd1-f42428e86d0c"
ITensorPkgSkeleton = "3d388ab1-018a-49f4-ae50-18094d5f71ea"
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NamedDimsArrays = "60cbd0c0-df58-4cb7-918c-6f5607b73fde"
Expand All @@ -27,6 +28,7 @@ ArrayLayouts = "1.11.1"
Dictionaries = "0.4.4"
FillArrays = "1.13"
FunctionImplementations = "0.4"
ITensorPkgSkeleton = "0.3.40"
JLArrays = "0.2, 0.3"
LinearAlgebra = "<0.0.1, 1"
NamedDimsArrays = "0.13, 0.14"
Expand Down
76 changes: 2 additions & 74 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
using SafeTestsets: @safetestset
using Suppressor: Suppressor
using ITensorPkgSkeleton: ITensorPkgSkeleton

# check for filtered groups
# either via `--group=ALL` or through ENV["GROUP"]
const pat = r"(?:--group=)(\w+)"
arg_id = findfirst(contains(pat), ARGS)
const GROUP = uppercase(
if isnothing(arg_id)
arg = get(ENV, "GROUP", "ALL")
# For some reason `ENV["GROUP"]` is set to `""`
# when running via GitHub Actions, so handle that case:
arg == "" ? "ALL" : arg
else
only(match(pat, ARGS[arg_id]).captures)
end
)

"""
match files of the form `test_*.jl`, but exclude `*setup*.jl`
"""
function istestfile(path)
fn = basename(path)
return endswith(fn, ".jl") && startswith(basename(fn), "test_") &&
!contains(fn, "setup")
end
"""
match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`
"""
function isexamplefile(path)
fn = basename(path)
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
end

@time begin
# tests in groups based on folder structure
for testgroup in filter(isdir, readdir(@__DIR__; join = true))
if GROUP == "ALL" || GROUP == uppercase(basename(testgroup))
for filename in filter(istestfile, readdir(testgroup; join = true))
@eval @safetestset $(basename(filename)) begin
include($filename)
end
end
end
end

# single files in top folder
for file in filter(istestfile, readdir(@__DIR__; join = true))
(basename(file) == basename(@__FILE__)) && continue # exclude this file to avoid infinite recursion
@eval @safetestset $(basename(file)) begin
include($file)
end
end

# test examples
examplepath = joinpath(@__DIR__, "..", "examples")
for (root, _, files) in walkdir(examplepath)
contains(chopprefix(root, @__DIR__), "setup") && continue
for file in filter(isexamplefile, files)
filename = joinpath(root, file)
@eval begin
@safetestset $file begin
$(
Expr(
:macrocall,
GlobalRef(Suppressor, Symbol("@suppress")),
LineNumberNode(@__LINE__, @__FILE__),
:(include($filename))
)
)
end
end
end
end
end
ITensorPkgSkeleton.runtests(; testdir = @__DIR__)
Loading