From cee2ce833ef5c694d42d7e75d3e2b00e178c7ce0 Mon Sep 17 00:00:00 2001 From: Huo Chen Date: Thu, 25 Mar 2021 10:15:53 -0700 Subject: [PATCH] Fix julia 1.6 test failure (#57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✅ fix display test failures * 🔖bump version 0.6.3 --- .github/workflows/ci.yml | 2 +- Project.toml | 4 ++-- test/utilities/display.jl | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 013e452..4273965 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: - - '1.4' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. + - '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. os: - ubuntu-latest diff --git a/Project.toml b/Project.toml index a177c2e..c4a18bc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OpenQuantumBase" uuid = "5dd19120-8766-11e9-1ef9-27094038a7db" authors = ["neversakura "] -version = "0.6.2" +version = "0.6.3" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" @@ -24,7 +24,7 @@ QuadGK = "2.4" SpecialFunctions = "0.8, 0.9, 0.10, 1.0" StaticArrays = "0.11, 0.12, 1.0" StatsBase = "0.30, 0.31, 0.32, 0.33" -julia = "1.4" +julia = "1.6" [extras] Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" diff --git a/test/utilities/display.jl b/test/utilities/display.jl index 5ae28a4..cec743c 100644 --- a/test/utilities/display.jl +++ b/test/utilities/display.jl @@ -10,14 +10,14 @@ u = [1.0 + 0.0im, 1] / sqrt(2) ρ = u * u' H = DenseHamiltonian([A, B], [σx, σz]) -@test replstr(H) == "\e[36mDenseHamiltonian\e[0m with \e[36mComplex{Float64}\e[0m\nwith size: (2, 2)" +@test replstr(H) == "\e[36mDenseHamiltonian\e[0m with \e[36mComplexF64\e[0m\nwith size: (2, 2)" annealing = Annealing(H, u) -@test replstr(annealing) == "\e[36mAnnealing\e[0m with \e[36mOpenQuantumBase.DenseHamiltonian{Complex{Float64}}\e[0m and u0 \e[36mArray{Complex{Float64},1}\e[0m\nu0 size: (2,)" +@test replstr(annealing) == "\e[36mAnnealing\e[0m with \e[36mOpenQuantumBase.DenseHamiltonian{ComplexF64}\e[0m and u0 \e[36mVector{ComplexF64}\e[0m\nu0 size: (2,)" coupling = ConstantCouplings(["Z"]) -@test replstr(coupling) == "\e[36mConstantCouplings\e[0m with \e[36mComplex{Float64}\e[0m\nand string representation: [\"Z\"]" -@test replstr(ConstantCouplings([σz])) == "\e[36mConstantCouplings\e[0m with \e[36mComplex{Float64}\e[0m\nand string representation: nothing" +@test replstr(coupling) == "\e[36mConstantCouplings\e[0m with \e[36mComplexF64\e[0m\nand string representation: [\"Z\"]" +@test replstr(ConstantCouplings([σz])) == "\e[36mConstantCouplings\e[0m with \e[36mComplexF64\e[0m\nand string representation: nothing" η = 0.01; W = 5; fc = 4; T = 12.5 @test replstr(HybridOhmic(W, η, fc, T)) == "Hybrid Ohmic bath instance:\nW (mK): 5.0\nϵl (GHz): 0.02083661222512523\nη (unitless): 0.01\nωc (GHz): 4.0\nT (mK): 12.5" @@ -27,10 +27,10 @@ bath = Ohmic(η, ωc, T) @test replstr(bath) == "Ohmic bath instance:\nη (unitless): 0.0001\nωc (GHz): 4.0\nT (mK): 12.0" interaction = Interaction(coupling, bath) -@test replstr(interaction) == "\e[36mInteraction\e[0m with \e[36mConstantCouplings\e[0m with \e[36mComplex{Float64}\e[0m\nand string representation: [\"Z\"]\nand bath: OpenQuantumBase.OhmicBath(0.0001, 25.132741228718345, 0.6365195925819416)" +@test replstr(interaction) == "\e[36mInteraction\e[0m with \e[36mConstantCouplings\e[0m with \e[36mComplexF64\e[0m\nand string representation: [\"Z\"]\nand bath: OpenQuantumBase.OhmicBath(0.0001, 25.132741228718345, 0.6365195925819416)" iset = InteractionSet(interaction) @test replstr(iset) == "\e[36mInteractionSet\e[0m with 1 interactions" H = SparseHamiltonian([A, B], [spσx, spσz]) -@test replstr(H) == "\e[36mSparseHamiltonian\e[0m with \e[36mComplex{Float64}\e[0m\nwith size: (2, 2)" \ No newline at end of file +@test replstr(H) == "\e[36mSparseHamiltonian\e[0m with \e[36mComplexF64\e[0m\nwith size: (2, 2)" \ No newline at end of file