From 2f2f986c767e631b951fde5a74c81e05cbf16ec2 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Sun, 26 Oct 2025 14:59:42 +0800 Subject: [PATCH 1/2] improve code quality --- .github/workflows/Code-Quality.yml | 1 + src/evolution.jl | 17 ++++++++++------- test/code-quality/code_quality.jl | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Code-Quality.yml b/.github/workflows/Code-Quality.yml index aa49f776..e766b8bc 100644 --- a/.github/workflows/Code-Quality.yml +++ b/.github/workflows/Code-Quality.yml @@ -38,6 +38,7 @@ jobs: matrix: julia-version: - 'lts' + - '1' os: - 'ubuntu-latest' arch: diff --git a/src/evolution.jl b/src/evolution.jl index 4fe5118a..c3fa5f19 100644 --- a/src/evolution.jl +++ b/src/evolution.jl @@ -18,10 +18,13 @@ A structure storing the results and some information from solving time evolution - `reltol::Real`: The relative tolerance which is used during the solving process. """ struct TimeEvolutionHEOMSol{ - TT1<:Vector{<:Real}, - TT2<:Vector{<:Real}, + TT1<:AbstractVector{<:Real}, + TT2<:AbstractVector{<:Real}, TS<:Vector{ADOs}, - TE<:Union{Nothing,Matrix{ComplexF64}}, + TE<:Union{Nothing,AbstractMatrix}, + RETT<:Enum, + AlgT<:Union{Nothing,OrdinaryDiffEqAlgorithm}, + TolT<:Real, } Btier::Int Ftier::Int @@ -29,10 +32,10 @@ struct TimeEvolutionHEOMSol{ times_ados::TT2 ados::TS expect::TE - retcode::Union{Nothing,Enum} - alg::Union{Nothing,OrdinaryDiffEqAlgorithm} - abstol::Union{Nothing,Real} - reltol::Union{Nothing,Real} + retcode::RETT + alg::AlgT + abstol::TolT + reltol::TolT end function Base.show(io::IO, sol::TimeEvolutionHEOMSol) diff --git a/test/code-quality/code_quality.jl b/test/code-quality/code_quality.jl index 55a9c21b..233cbfb6 100644 --- a/test/code-quality/code_quality.jl +++ b/test/code-quality/code_quality.jl @@ -1,6 +1,6 @@ @testset "Code quality" verbose = true begin @testset "Aqua.jl" begin - Aqua.test_all(HierarchicalEOM; ambiguities = false) + Aqua.test_all(HierarchicalEOM; ambiguities = false, unbound_args = false) end @testset "JET.jl" begin From 39f6b405f9cb9b3d28fe33acf52cdbb0e20ded24 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Sun, 26 Oct 2025 15:06:07 +0800 Subject: [PATCH 2/2] fix typo --- src/evolution.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evolution.jl b/src/evolution.jl index c3fa5f19..23031348 100644 --- a/src/evolution.jl +++ b/src/evolution.jl @@ -22,9 +22,9 @@ struct TimeEvolutionHEOMSol{ TT2<:AbstractVector{<:Real}, TS<:Vector{ADOs}, TE<:Union{Nothing,AbstractMatrix}, - RETT<:Enum, + RETT<:Union{Nothing,Enum}, AlgT<:Union{Nothing,OrdinaryDiffEqAlgorithm}, - TolT<:Real, + TolT<:Union{Nothing,Real}, } Btier::Int Ftier::Int