Skip to content

Commit 6f6ea90

Browse files
committed
Remove module based plan savign/loading
1 parent 6f19889 commit 6f6ea90

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/RecoPlans/Serialization.jl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
export plandir, planpath
2-
function plandir(m::Module)
3-
if m != AbstractImageReconstruction && hasproperty(m, :plandir)
4-
return getproperty(m, :plandir)()
5-
else
6-
return @get_scratch!(string(m))
7-
end
8-
end
9-
function planpath(m::Module, name::AbstractString)
10-
if m != AbstractImageReconstruction && hasproperty(m, :planpath)
11-
return getproperty(m, :planpath)(name)
12-
else
13-
return joinpath(plandir(m), string(name, ".toml"))
14-
end
15-
end
16-
171
export savePlan
182
"""
193
savePlan(file::Union{AbstractString, IO}, plan::RecoPlan)
@@ -22,7 +6,6 @@ Save the `plan` to the `file` in TOML format.
226
See also `loadPlan`, `toTOML`, `toDict`.
237
"""
248
savePlan(file::Union{AbstractString, IO}, plan::RecoPlan) = toTOML(file, plan)
25-
savePlan(m::Module, planname::AbstractString, plan::RecoPlan) = savePlan(planpath(m, planname), plan)
269

2710
toDictModule(plan::RecoPlan{T}) where {T} = parentmodule(T)
2811
toDictType(plan::RecoPlan{T}) where {T} = RecoPlan{getfield(parentmodule(T), nameof(T))}
@@ -52,7 +35,6 @@ function toDictValue!(dict, value::RecoPlan)
5235
end
5336

5437
export loadPlan
55-
loadPlan(m::Module, name::AbstractString, modules::Vector{Module}) = loadPlan(planpath(m, name), modules)
5638
"""
5739
loadPlan(filename::Union{AbstractString, IO}, modules::Vector{Module})
5840

0 commit comments

Comments
 (0)