Skip to content

Commit 180f2ef

Browse files
authored
Merge pull request #1046 from JuliaRobotics/master
release v0.23.2-rc1
2 parents fb4519c + 54f4e35 commit 180f2ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4365
-2918
lines changed

.JuliaFormatter.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
indent = 4
2+
always_for_in = false #
3+
whitespace_typedefs = true
4+
whitespace_ops_in_indices = true
5+
remove_extra_newlines = true
6+
import_to_using = false #
7+
pipe_to_function_call = false #
8+
short_to_long_function_def = true
9+
always_use_return = true
10+
whitespace_in_kwargs = true #
11+
annotate_untyped_fields_with_any = true #
12+
conditional_to_if = true
13+
separate_kwargs_with_semicolon = true

.github/workflows/Formatter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
8+
jobs:
9+
format:
10+
name: "Format Check"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: julia-actions/setup-julia@v1
15+
with:
16+
version: 1
17+
- uses: julia-actions/cache@v1
18+
- name: Install JuliaFormatter and format
19+
run: |
20+
using Pkg
21+
Pkg.add(PackageSpec(name="JuliaFormatter"))
22+
using JuliaFormatter
23+
format("."; verbose=true)
24+
shell: julia --color=yes {0}
25+
- name: Suggest formatting changes
26+
uses: reviewdog/action-suggester@v1
27+
if: github.event_name == 'pull_request'
28+
with:
29+
tool_name: JuliaFormatter
30+
fail_on_error: true

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
version:
21-
- '1.9'
21+
- '~1.10.0-0'
2222
- 'nightly'
2323
os:
2424
- ubuntu-latest

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DistributedFactorGraphs"
22
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
3-
version = "0.23.1"
3+
version = "0.23.2"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -60,6 +60,7 @@ TimeZones = "1.3.1"
6060
julia = "1.9"
6161

6262
[extras]
63+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
6364
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
6465
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
6566
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -69,4 +70,4 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
6970
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7071

7172
[targets]
72-
test = ["Test", "DataStructures", "GraphPlot", "LinearAlgebra", "Manifolds", "Pkg", "Statistics"]
73+
test = ["Aqua", "Test", "DataStructures", "GraphPlot", "LinearAlgebra", "Manifolds", "Pkg", "Statistics"]

attic/DataBlobs/FileDataEntryBlob.jl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11

2-
32
# @generated function ==(x::BlobEntry, y::BlobEntry)
43
# mapreduce(n -> :(x.$n == y.$n), (a,b)->:($a && $b), fieldnames(x))
54
# end
65

76
#
87
# getHash(entry::AbstractBlobEntry) = hex2bytes(entry.hash)
98

10-
119
##==============================================================================
1210
## BlobEntry Common
1311
##==============================================================================
14-
blobfilename(entry::BlobEntry) = joinpath(entry.folder,"$(entry.id).dat")
15-
entryfilename(entry::BlobEntry) = joinpath(entry.folder,"$(entry.id).json")
16-
12+
blobfilename(entry::BlobEntry) = joinpath(entry.folder, "$(entry.id).dat")
13+
entryfilename(entry::BlobEntry) = joinpath(entry.folder, "$(entry.id).json")
1714

1815
##==============================================================================
1916
## BlobEntry Blob CRUD
@@ -37,10 +34,10 @@ function addBlob!(dfg::AbstractDFG, entry::BlobEntry, data::Vector{UInt8})
3734
error("Key '$(entry.id)' entry already exists, but no blob.")
3835
else
3936
open(blobfilename(entry), "w") do f
40-
write(f, data)
37+
return write(f, data)
4138
end
4239
open(entryfilename(entry), "w") do f
43-
JSON.print(f, entry)
40+
return JSON.print(f, entry)
4441
end
4542
# FIXME update for entry.blobId vs entry.originId
4643
return UUID(entry.id)
@@ -71,11 +68,20 @@ end
7168
## BlobEntry CRUD Helpers
7269
##==============================================================================
7370

74-
function addData!(::Type{BlobEntry}, dfg::AbstractDFG, label::Symbol, key::Symbol, folder::String, blob::Vector{UInt8}, timestamp=now(localzone());
75-
id::UUID = uuid4(), hashfunction = sha256)
71+
function addData!(
72+
::Type{BlobEntry},
73+
dfg::AbstractDFG,
74+
label::Symbol,
75+
key::Symbol,
76+
folder::String,
77+
blob::Vector{UInt8},
78+
timestamp = now(localzone());
79+
id::UUID = uuid4(),
80+
hashfunction = sha256,
81+
)
7682
fde = BlobEntry(key, id, folder, bytes2hex(hashfunction(blob)), timestamp)
7783
blobId = addBlob!(dfg, fde, blob) |> UUID
78-
newEntry = BlobEntry(fde; id=blobId, blobId)
84+
newEntry = BlobEntry(fde; id = blobId, blobId)
7985
de = addBlobEntry!(dfg, label, newEntry)
8086
return de # de=>db
8187
end

0 commit comments

Comments
 (0)