From a7af6dd28202a1386a754ef4d261619c832ec5ab Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Fri, 25 Oct 2024 22:37:18 +0900 Subject: [PATCH] add deprecated file --- src/HierarchicalEOM.jl | 4 ++-- src/deprecated.jl | 23 +++++++++++++++++++++++ src/evolution.jl | 3 --- src/steadystate.jl | 3 --- 4 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 src/deprecated.jl diff --git a/src/HierarchicalEOM.jl b/src/HierarchicalEOM.jl index 781d9734..71dd9070 100644 --- a/src/HierarchicalEOM.jl +++ b/src/HierarchicalEOM.jl @@ -138,8 +138,6 @@ module HeomAPI addTerminator, TimeEvolutionHEOMSol, HEOMsolve, - evolution, # has been deprecated, throws error only - SteadyState, # has been deprecated, throws error only PowerSpectrum, DensityOfStates @@ -161,4 +159,6 @@ module HeomAPI end @reexport using .HeomAPI +include("deprecated.jl") + end diff --git a/src/deprecated.jl b/src/deprecated.jl new file mode 100644 index 00000000..ea9a2d77 --- /dev/null +++ b/src/deprecated.jl @@ -0,0 +1,23 @@ +#= +This file gathers all the deprecated names (structures, functions, or variables) which will be removed in the future major release. + +- Before the major release, the deprecated names will just throw errors when they are called. +- If the deprecated names were once exported, we will still export them here until next major release. +- If we decide to push a major release, cleanup this file. + +Example: + +export deprecated_foo + +function deprecated_foo(args...; kwargs...) + error("`deprecated_foo` has been deprecated and will be removed in next major release, please use `new_foo` instead.") +end +=# + +export evolution, SteadyState + +SteadyState(args...; kwargs...) = + error("`SteadyState` has been deprecated, please use `steadystate` instead.") + +evolution(args...; kwargs...) = + error("`evolution` has been deprecated, please use `HEOMsolve` instead.") \ No newline at end of file diff --git a/src/evolution.jl b/src/evolution.jl index 8bea5df5..6675867f 100644 --- a/src/evolution.jl +++ b/src/evolution.jl @@ -1,6 +1,3 @@ -evolution(M::AbstractHEOMLSMatrix, args...; kwargs...) = - error("`evolution` has been deprecated, please use `HEOMsolve` instead.") - const DEFAULT_ODE_SOLVER_OPTIONS = (abstol = 1e-8, reltol = 1e-6, save_everystep = false, save_end = true) @doc raw""" diff --git a/src/steadystate.jl b/src/steadystate.jl index 311acb9f..c934ddc5 100644 --- a/src/steadystate.jl +++ b/src/steadystate.jl @@ -1,6 +1,3 @@ -SteadyState(M::AbstractHEOMLSMatrix, args...; kwargs...) = - error("`SteadyState` has been deprecated, please use `steadystate` instead.") - @doc raw""" steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...) Solve the steady state of the auxiliary density operators based on `LinearSolve.jl` (i.e., solving ``x`` where ``A \times x = b``).