Skip to content

Commit ecd9b29

Browse files
mtfishmangithub-actions[bot]
authored andcommitted
Format .jl files (ITensorFormatter)
1 parent 90f43bb commit ecd9b29

11 files changed

Lines changed: 34 additions & 24 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ITensorBase"
22
uuid = "4795dd04-0d67-49bb-8f44-b89c448a1dc7"
3-
version = "0.5.2"
3+
version = "0.5.3"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[workspace]

benchmark/benchmarks.jl

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

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

docs/make.jl

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

44
DocMeta.setdocmeta!(ITensorBase, :DocTestSetup, :(using ITensorBase); recursive = true)
55

@@ -12,9 +12,13 @@ makedocs(;
1212
format = Documenter.HTML(;
1313
canonical = "https://itensor.github.io/ITensorBase.jl",
1414
edit_link = "main",
15-
assets = ["assets/favicon.ico", "assets/extras.css"],
15+
assets = ["assets/favicon.ico", "assets/extras.css"]
1616
),
17-
pages = ["Home" => "index.md", "Reference" => "reference.md"],
17+
pages = ["Home" => "index.md", "Reference" => "reference.md"]
1818
)
1919

20-
deploydocs(; repo = "github.com/ITensor/ITensorBase.jl", devbranch = "main", push_preview = true)
20+
deploydocs(;
21+
repo = "github.com/ITensor/ITensorBase.jl",
22+
devbranch = "main",
23+
push_preview = true
24+
)

docs/make_index.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using Literate: Literate
21
using ITensorBase: ITensorBase
2+
using Literate: Literate
33

44
function ccq_logo(content)
55
include_ccq_logo = """
@@ -17,5 +17,5 @@ Literate.markdown(
1717
joinpath(pkgdir(ITensorBase), "docs", "src");
1818
flavor = Literate.DocumenterFlavor(),
1919
name = "index",
20-
postprocess = ccq_logo,
20+
postprocess = ccq_logo
2121
)

docs/make_readme.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using Literate: Literate
21
using ITensorBase: ITensorBase
2+
using Literate: Literate
33

44
function ccq_logo(content)
55
include_ccq_logo = """
@@ -17,5 +17,5 @@ Literate.markdown(
1717
joinpath(pkgdir(ITensorBase));
1818
flavor = Literate.CommonMarkFlavor(),
1919
name = "README",
20-
postprocess = ccq_logo,
20+
postprocess = ccq_logo
2121
)

src/abstractitensor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Base.ndims(::Type{<:AbstractITensor}) = Any
99

1010
struct ITensor <: AbstractITensor
1111
denamed::AbstractArray
12-
dimnames
12+
dimnames::Any
1313
function ITensor(denamed::AbstractArray, dimnames)
1414
ndims(denamed) == length(dimnames) ||
1515
throw(ArgumentError("Number of named dims must match ndims."))

src/index.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct IndexName <: AbstractName
1919
end
2020
function IndexName(
2121
rng::AbstractRNG = Random.default_rng(); id::UInt64 = rand(rng, UInt64),
22-
tags = Dict{String, String}(), plev::Int = 0,
22+
tags = Dict{String, String}(), plev::Int = 0
2323
)
2424
return IndexName(id, Dict{String, String}(tags), plev)
2525
end

src/quirks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function translate_factorize_kwargs(;
1616
ortho = nothing,
1717
cutoff = nothing,
1818
maxdim = nothing,
19-
kwargs...,
19+
kwargs...
2020
)
2121
orth = Symbol(@something orth ortho :left)
2222
rtol = @something rtol cutoff Some(nothing)
@@ -34,6 +34,6 @@ function TensorAlgebra.factorize(a::AbstractITensor, codomain_inds, domain_inds;
3434
a,
3535
codomain_inds,
3636
domain_inds;
37-
translate_factorize_kwargs(; kwargs...)...,
37+
translate_factorize_kwargs(; kwargs...)...
3838
)
3939
end

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,5 +1,5 @@
1-
using ITensorBase: ITensorBase
21
using Aqua: Aqua
2+
using ITensorBase: ITensorBase
33
using Test: @testset
44

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

0 commit comments

Comments
 (0)