Skip to content

Commit 130c679

Browse files
authored
Merge pull request #447 from JuliaRobotics/maint/20Q2/deprecate_GraphsDFG
Move GraphsDFG to attic and remove tests
2 parents e4185ec + 369ba74 commit 130c679

File tree

14 files changed

+27
-25
lines changed

14 files changed

+27
-25
lines changed
File renamed without changes.

src/GraphsDFG/entities/GraphsDFG.jl renamed to attic/GraphsDFG/entities/GraphsDFG.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function GraphsDFG( g::FGType=Graphs.incdict(GraphsNode,is_directed=false),
3838
sessionData::Dict{Symbol, String} = Dict{Symbol, String}(),
3939
params::T=NoSolverParams()) where T <: AbstractParams
4040
# Validate the userId, robotId, and sessionId
41+
Base.depwarn("GraphsDFG is voetstoots and will no longer be maintaind, use LightDFG", :GraphsDFG)
4142
!isValidLabel(userId) && error("'$userId' is not a valid User ID")
4243
!isValidLabel(robotId) && error("'$robotId' is not a valid Robot ID")
4344
!isValidLabel(sessionId) && error("'$sessionId' is not a valid Session ID")
@@ -57,6 +58,7 @@ function GraphsDFG{T}( g::FGType=Graphs.incdict(GraphsNode,is_directed=false),
5758
sessionData::Dict{Symbol, String} = Dict{Symbol, String}(),
5859
params::T=T()) where T <: AbstractParams
5960
# Validate the userId, robotId, and sessionId
61+
Base.depwarn("GraphsDFG is voetstoots and will no longer be maintaind, use LightDFG", :GraphsDFG)
6062
!isValidLabel(userId) && error("'$userId' is not a valid User ID")
6163
!isValidLabel(robotId) && error("'$robotId' is not a valid Robot ID")
6264
!isValidLabel(sessionId) && error("'$sessionId' is not a valid Session ID")

src/Deprecated.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
## Remove in 0.9
88
##==============================================================================
99

10+
include("../attic/GraphsDFG/GraphsDFG.jl")
11+
@reexport using .GraphsDFGs
12+
13+
1014
@deprecate buildSubgraphFromLabels!(dfg::AbstractDFG, varList::Vector{Symbol}) buildSubgraph(dfg, varList, 1)
1115

16+
17+
## TODO: I think these are handy, so move to Factor and Variable
1218
Base.getproperty(x::DFGFactor,f::Symbol) = begin
1319
if f == :solvable
1420
getfield(x,:_dfgNodeParams).solvable

src/DistributedFactorGraphs.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,13 @@ include("entities/AbstractDFGSummary.jl")
256256
include("services/AbstractDFG.jl")
257257

258258
# In Memory Types
259-
include("GraphsDFG/GraphsDFG.jl")
260-
@reexport using .GraphsDFGs
259+
# include("GraphsDFG/GraphsDFG.jl")
260+
# @reexport using .GraphsDFGs
261261
include("LightDFG/LightDFG.jl")
262262
@reexport using .LightDFGs
263263
#supported in Memory fg types
264-
const InMemoryDFGTypes = Union{GraphsDFG, LightDFG}
264+
# const InMemoryDFGTypes = Union{GraphsDFG, LightDFG}
265+
const InMemoryDFGTypes = LightDFG
265266

266267
# Common includes
267268
include("services/CommonAccessors.jl")

src/FileDFG/services/FileDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DevNotes:
99
# Example
1010
```julia
1111
using DistributedFactorGraphs, IncrementalInference
12-
# Create a DFG - can make one directly, e.g. GraphsDFG{NoSolverParams}() or use IIF:
12+
# Create a DFG - can make one directly, e.g. LightDFG{NoSolverParams}() or use IIF:
1313
dfg = initfg()
1414
# ... Add stuff to graph using either IIF or DFG:
1515
v1 = addVariable!(dfg, :a, ContinuousScalar, labels = [:POSE], solvable=0)
@@ -74,7 +74,7 @@ parameter.
7474
# Example
7575
```julia
7676
using DistributedFactorGraphs, IncrementalInference
77-
# Create a DFG - can make one directly, e.g. GraphsDFG{NoSolverParams}() or use IIF:
77+
# Create a DFG - can make one directly, e.g. LightDFG{NoSolverParams}() or use IIF:
7878
dfg = initfg()
7979
# Load the graph
8080
loadDFG("/tmp/savedgraph.tar.gz", IncrementalInference, dfg)

test/CGStructureTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dfg = CloudGraphsDFG{SolverParams}("localhost", 7474, "neo4j", "test",
33
"Description of test session",
44
nothing,
55
nothing,
6-
IncrementalInference.decodePackedType,
6+
nothing,
77
IncrementalInference.rebuildFactorMetadata!,
88
solverParams=SolverParams())
99

test/IIF4DoorsTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DistributedFactorGraphs.CloudGraphsDFG{SolverParams}() = CloudGraphsDFG{SolverPa
1515

1616
N=100
1717
# fg = initfg(CloudGraphsDFG{SolverParams}())
18-
fg = initfg(GraphsDFG{SolverParams})
18+
fg = initfg(LightDFG{SolverParams})
1919

2020
doors = reshape(Float64[-100.0;0.0;100.0;300.0],1,4)
2121
pd = kde!(doors,[3.0])

test/iifInterfaceTests.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929
Base.rm("something.dot")
3030
end
3131

32-
@testset "Testing CRUD, return and Failures from a GraphsDFG" begin
32+
@testset "Testing CRUD, return and Failures from a LightDFG" begin
3333
global dfg
3434
# dfg to copy to
3535
# creating a whole new graph with the same labels
@@ -40,7 +40,7 @@ end
4040
"Description of test session 2",
4141
nothing,
4242
nothing,
43-
IncrementalInference.decodePackedType,
43+
nothing,
4444
IncrementalInference.rebuildFactorMetadata!,
4545
solverParams=SolverParams())
4646
else
@@ -413,7 +413,6 @@ facts = map(n ->
413413

414414
# solvable checks
415415
@test getNeighbors(dfg, :x5, solvable=1) == Symbol[]
416-
#TODO Confirm: test failed on GraphsDFG, don't know if the order is important for isa variable.
417416
@test symdiff(getNeighbors(dfg, :x5, solvable=0), [:x4x5f1,:x5x6f1]) == []
418417
@test symdiff(getNeighbors(dfg, :x5),[:x4x5f1,:x5x6f1]) == []
419418
@test getNeighbors(dfg, :x7x8f1, solvable=0) == [:x7, :x8]

test/needsahomeTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ struct TestInferenceVariable1 <: InferenceVariable end
55
struct TestInferenceVariable2 <: InferenceVariable end
66

77
@testset "Needs-a-home tests" begin
8-
dfg = GraphsDFG{NoSolverParams}(params=NoSolverParams())
8+
dfg = LightDFG{NoSolverParams}(params=NoSolverParams())
99

1010
# Build a graph
1111
v1 = DFGVariable(:a, TestInferenceVariable1())

0 commit comments

Comments
 (0)