Skip to content

Commit 427f8e9

Browse files
committed
no need to remove the module, just external exports wil do.
1 parent bca01e6 commit 427f8e9

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

src/DFGPlots/DFGPlots.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DFGPlotProps() = DFGPlotProps( (var=colorant"seagreen", fac=colorant"cyan3"),
3232

3333
"""
3434
$(SIGNATURES)
35-
Plots the structure of the factor graph. GraphPlot must be imported before DistributedFactoGraphs for these functions to be available.
35+
Plots the structure of the factor graph. GraphPlot must be imported before DistributedFactorGraphs for these functions to be available.
3636
Returns the plot context.
3737
3838
E.g.
@@ -86,8 +86,8 @@ draw(PDF("/tmp/graph.pdf", 16cm, 16cm), dfgplot(fg))
8686
8787
More information at [GraphPlot.jl](https://github.com/JuliaGraphs/GraphPlot.jl)
8888
"""
89-
function dfgplot(dfg::MetaGraphsDFG, p::DFGPlotProps = DFGPlotProps())
90-
89+
function dfgplot(dfg::DistributedFactorGraphs.MetaGraphsDFG, p::DFGPlotProps = DFGPlotProps())
90+
@info "Deprecated, please use GraphsDFG or LightDFG."
9191
nodesize = [has_prop(dfg.g,i,:factor) ? p.nodesize.fac : p.nodesize.var for i=vertices(dfg.g)]
9292
if p.drawlabels
9393
nodelabel = [has_prop(dfg.g,i,:factor) ? "" : string(get_prop(dfg.g,i,:label)) for i=vertices(dfg.g)]
@@ -122,13 +122,14 @@ More information at [GraphPlot.jl](https://github.com/JuliaGraphs/GraphPlot.jl)
122122
function dfgplot(dfg::AbstractDFG, p::DFGPlotProps = DFGPlotProps())
123123
# TODO implement convert functions
124124
@warn "TODO Implement convert"
125-
ldfg = MetaGraphsDFG{AbstractParams}()
125+
ldfg = LightDFG{AbstractParams}()
126126
DistributedFactorGraphs._copyIntoGraph!(dfg, ldfg, union(getVariableIds(dfg), getFactorIds(dfg)), true)
127127

128128
dfgplot(ldfg, p)
129129
end
130130

131-
function gplot(dfg::MetaGraphsDFG; keyargs...)
131+
function gplot(dfg::DistributedFactorGraphs.MetaGraphsDFG; keyargs...)
132+
@info "Deprecated, please use GraphsDFG or LightDFG."
132133
gplot(dfg.g; keyargs...)
133134
end
134135

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ include("FileDFG/FileDFG.jl")
5858
include("MetaGraphsDFG/MetaGraphsDFG.jl")
5959

6060
include("SymbolDFG/SymbolDFG.jl")
61-
@reexport using .SymbolDFGs
61+
using .SymbolDFGs
6262

6363
include("LightDFG/LightDFG.jl")
6464
@reexport using .LightDFGs

src/MetaGraphsDFG/MetaGraphsDFG.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ include("entities/MetaGraphsDFG.jl")
66
include("services/MetaGraphsDFG.jl")
77

88
# Exports
9-
export MetaGraphsDFG
9+
# Deprecated -
10+
# export MetaGraphsDFG
1011
export exists
1112
export getLabelDict, getDescription, setDescription, getInnerGraph, getAddHistory, getSolverParams, setSolverParams
1213
#

test/runtests.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ using GraphPlot # For plotting tests
33
using DistributedFactorGraphs
44

55
# Test each interface
6-
apis = [GraphsDFG, MetaGraphsDFG, SymbolDFG, LightDFG]
6+
# Still test LightDFG and MetaGraphsDFG for the moment until we remove in 0.4.2
7+
apis = [
8+
GraphsDFG,
9+
DistributedFactorGraphs.MetaGraphsDFG,
10+
DistributedFactorGraphs.SymbolDFG,
11+
LightDFG]
712
for api in apis
813
@testset "Testing Driver: $(api)" begin
914
@info "Testing Driver: $(api)"
@@ -12,6 +17,12 @@ for api in apis
1217
end
1318
end
1419

20+
# Test that we don't export LightDFG and MetaGraphsDFG
21+
@testset "Deprecated Drivers Test" begin
22+
@test_throws UndefVarError SymbolDFG{NoSolverParams}()
23+
@test_throws UndefVarError MetaGraphsDFG{NoSolverParams}()
24+
end
25+
1526
# Test special cases
1627

1728
@testset "Plotting Tests" begin

0 commit comments

Comments
 (0)