diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1a864275..f38abc10 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -33,7 +33,7 @@ Please give a summary of the tests that you added to verify your changes. # Checklist: -- [ ] My code follows the style guidelines of this project. Please run `using JuliaFormatter; format(".")` in the base directory of the repository (`~/.julia/dev/BlockSparseArrays`) to format your code according to our style guidelines. +- [ ] My code follows the style guidelines of this project. Please run the [ITensorFormatter](https://github.com/ITensor/ITensorFormatter.jl) in the base directory of the repository (`~/.julia/dev/BlockSparseArrays`) to format your code according to our style guidelines. - [ ] I have performed a self-review of my own code. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have added tests that verify the behavior of the changes I made. diff --git a/.gitignore b/.gitignore index 7085ca87..d5d9e4ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,14 @@ -*.jl.*.cov -*.jl.cov -*.jl.mem +*.cov +*.mem *.o *.swp .DS_Store .benchmarkci .tmp .vscode/ -Manifest.toml +LocalPreferences.toml +Manifest*.toml benchmark/*.json dev/ -docs/LocalPreferences.toml -docs/Manifest.toml docs/build/ docs/src/index.md -examples/LocalPreferences.toml -test/LocalPreferences.toml diff --git a/Project.toml b/Project.toml index 0bff8d76..3f550ae4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "BlockSparseArrays" uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4" -version = "0.10.29" +version = "0.10.30" authors = ["ITensor developers and contributors"] [workspace] diff --git a/test/runtests.jl b/test/runtests.jl index 16689fac..e5afded7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,7 +7,10 @@ const pat = r"(?:--group=)(\w+)" arg_id = findfirst(contains(pat), ARGS) const GROUP = uppercase( if isnothing(arg_id) - get(ENV, "GROUP", "ALL") + 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 @@ -16,25 +19,25 @@ const GROUP = uppercase( """ match files of the form `test_*.jl`, but exclude `*setup*.jl` """ -function istestfile(fn) +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(fn) +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__)) - if GROUP == "ALL" || GROUP == uppercase(testgroup) - groupdir = joinpath(@__DIR__, testgroup) - for file in filter(istestfile, readdir(groupdir)) - filename = joinpath(groupdir, file) - @eval @safetestset $file begin + 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 @@ -42,9 +45,9 @@ end end # single files in top folder - for file in filter(istestfile, readdir(@__DIR__)) - (file == basename(@__FILE__)) && continue # exclude this file to avoid infinite recursion - @eval @safetestset $file begin + 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