-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
85 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
name = "UnspecifiedTypes" | ||
uuid = "42b3faec-625b-4613-8ddc-352bf9672b8d" | ||
authors = ["ITensor developers <[email protected]> and contributors"] | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
|
||
[compat] | ||
Aqua = "0.8.9" | ||
Test = "1.10" | ||
julia = "1.10" | ||
|
||
[extras] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Aqua", "Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://ITensor.github.io/UnspecifiedTypes.jl/stable/) | ||
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ITensor.github.io/UnspecifiedTypes.jl/dev/) | ||
[![Build Status](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
[![Build Status](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/Tests.yml?query=branch%3Amain) | ||
[![Coverage](https://codecov.io/gh/ITensor/UnspecifiedTypes.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/UnspecifiedTypes.jl) | ||
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) | ||
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) | ||
|
@@ -19,6 +19,12 @@ julia> using Pkg: Pkg | |
|
||
julia> Pkg.Registry.add(url="https://github.com/ITensor/ITensorRegistry") | ||
``` | ||
or: | ||
```julia | ||
julia> Pkg.Registry.add(url="[email protected]:ITensor/ITensorRegistry.git") | ||
``` | ||
if you want to use SSH credentials, which can make it so you don't have to enter your Github ursername and password when registering packages. | ||
|
||
Then, the package can be added as usual through the package manager: | ||
|
||
```julia | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# | ||
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://ITensor.github.io/UnspecifiedTypes.jl/stable/) | ||
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ITensor.github.io/UnspecifiedTypes.jl/dev/) | ||
# [![Build Status](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
# [![Build Status](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/UnspecifiedTypes.jl/actions/workflows/Tests.yml?query=branch%3Amain) | ||
# [![Coverage](https://codecov.io/gh/ITensor/UnspecifiedTypes.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/UnspecifiedTypes.jl) | ||
# [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) | ||
# [![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) | ||
|
@@ -21,6 +21,14 @@ julia> using Pkg: Pkg | |
julia> Pkg.Registry.add(url="https://github.com/ITensor/ITensorRegistry") | ||
``` | ||
=# | ||
# or: | ||
#= | ||
```julia | ||
julia> Pkg.Registry.add(url="[email protected]:ITensor/ITensorRegistry.git") | ||
``` | ||
=# | ||
# if you want to use SSH credentials, which can make it so you don't have to enter your Github ursername and password when registering packages. | ||
|
||
# Then, the package can be added as usual through the package manager: | ||
|
||
#= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
[deps] | ||
UnspecifiedTypes = "42b3faec-625b-4613-8ddc-352bf9672b8d" | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" | ||
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[compat] | ||
Aqua = "0.8.9" | ||
SafeTestsets = "0.1" | ||
Suppressor = "0.2" | ||
Test = "1.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,61 @@ | ||
@eval module $(gensym()) | ||
using Test: @testset | ||
using SafeTestsets: @safetestset | ||
using Suppressor: Suppressor | ||
|
||
@testset "UnspecifiedTypes.jl" begin | ||
filenames = filter(readdir(@__DIR__)) do f | ||
startswith("test_")(f) && endswith(".jl")(f) | ||
# check for filtered groups | ||
# either via `--group=ALL` or through ENV["GROUP"] | ||
const pat = r"(?:--group=)(\w+)" | ||
arg_id = findfirst(contains(pat), ARGS) | ||
const GROUP = uppercase( | ||
if isnothing(arg_id) | ||
get(ENV, "GROUP", "ALL") | ||
else | ||
only(match(pat, ARGS[arg_id]).captures) | ||
end, | ||
) | ||
|
||
"match files of the form `test_*.jl`, but exclude `*setup*.jl`" | ||
istestfile(fn) = | ||
endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup") | ||
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`" | ||
isexamplefile(fn) = | ||
endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup") | ||
|
||
@time begin | ||
# 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)) | ||
@eval @safetestset $file begin | ||
include($file) | ||
end | ||
end | ||
end | ||
end | ||
@testset "Test $filename" for filename in filenames | ||
include(filename) | ||
|
||
# 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 | ||
include($file) | ||
end | ||
end | ||
end | ||
|
||
# test examples | ||
examplepath = joinpath(@__DIR__, "..", "examples") | ||
for (root, _, files) in walkdir(examplepath) | ||
contains(chopprefix(root, @__DIR__), "setup") && continue | ||
for file in filter(isexamplefile, files) | ||
filename = joinpath(root, file) | ||
@eval begin | ||
@safetestset $file begin | ||
$(Expr( | ||
:macrocall, | ||
GlobalRef(Suppressor, Symbol("@suppress")), | ||
LineNumberNode(@__LINE__, @__FILE__), | ||
:(include($filename)), | ||
)) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
@eval module $(gensym()) | ||
using UnspecifiedTypes: UnspecifiedTypes | ||
using Aqua: Aqua | ||
using Test: @testset | ||
|
||
@testset "Code quality (Aqua.jl)" begin | ||
Aqua.test_all(UnspecifiedTypes) | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.