Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.23.4-rc1 #1053

Merged
merged 4 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DistributedFactorGraphs"
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
version = "0.23.3"
version = "0.23.4"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
12 changes: 12 additions & 0 deletions src/DataBlobs/services/BlobEntry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@
function deleteBlobEntry!(var::AbstractDFGVariable, key::Symbol)
return pop!(var.dataDict, key)
end

function deleteBlobEntry!(var::PackedVariable, key::Symbol)
if !hasBlobEntry(var, key)
throw(

Check warning on line 201 in src/DataBlobs/services/BlobEntry.jl

View check run for this annotation

Codecov / codecov/patch

src/DataBlobs/services/BlobEntry.jl#L199-L201

Added lines #L199 - L201 were not covered by tests
KeyError(
"No dataEntry label $(key) found in variable $(getLabel(var)). Available keys: $(keys(var.dataDict))",
),
)
end
return deleteat!(var.blobEntries, findfirst(x -> x.label == key, var.blobEntries))

Check warning on line 207 in src/DataBlobs/services/BlobEntry.jl

View check run for this annotation

Codecov / codecov/patch

src/DataBlobs/services/BlobEntry.jl#L207

Added line #L207 was not covered by tests
end

function deleteBlobEntry!(dfg::AbstractDFG, label::Symbol, key::Symbol)
#users responsibility to delete data in db before deleting entry
# !isVariable(dfg, label) && return nothing
Expand Down
1 change: 1 addition & 0 deletions src/DistributedFactorGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export copyGraph!, deepcopyGraph, deepcopyGraph!, buildSubgraph, mergeGraph!

export hasBlobEntry,
getBlobEntry,
getBlobEntryFirst,
addBlobEntry!,
updateBlobEntry!,
deleteBlobEntry!,
Expand Down
4 changes: 2 additions & 2 deletions src/GraphsDFG/services/GraphsDFG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ end
function getBiadjacencyMatrix(
dfg::GraphsDFG;
solvable::Int = 0,
varLabels = listVariables(dfg; solvable = solvable),
factLabels = listFactors(dfg; solvable = solvable),
)::NamedTuple{
(:B, :varLabels, :facLabels),
Tuple{Graphs.SparseMatrixCSC, Vector{Symbol}, Vector{Symbol}},
}
varLabels = listVariables(dfg; solvable = solvable)
factLabels = listFactors(dfg; solvable = solvable)
varIndex = [dfg.g.labels[s] for s in varLabels]
factIndex = [dfg.g.labels[s] for s in factLabels]

Expand Down
Loading