@@ -13,17 +13,6 @@ mutable struct GraphsDFG{
1313} <: AbstractDFG{T}
1414 g:: FactorGraph{Int, V, F}
1515 description:: String
16- # ------ deprecated fields ---------
17- userLabel:: Union{Nothing, String}
18- robotLabel:: Union{Nothing, String}
19- sessionLabel:: Union{Nothing, String}
20- userData:: Union{Nothing, Dict{Symbol, SmallDataTypes}}
21- robotData:: Union{Nothing, Dict{Symbol, SmallDataTypes}}
22- sessionData:: Union{Nothing, Dict{Symbol, SmallDataTypes}}
23- userBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}}
24- robotBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}}
25- sessionBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}}
26- # ---------------------------------
2716 addHistory:: Vector{Symbol} # TODO : Discuss more - is this an audit trail?
2817 solverParams:: T # Solver parameters
2918 blobStores:: Dict{Symbol, AbstractBlobstore}
@@ -45,43 +34,6 @@ function DFG.setMetadata!(dfg::GraphsDFG, metadata::Dict{Symbol, SmallDataTypes}
4534 return merge! (dfg. graphMetadata, metadata)
4635end
4736
48- deprecatedDfgFields = [
49- :userLabel ,
50- :robotLabel ,
51- :sessionLabel ,
52- :userData ,
53- :robotData ,
54- :sessionData ,
55- :userBlobEntries ,
56- :robotBlobEntries ,
57- :sessionBlobEntries ,
58- ]
59-
60- function Base. propertynames (x:: GraphsDFG , private:: Bool = false )
61- return setdiff (fieldnames (GraphsDFG), deprecatedDfgFields)
62- end
63-
64- # deprected in v0.25
65- function Base. getproperty (dfg:: GraphsDFG , f:: Symbol )
66- if f in deprecatedDfgFields
67- Base. depwarn (
68- " Field $f is deprecated as part of removing user/robot/session. Replace with Agent or Factorgraph [Label/Metadata/BlobEntries]." ,
69- :getproperty ,
70- )
71- end
72- return getfield (dfg, f)
73- end
74-
75- function Base. setproperty! (dfg:: GraphsDFG , f:: Symbol , val)
76- if f in deprecatedDfgFields
77- Base. depwarn (
78- " Field $f is deprecated as part of removing user/robot/session. Replace with Agent or Factorgraph [Label/Metadata/BlobEntries]." ,
79- :setproperty! ,
80- )
81- end
82- return setfield! (dfg, f, val)
83- end
84-
8537"""
8638 $(SIGNATURES)
8739
@@ -115,52 +67,15 @@ function GraphsDFG{T, V, F}(
11567 agentMetadata,
11668 agentBlobEntries,
11769 ),
118-
119- # Deprecated fields
120- userLabel:: Union{Nothing, String} = nothing ,
121- robotLabel:: Union{Nothing, String} = nothing ,
122- sessionLabel:: Union{Nothing, String} = nothing ,
123- userData:: Union{Nothing, Dict{Symbol, SmallDataTypes}} = nothing ,
124- robotData:: Union{Nothing, Dict{Symbol, SmallDataTypes}} = nothing ,
125- sessionData:: Union{Nothing, Dict{Symbol, SmallDataTypes}} = nothing ,
126- userBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}} = nothing ,
127- robotBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}} = nothing ,
128- sessionBlobEntries:: Union{Nothing, OrderedDict{Symbol, Blobentry}} = nothing ,
12970) where {T <: AbstractParams , V <: AbstractDFGVariable , F <: AbstractDFGFactor }
130- if any ([
131- ! isnothing (userLabel),
132- ! isnothing (robotLabel),
133- ! isnothing (sessionLabel),
134- ! isnothing (userData),
135- ! isnothing (robotData),
136- ! isnothing (sessionData),
137- ! isnothing (userBlobEntries),
138- ! isnothing (robotBlobEntries),
139- ! isnothing (sessionBlobEntries),
140- ])
141- # deprecated in v0.25
142- Base. depwarn (
143- " Kwargs with user/robot/session is deprecated. Replace with agent[Label/Metadata/BlobEntries] or graph[Label/Metadata/BlobEntries]." ,
144- :GraphsDFG ,
145- )
146- end
14771
148- # Validate the userLabel, robotLabel, and sessionLabel
72+ # Validate the graphLabel and agentLabel
14973 ! isValidLabel (graphLabel) && error (" '$graphLabel ' is not a valid label" )
15074 ! isValidLabel (agentLabel) && error (" '$agentLabel ' is not a valid label" )
15175
15276 return GraphsDFG {T, V, F} (
15377 g,
15478 graphDescription,
155- userLabel,
156- robotLabel,
157- sessionLabel,
158- userData,
159- robotData,
160- sessionData,
161- userBlobEntries,
162- robotBlobEntries,
163- sessionBlobEntries,
16479 addHistory,
16580 solverParams,
16681 blobStores,
@@ -196,64 +111,3 @@ function GraphsDFG(
196111) where {T}
197112 return GraphsDFG {T, VariableCompute, FactorCompute} (g; solverParams, kwargs... )
198113end
199-
200- function GraphsDFG (
201- description:: String ,
202- userLabel:: String ,
203- robotLabel:: String ,
204- sessionLabel:: String ,
205- userData:: Dict{Symbol, SmallDataTypes} ,
206- robotData:: Dict{Symbol, SmallDataTypes} ,
207- sessionData:: Dict{Symbol, SmallDataTypes} ,
208- solverParams:: AbstractParams ,
209- blobStores = Dict {Symbol, AbstractBlobstore} (),
210- )
211- # deprecated in v0.25
212- Base. depwarn (
213- " user/robot/session is deprecated. Replace with agent[Label/Metadata/BlobEntries] or graph[Label/Metadata/BlobEntries]." ,
214- :GraphsDFG ,
215- )
216- return GraphsDFG {typeof(solverParams), VariableCompute, FactorCompute} (
217- FactorGraph {Int, VariableCompute, FactorCompute} ();
218- description,
219- userLabel,
220- robotLabel,
221- sessionLabel,
222- userData,
223- robotData,
224- sessionData,
225- solverParams,
226- blobStores,
227- )
228- end
229-
230- function GraphsDFG {T, V, F} (
231- description:: String ,
232- userLabel:: String ,
233- robotLabel:: String ,
234- sessionLabel:: String ,
235- userData:: Dict{Symbol, SmallDataTypes} ,
236- robotData:: Dict{Symbol, SmallDataTypes} ,
237- sessionData:: Dict{Symbol, SmallDataTypes} ,
238- solverParams:: T ,
239- blobStores = Dict {Symbol, AbstractBlobstore} (),
240- ) where {T <: AbstractParams , V <: AbstractDFGVariable , F <: AbstractDFGFactor }
241-
242- # deprecated in v0.25
243- Base. depwarn (
244- " user/robot/session is deprecated. Replace with agent[Label/Metadata/BlobEntries] or graph[Label/Metadata/BlobEntries]." ,
245- :GraphsDFG ,
246- )
247- return GraphsDFG {T, V, F} (
248- FactorGraph {Int, V, F} ();
249- description,
250- userLabel,
251- robotLabel,
252- sessionLabel,
253- userData,
254- robotData,
255- sessionData,
256- solverParams,
257- blobStores,
258- )
259- end
0 commit comments