Skip to content

Commit ba8e134

Browse files
committed
update deprecated.jl
1 parent e2b1e17 commit ba8e134

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

src/Deprecated.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ end
101101

102102
@deprecate getFactorIds(dfg, regexFilter=nothing; solvable=0) listFactors(dfg, regexFilter, solvable=solvable)
103103

104-
#NOTE too many aliases on PPE
105-
106-
@deprecate getVariablePPEs(v::VariableDataLevel1) getPPEDict(v)
107-
108-
@deprecate getPPEs(vari::VariableDataLevel1) getPPEDict(v)
109-
110-
@deprecate getVariablePPE(args...) getPPE(args...)
111-
112104

113105
#TODO doesn't look like this existed
114106
# @deprecate timestamp(v) getTimestamp(v)

src/DistributedFactorGraphs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ export getPPEDict
144144

145145
# CRUD & SET
146146
export getPPE,
147+
getPPEs,
148+
getVariablePPE,
149+
getVariablePPEs,
147150
addPPE!,
148151
updatePPE!,
149152
deletePPE!,

src/needsahome.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ print(fct::DFGFactor) = @show fct
8989
9090
Display and return to console the user factor identified by tag name.
9191
"""
92-
printFactor(fgl::AbstractDFG, fsym::Symbol) = print(getFactor(dfg, sym))
92+
printFactor(dfg::AbstractDFG, sym::Symbol) = print(getFactor(dfg, sym))
9393

9494
"""
9595
$SIGNATURES
@@ -99,11 +99,19 @@ Display the content of `VariableNodeData` to console for a given factor graph an
9999
Dev Notes
100100
- TODO split as two show macros between AMP and DFG
101101
"""
102-
printVariable(fgl::AbstractDFG, vsym::Symbol, solveKey::Symbol=:default) = print(getVariable(dfg, sym))
102+
printVariable(dfg::AbstractDFG, sym::Symbol, solveKey::Symbol=:default) = print(getVariable(dfg, sym))
103103

104-
print(fgl::AbstractDFG, fsym::Symbol) = isVariable(dfg,fsym) ? printVariable(dfg, fsym) : printFactor(dfg, sym)
104+
print(dfg::AbstractDFG, sym::Symbol) = isVariable(dfg,sym) ? printVariable(dfg, sym) : printFactor(dfg, sym)
105105

106106

107+
#NOT too many aliases on PPE, brought back from deprecated DF
108+
109+
getVariablePPEs(v::VariableDataLevel1) = getPPEDict(v)
110+
111+
getPPEs(vari::VariableDataLevel1) = getPPEDict(v)
112+
113+
getVariablePPE(args...) = getPPE(args...)
114+
107115
## KEEPING COMMENT, WANT TO BE CONSOLIDATED WITH FUNCTION ABOVE -- KEEPING ONLY ONE FOR MAINTAINABILITY
108116
## STILL NEEDS TO BE CONSOLIDATED WITH `DFG._copyIntoGraph`
109117
# """

test/testBlocks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ function PPETestBlock!(fg, v1)
468468
@test deletePPE!(fg, :a, :default) == ppe
469469

470470
#FIXME copied from lower
471-
@test @test_deprecated getVariablePPEs(v1) == v1.ppeDict
472-
@test_throws KeyError getPPE(v1, :notfound)
471+
# @test @test_deprecated getVariablePPEs(v1) == v1.ppeDict
472+
@test_throws Union{KeyError,UndefVarError} getPPE(v1, :notfound)
473473
#TODO
474474
# @test_deprecated getVariablePPE(v1)
475475

0 commit comments

Comments
 (0)