From 406f9c0d5bcd94ae544982c6acba068ed3d9fd85 Mon Sep 17 00:00:00 2001 From: mtfishman <7855256+mtfishman@users.noreply.github.com> Date: Sat, 14 Feb 2026 02:34:12 +0000 Subject: [PATCH] Format .jl files (ITensorFormatter) --- Project.toml | 2 +- benchmark/benchmarks.jl | 2 +- docs/make.jl | 9 +++++---- docs/make_index.jl | 2 +- docs/make_readme.jl | 2 +- src/UnallocatedArrays.jl | 26 +++++--------------------- test/runtests.jl | 18 ++++++++++++------ test/test_aqua.jl | 2 +- test/test_defaults.jl | 4 ++-- 9 files changed, 29 insertions(+), 38 deletions(-) diff --git a/Project.toml b/Project.toml index 650c45c..5f8aa43 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "UnallocatedArrays" uuid = "43c9e47c-e622-40fb-bf18-a09fc8c466b6" +version = "0.1.10" authors = ["ITensor developers and contributors"] -version = "0.1.9" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 22ef2c3..197ab83 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -1,5 +1,5 @@ -using UnallocatedArrays using BenchmarkTools +using UnallocatedArrays SUITE = BenchmarkGroup() SUITE["rand"] = @benchmarkable rand(10) diff --git a/docs/make.jl b/docs/make.jl index 279d5eb..370d2fe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,5 @@ -using UnallocatedArrays: UnallocatedArrays using Documenter: Documenter, DocMeta, deploydocs, makedocs +using UnallocatedArrays: UnallocatedArrays DocMeta.setdocmeta!( UnallocatedArrays, :DocTestSetup, :(using UnallocatedArrays); recursive = true @@ -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 ) diff --git a/docs/make_index.jl b/docs/make_index.jl index 0a99537..f6ee8cd 100644 --- a/docs/make_index.jl +++ b/docs/make_index.jl @@ -17,5 +17,5 @@ Literate.markdown( joinpath(pkgdir(UnallocatedArrays), "docs", "src"); flavor = Literate.DocumenterFlavor(), name = "index", - postprocess = ccq_logo, + postprocess = ccq_logo ) diff --git a/docs/make_readme.jl b/docs/make_readme.jl index 1e720a0..ef5e2f3 100644 --- a/docs/make_readme.jl +++ b/docs/make_readme.jl @@ -17,5 +17,5 @@ Literate.markdown( joinpath(pkgdir(UnallocatedArrays)); flavor = Literate.CommonMarkFlavor(), name = "README", - postprocess = ccq_logo, + postprocess = ccq_logo ) diff --git a/src/UnallocatedArrays.jl b/src/UnallocatedArrays.jl index 4f3db4e..d57607e 100644 --- a/src/UnallocatedArrays.jl +++ b/src/UnallocatedArrays.jl @@ -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") diff --git a/test/runtests.jl b/test/runtests.jl index 39c332d..9786268 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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 @@ -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 @@ -55,7 +61,7 @@ end :macrocall, GlobalRef(Suppressor, Symbol("@suppress")), LineNumberNode(@__LINE__, @__FILE__), - :(include($filename)), + :(include($filename)) ) ) end diff --git a/test/test_aqua.jl b/test/test_aqua.jl index ff232fb..dfae2f2 100644 --- a/test/test_aqua.jl +++ b/test/test_aqua.jl @@ -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) diff --git a/test/test_defaults.jl b/test/test_defaults.jl index 537dcd1..b4a71cd 100644 --- a/test/test_defaults.jl +++ b/test/test_defaults.jl @@ -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)