Skip to content

Commit 55559d5

Browse files
committed
format
1 parent b4972f3 commit 55559d5

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

src/DataBlobs/entities/BlobEntry.jl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,25 @@ StructUtils.@kwarg struct Blobentry
1818
""" Machine friendly and unique within a `Blobstore` identifier of the 'Blob'."""
1919
blobid::UUID = uuid4() # was blobId
2020
""" (Optional) crc32c hash value to ensure data consistency which must correspond to the stored hash upon retrieval."""
21-
crchash::Union{UInt32,Nothing} = nothing &(json=(lower=h->isnothing(h) ? nothing : string(h, base=16), lift=s->isnothing(s) ? nothing : parse(UInt32, s; base=16)))
21+
crchash::Union{UInt32, Nothing} =
22+
nothing & (
23+
json=(
24+
lower = h->isnothing(h) ? nothing : string(h, base = 16),
25+
lift = s->isnothing(s) ? nothing : parse(UInt32, s; base = 16),
26+
)
27+
)
2228
""" (Optional) sha256 hash value to ensure data consistency which must correspond to the stored hash upon retrieval."""
23-
shahash::Union{Vector{UInt8}, Nothing} = nothing &(json=(lower=h->isnothing(h) ? nothing : bytes2hex(h), lift=s->isnothing(s) ? nothing : hex2bytes(s)))
29+
shahash::Union{Vector{UInt8}, Nothing} =
30+
nothing & (
31+
json=(
32+
lower = h->isnothing(h) ? nothing : bytes2hex(h),
33+
lift = s->isnothing(s) ? nothing : hex2bytes(s),
34+
)
35+
)
2436
""" Source system or application where the blob was created (e.g., webapp, sdk, robot)"""
2537
origin::String = ""
2638
"""Number of bytes in blob serialized as a string"""
27-
size::Int64 = -1 &(json=(lower=string, lift=x->parse(Int64, x)))
39+
size::Int64 = -1 & (json=(lower = string, lift = x->parse(Int64, x)))
2840
""" Additional information that can help a different user of the Blob. """
2941
description::String = ""
3042
""" MIME description describing the format of binary data in the `Blob`, e.g. 'image/png' or 'application/json; _type=CameraModel'. """
@@ -107,4 +119,4 @@ function Base.setproperty!(x::Blobentry, f::Symbol, val)
107119
else
108120
setfield!(x, f, val)
109121
end
110-
end
122+
end

src/Deprecated.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
## ================================================================================
22
## Deprecated in v0.29
33
##=================================================================================
4-
getHash(entry::Blobentry) = error("Blobentry field :hash has been deprecated; use :crchash or :shahash instead")
4+
function getHash(entry::Blobentry)
5+
return error(
6+
"Blobentry field :hash has been deprecated; use :crchash or :shahash instead",
7+
)
8+
end
59
## ================================================================================
610
## Deprecated in v0.28
711
##=================================================================================

src/services/AbstractDFG.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ function copyGraph!(
970970
# Now we have to add all variables first,
971971
@showprogress desc = "copy variables" enabled = showprogress for variable in
972972
sourceVariables
973+
973974
variableCopy = deepcopyNodes ? deepcopy(variable) : variable
974975
if !hasVariable(destDFG, variable.label)
975976
addVariable!(destDFG, variableCopy)

src/services/CustomPrinting.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function printVariable(
6262
println(ioc, " marginalized: ", isMarginalized(vert, :default))
6363
println(ioc, " size bel. samples: ", size(vnd.val))
6464
print(ioc, " kde bandwidths: ")
65-
0 < length(vnd.bw) ? println(ioc, round.(vnd.bw[1], digits = 4)) : nothing
65+
0 < length(vnd.bw) ? println(ioc, round.(vnd.bw[1]; digits = 4)) : nothing
6666
printstyled(ioc, " VNDs: "; bold = true)
6767
println(ioc, solk[smsk], 4 < lsolk ? "..." : "")
6868
end
@@ -73,7 +73,7 @@ function printVariable(
7373
println(
7474
ioc,
7575
"<-- .suggested: ",
76-
round.(getPPE(vert, :default).suggested, digits = 4),
76+
round.(getPPE(vert, :default).suggested; digits = 4),
7777
)
7878
end
7979
maxkeys = 4
@@ -82,7 +82,7 @@ function printVariable(
8282
maxkeys -= 1
8383
maxkeys == 0 && break
8484
print(ioc, " :$key ")
85-
println(ioc, "<-- .suggested: ", round.(ppe.suggested, digits = 4))
85+
println(ioc, "<-- .suggested: ", round.(ppe.suggested; digits = 4))
8686
end
8787
println(ioc, " # Blobentries: (", length(listBlobentries(vert)), ")")
8888
printstyled(ioc, " VariableType: "; color = :blue, bold = true)

test/testBlocks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ function testGroup!(fg, v1, v2, f0, f1)
12631263
@test getLabel.(sort(getFactors(fg); by = getTimestamp)) == [:abf1, :af1]
12641264

12651265
@test getLabel.(
1266-
sortDFG(vcat(getVariables(fg), getFactors(fg)); lt = natural_lt, by = getLabel)
1266+
sortDFG(vcat(getVariables(fg), getFactors(fg)); lt = natural_lt, by = getLabel),
12671267
) == [:a, :abf1, :af1, :b]
12681268
end
12691269

0 commit comments

Comments
 (0)