Skip to content

Commit 3c3a763

Browse files
committed
add loadDFG and docs
1 parent 3793075 commit 3c3a763

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export packVariable, unpackVariable, packFactor, unpackFactor
225225
export rebuildFactorMetadata!
226226

227227
# File import and export
228-
export saveDFG, loadDFG!
228+
export saveDFG, loadDFG!, loadDFG
229229
export toDot, toDotFile
230230

231231
# Comparisons

src/FileDFG/services/FileDFG.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function loadDFG!(dfgLoadInto::AbstractDFG, dst::AbstractString)
113113
@show sfolder = split(dstname, '.')
114114
Base.mkpath(loaddir)
115115
folder = joinpath(loaddir, filename) #splitpath(string(sfolder[end-2]))[end]
116-
@info "loadDFG detected a gzip $dstname -- unpacking via $loaddir now..."
116+
@info "loadDFG! detected a gzip $dstname -- unpacking via $loaddir now..."
117117
Base.rm(folder, recursive=true, force=true)
118118
# unzip the tar file
119119
run(`tar -zxf $dstname -C $loaddir`)
@@ -160,10 +160,13 @@ function loadDFG!(dfgLoadInto::AbstractDFG, dst::AbstractString)
160160

161161
# remove the temporary unzipped file
162162
if unzip
163-
@info "DFG.loadDFG is deleting a temp folder created during unzip, $loaddir"
163+
@info "DFG.loadDFG! is deleting a temp folder created during unzip, $loaddir"
164164
# need this because the number of files created in /tmp/caesar/random is becoming redonkulous.
165165
Base.rm(loaddir, recursive=true, force=true)
166166
end
167167

168168
return dfgLoadInto
169169
end
170+
171+
# to be extended by users with particular choices in dispatch.
172+
function loadDFG end

0 commit comments

Comments
 (0)