@@ -85,41 +85,10 @@ function isSolveInProgress(
8585 return getSolveInProgress (node, solvekey) > 0
8686end
8787
88- """
89- $(SIGNATURES)
90- Get a type from the serialization module.
91- """
92- function getTypeFromSerializationModule (_typeString:: AbstractString )
93- @debug " DFG converting type string to Julia type" _typeString
94- try
95- # split the type at last `.`
96- split_st = split (_typeString, r" \. (?!.*\. )" )
97- # if module is specified look for the module in main, otherwise use Main
98- if length (split_st) == 2
99- m = getfield (Main, Symbol (split_st[1 ]))
100- else
101- m = Main
102- end
103- noparams = split (split_st[end ], r" {" )
104- ret = if 1 < length (noparams)
105- # fix #671, but does not work with specific module yet
106- bidx = findfirst (r" {" , split_st[end ])[1 ]
107- error (" getTypeFromSerializationModule eval obsolete" )
108- # Core.eval(m, Base.Meta.parse("$(noparams[1])$(split_st[end][bidx:end])"))
109- else
110- getfield (m, Symbol (split_st[end ]))
111- end
112-
113- return ret
114-
115- catch ex
116- @error " Unable to deserialize type $(_typeString) "
117- io = IOBuffer ()
118- showerror (io, ex, catch_backtrace ())
119- err = String (take! (io))
120- @error (err)
121- end
122- return nothing
88+ function getTypeFromSerializationModule (:: AbstractString )
89+ return error (
90+ " getTypeFromSerializationModule is obsolete, use DFG.parseVariableType or IIF.getTypeFromSerializationModule." ,
91+ )
12392end
12493
12594# # Version checking
137106
138107refMetadata (node) = node. metadata
139108
140- function packDistribution end
141- function unpackDistribution end
109+ @deprecate packDistribution (d) pack (d)
110+ @deprecate unpackDistribution (d) unpack (d)
142111
143112function setDescription! (args... )
144113 return error (" setDescription! was removed and may be implemented later." )
@@ -158,8 +127,8 @@ function _getDuplicatedEmptyDFG(
158127 return newDfg
159128end
160129
161- # TODO is Type correct
162- @deprecate getVariableType (args... ) getStateType (args... )
130+ # Type gets confused with returning a DataType, Kind is an instance of StateType
131+ @deprecate getVariableType (args... ) getStateKind (args... )
163132
164133function getVariableTypeName (v:: VariableSummary )
165134 Base. depwarn (" getVariableTypeName is deprecated." , :getVariableTypeName )
@@ -274,7 +243,9 @@ const PackedObservation = AbstractPackedObservation
274243abstract type AbstractPackedBelief end
275244const PackedBelief = AbstractPackedBelief
276245
277- getAddHistory (dfg:: AbstractDFG ) = error (" getAddHistory is obsolete." )
246+ # TODO maybe replace with `listVariablesAddOrder` or using sort on `listVariables`
247+ getAddHistory (dfg:: AbstractDFG ) = error (" getAddHistory is deprecated." )
248+ getAddHistory (dfg:: GraphsDFG ) = listVariables (dfg) # default listVariables on GraphsDFG is ordered
278249
279250# # Utility functions for getting type names and modules (from IncrementalInference)
280251_getmodule (t:: T ) where {T} = T. name. module
@@ -342,6 +313,31 @@ function hasTagsNeighbors(
342313 return length (filter (x -> x in alltags, tags)) >= (matchAll ? length (tags) : 1 )
343314end
344315
316+ # Obsolete PPEs
317+ abstract type AbstractPointParametricEst end
318+ function _ppe_obsolete ()
319+ return error (
320+ " PPEs are obsolete and will be replaced soon (IIF.calcMeanMaxSuggested can be used in some cases), see #1133." ,
321+ )
322+ end
323+ getPPEMax (args... ) = _ppe_obsolete ()
324+ getPPEMean (args... ) = _ppe_obsolete ()
325+ getPPESuggested (args... ) = _ppe_obsolete ()
326+ getLastUpdatedTimestamp (est:: AbstractPointParametricEst ) = _ppe_obsolete ()
327+ getPPE (args... ) = _ppe_obsolete ()
328+ addPPE! (args... ) = _ppe_obsolete ()
329+ addPPEs! (args... ) = _ppe_obsolete ()
330+ updatePPE! (args... ) = _ppe_obsolete ()
331+ deletePPE! (args... ) = _ppe_obsolete ()
332+ listPPEs (args... ) = _ppe_obsolete ()
333+ mergePPEs! (args... ) = _ppe_obsolete ()
334+ getPPEDict (args... ) = _ppe_obsolete ()
335+ getPPEs (args... ) = _ppe_obsolete ()
336+ getVariablePPEDict (args... ) = _ppe_obsolete ()
337+ getVariablePPE (args... ) = _ppe_obsolete ()
338+ MeanMaxPPE (args... ; kwargs... ) = _ppe_obsolete ()
339+ getEstimateFields (args... ) = _ppe_obsolete ()
340+
345341# # ================================================================================
346342# # Deprecated in v0.28
347343# #=================================================================================
@@ -421,7 +417,7 @@ function lsWho(dfg::AbstractDFG, type::Symbol)
421417 vars = getVariables (dfg)
422418 labels = Symbol[]
423419 for v in vars
424- varType = typeof (getVariableType (v)) |> nameof
420+ varType = typeof (getStateKind (v)) |> nameof
425421 varType == type && push! (labels, v. label)
426422 end
427423 return labels
0 commit comments