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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UnallocatedArrays"
uuid = "43c9e47c-e622-40fb-bf18-a09fc8c466b6"
version = "0.1.10"
authors = ["ITensor developers <support@itensor.org> and contributors"]
version = "0.1.9"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using UnallocatedArrays
using BenchmarkTools
using UnallocatedArrays

SUITE = BenchmarkGroup()
SUITE["rand"] = @benchmarkable rand(10)
Expand Down
9 changes: 5 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using UnallocatedArrays: UnallocatedArrays
using Documenter: Documenter, DocMeta, deploydocs, makedocs
using UnallocatedArrays: UnallocatedArrays

DocMeta.setdocmeta!(
UnallocatedArrays, :DocTestSetup, :(using UnallocatedArrays); recursive = true
Expand All @@ -14,11 +14,12 @@ makedocs(;
format = Documenter.HTML(;
canonical = "https://itensor.github.io/UnallocatedArrays.jl",
edit_link = "main",
assets = ["assets/favicon.ico", "assets/extras.css"],
assets = ["assets/favicon.ico", "assets/extras.css"]
),
pages = ["Home" => "index.md", "Reference" => "reference.md"],
pages = ["Home" => "index.md", "Reference" => "reference.md"]
)

deploydocs(;
repo = "github.com/ITensor/UnallocatedArrays.jl", devbranch = "main", push_preview = true
repo = "github.com/ITensor/UnallocatedArrays.jl", devbranch = "main",
push_preview = true
)
2 changes: 1 addition & 1 deletion docs/make_index.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Literate.markdown(
joinpath(pkgdir(UnallocatedArrays), "docs", "src");
flavor = Literate.DocumenterFlavor(),
name = "index",
postprocess = ccq_logo,
postprocess = ccq_logo
)
2 changes: 1 addition & 1 deletion docs/make_readme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Literate.markdown(
joinpath(pkgdir(UnallocatedArrays));
flavor = Literate.CommonMarkFlavor(),
name = "README",
postprocess = ccq_logo,
postprocess = ccq_logo
)
26 changes: 5 additions & 21 deletions src/UnallocatedArrays.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
module UnallocatedArrays

using TypeParameterAccessors:
TypeParameterAccessors,
Position,
set_eltype,
set_ndims,
set_type_parameters,
type_parameters
using FillArrays:
AbstractFill,
FillArrays,
AbstractZeros,
Fill,
Zeros,
broadcasted_fill,
broadcasted_zeros,
getindex_value,
kron_fill,
kron_zeros,
mult_zeros,
mult_fill
using UnspecifiedTypes: UnspecifiedArray, UnspecifiedNumber, UnspecifiedZero
using Adapt: adapt
using FillArrays: FillArrays, AbstractFill, AbstractZeros, Fill, Zeros, broadcasted_fill,
broadcasted_zeros, getindex_value, kron_fill, kron_zeros, mult_fill, mult_zeros
using TypeParameterAccessors: TypeParameterAccessors, Position, set_eltype, set_ndims,
set_type_parameters, type_parameters
using UnspecifiedTypes: UnspecifiedArray, UnspecifiedNumber, UnspecifiedZero

include("abstractfill/abstractfill.jl")

Expand Down
18 changes: 12 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ const GROUP = uppercase(
get(ENV, "GROUP", "ALL")
else
only(match(pat, ARGS[arg_id]).captures)
end,
end
)

"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
"""
match files of the form `test_*.jl`, but exclude `*setup*.jl`
"""
function istestfile(fn)
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
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`"
"""
match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`
"""
function isexamplefile(fn)
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
end
Expand All @@ -26,7 +31,8 @@ end
# tests in groups based on folder structure
for testgroup in filter(isdir, readdir(@__DIR__))
if GROUP == "ALL" || GROUP == uppercase(testgroup)
for file in filter(istestfile, readdir(joinpath(@__DIR__, testgroup); join = true))
for file in
filter(istestfile, readdir(joinpath(@__DIR__, testgroup); join = true))
@eval @safetestset $file begin
include($file)
end
Expand Down Expand Up @@ -55,7 +61,7 @@ end
:macrocall,
GlobalRef(Suppressor, Symbol("@suppress")),
LineNumberNode(@__LINE__, @__FILE__),
:(include($filename)),
:(include($filename))
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnallocatedArrays: UnallocatedArrays
using Aqua: Aqua
using Test: @testset
using UnallocatedArrays: UnallocatedArrays

@testset "Code quality (Aqua.jl)" begin
Aqua.test_all(UnallocatedArrays)
Expand Down
4 changes: 2 additions & 2 deletions test/test_defaults.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
## seperate test file, and maybe make a package extension?
@eval module $(gensym())
using FillArrays: Fill, Zeros
using UnallocatedArrays: UnallocatedFill, UnallocatedZeros
using Test: @test, @testset
using TypeParameterAccessors:
Position, default_type_parameters, nparameters, set_type_parameters, type_parameters
using Test: @test, @testset
using UnallocatedArrays: UnallocatedFill, UnallocatedZeros

#@testset "SetParameters" begin
@testset "Testing $typ" for typ in (Fill, Zeros)
Expand Down
Loading