Skip to content

Commit c29b466

Browse files
Automatic ITensorFormatter run (#28)
Co-authored-by: mtfishman <7855256+mtfishman@users.noreply.github.com>
1 parent 84e58bc commit c29b466

9 files changed

Lines changed: 29 additions & 38 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "UnallocatedArrays"
22
uuid = "43c9e47c-e622-40fb-bf18-a09fc8c466b6"
3+
version = "0.1.10"
34
authors = ["ITensor developers <support@itensor.org> and contributors"]
4-
version = "0.1.9"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

benchmark/benchmarks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using UnallocatedArrays
21
using BenchmarkTools
2+
using UnallocatedArrays
33

44
SUITE = BenchmarkGroup()
55
SUITE["rand"] = @benchmarkable rand(10)

docs/make.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using UnallocatedArrays: UnallocatedArrays
21
using Documenter: Documenter, DocMeta, deploydocs, makedocs
2+
using UnallocatedArrays: UnallocatedArrays
33

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

2222
deploydocs(;
23-
repo = "github.com/ITensor/UnallocatedArrays.jl", devbranch = "main", push_preview = true
23+
repo = "github.com/ITensor/UnallocatedArrays.jl", devbranch = "main",
24+
push_preview = true
2425
)

docs/make_index.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Literate.markdown(
1717
joinpath(pkgdir(UnallocatedArrays), "docs", "src");
1818
flavor = Literate.DocumenterFlavor(),
1919
name = "index",
20-
postprocess = ccq_logo,
20+
postprocess = ccq_logo
2121
)

docs/make_readme.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Literate.markdown(
1717
joinpath(pkgdir(UnallocatedArrays));
1818
flavor = Literate.CommonMarkFlavor(),
1919
name = "README",
20-
postprocess = ccq_logo,
20+
postprocess = ccq_logo
2121
)

src/UnallocatedArrays.jl

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11
module UnallocatedArrays
22

3-
using TypeParameterAccessors:
4-
TypeParameterAccessors,
5-
Position,
6-
set_eltype,
7-
set_ndims,
8-
set_type_parameters,
9-
type_parameters
10-
using FillArrays:
11-
AbstractFill,
12-
FillArrays,
13-
AbstractZeros,
14-
Fill,
15-
Zeros,
16-
broadcasted_fill,
17-
broadcasted_zeros,
18-
getindex_value,
19-
kron_fill,
20-
kron_zeros,
21-
mult_zeros,
22-
mult_fill
23-
using UnspecifiedTypes: UnspecifiedArray, UnspecifiedNumber, UnspecifiedZero
243
using Adapt: adapt
4+
using FillArrays: FillArrays, AbstractFill, AbstractZeros, Fill, Zeros, broadcasted_fill,
5+
broadcasted_zeros, getindex_value, kron_fill, kron_zeros, mult_fill, mult_zeros
6+
using TypeParameterAccessors: TypeParameterAccessors, Position, set_eltype, set_ndims,
7+
set_type_parameters, type_parameters
8+
using UnspecifiedTypes: UnspecifiedArray, UnspecifiedNumber, UnspecifiedZero
259

2610
include("abstractfill/abstractfill.jl")
2711

test/runtests.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ const GROUP = uppercase(
1010
get(ENV, "GROUP", "ALL")
1111
else
1212
only(match(pat, ARGS[arg_id]).captures)
13-
end,
13+
end
1414
)
1515

16-
"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
16+
"""
17+
match files of the form `test_*.jl`, but exclude `*setup*.jl`
18+
"""
1719
function istestfile(fn)
18-
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
20+
return endswith(fn, ".jl") && startswith(basename(fn), "test_") &&
21+
!contains(fn, "setup")
1922
end
20-
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`"
23+
"""
24+
match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`
25+
"""
2126
function isexamplefile(fn)
2227
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
2328
end
@@ -26,7 +31,8 @@ end
2631
# tests in groups based on folder structure
2732
for testgroup in filter(isdir, readdir(@__DIR__))
2833
if GROUP == "ALL" || GROUP == uppercase(testgroup)
29-
for file in filter(istestfile, readdir(joinpath(@__DIR__, testgroup); join = true))
34+
for file in
35+
filter(istestfile, readdir(joinpath(@__DIR__, testgroup); join = true))
3036
@eval @safetestset $file begin
3137
include($file)
3238
end
@@ -55,7 +61,7 @@ end
5561
:macrocall,
5662
GlobalRef(Suppressor, Symbol("@suppress")),
5763
LineNumberNode(@__LINE__, @__FILE__),
58-
:(include($filename)),
64+
:(include($filename))
5965
)
6066
)
6167
end

test/test_aqua.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using UnallocatedArrays: UnallocatedArrays
21
using Aqua: Aqua
32
using Test: @testset
3+
using UnallocatedArrays: UnallocatedArrays
44

55
@testset "Code quality (Aqua.jl)" begin
66
Aqua.test_all(UnallocatedArrays)

test/test_defaults.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
## seperate test file, and maybe make a package extension?
33
@eval module $(gensym())
44
using FillArrays: Fill, Zeros
5-
using UnallocatedArrays: UnallocatedFill, UnallocatedZeros
5+
using Test: @test, @testset
66
using TypeParameterAccessors:
77
Position, default_type_parameters, nparameters, set_type_parameters, type_parameters
8-
using Test: @test, @testset
8+
using UnallocatedArrays: UnallocatedFill, UnallocatedZeros
99

1010
#@testset "SetParameters" begin
1111
@testset "Testing $typ" for typ in (Fill, Zeros)

0 commit comments

Comments
 (0)