Skip to content

Commit ec55e16

Browse files
committed
Merge branch 'feature/127_jt_remove_metasymbolexport' into jt/updatefrommaster
2 parents e11e4af + 427f8e9 commit ec55e16

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
@@ -64,7 +64,7 @@ include("FileDFG/FileDFG.jl")
6464
include("MetaGraphsDFG/MetaGraphsDFG.jl")
6565

6666
include("SymbolDFG/SymbolDFG.jl")
67-
@reexport using .SymbolDFGs
67+
using .SymbolDFGs
6868

6969
include("LightDFG/LightDFG.jl")
7070
@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
@@ -28,7 +28,12 @@ using DistributedFactorGraphs
2828
# end
2929

3030
# Test each interface
31-
apis = [GraphsDFG, MetaGraphsDFG, SymbolDFG, LightDFG]
31+
# Still test LightDFG and MetaGraphsDFG for the moment until we remove in 0.4.2
32+
apis = [
33+
GraphsDFG,
34+
DistributedFactorGraphs.MetaGraphsDFG,
35+
DistributedFactorGraphs.SymbolDFG,
36+
LightDFG]
3237
for api in apis
3338
@testset "Testing Driver: $(api)" begin
3439
@info "Testing Driver: $(api)"
@@ -37,6 +42,12 @@ for api in apis
3742
end
3843
end
3944

45+
# Test that we don't export LightDFG and MetaGraphsDFG
46+
@testset "Deprecated Drivers Test" begin
47+
@test_throws UndefVarError SymbolDFG{NoSolverParams}()
48+
@test_throws UndefVarError MetaGraphsDFG{NoSolverParams}()
49+
end
50+
4051
# Test special cases
4152

4253
@testset "Plotting Tests" begin

0 commit comments

Comments
 (0)