Skip to content

Commit

Permalink
Merge pull request #895 from JuliaRobotics/master
Browse files Browse the repository at this point in the history
v0.18.5-rc1
  • Loading branch information
dehann authored Aug 25, 2022
2 parents a266ca4 + 71c0693 commit 1002956
Show file tree
Hide file tree
Showing 19 changed files with 237 additions and 221 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
name: CompatHelper

on:
schedule:
- cron: '00 00 * * *'

- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.2.0]
julia-arch: [x86]
os: [ubuntu-latest]
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
version: '1'
# arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- release/*
tags:
- v**

workflow_dispatch:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
Expand All @@ -19,7 +19,7 @@ jobs:
matrix:
version:
- '1.6'
- '1.7'
- '1.8'
- 'nightly'
os:
- ubuntu-latest
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
matrix:
version:
- '1.6'
- '1.7'
- '1.8'
os:
- ubuntu-latest
arch:
Expand Down Expand Up @@ -125,6 +125,8 @@ jobs:
${{ runner.os }}-
- name: Julia Build Pkg
env:
DFG_USE_CGDFG: true
uses: julia-actions/julia-buildpkg@latest

- name: Git Test Credentials
Expand Down Expand Up @@ -159,7 +161,7 @@ jobs:
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: 1.7
version: 1.8
arch: x64

- name: Build Docs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
*.mem
deps/deps.jl
docs/build
Manifest.toml
Expand Down
81 changes: 0 additions & 81 deletions .travis.yml

This file was deleted.

10 changes: 4 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
Copyright (c) 2017-2021 NavAbility

NOTICE: this license will be relaxed to be much more permissive soon.
Copyright (c) 2017-2022 NavAbility

The source code in this repository is separated into two parts
that are licensed separately. The Neo4jDFG library/driver
is licensed separately. For more details see:
https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/blob/develop/src/Neo4jDFG/LICENSE

DistributedFactorGraphs.jl, is not licensed for hosted, webservice or cloud
DistributedFactorGraphs' Neo4jDFG Driver is not licensed for hosted, webservice or cloud
solutions (public or private). Please contact NavAbility via email at
<info@navability.io> for clarification or additional licensing options.
NavAbility reserves all rights regarding, and to deny use of the software
Expand All @@ -18,9 +16,9 @@ Other general use or modification of the software beyond that of
webservices or clouds (private or public) is permitted
according to terms defined by Apache 2.0 or other library specifc licenses.

Copyright 2017-2021 NavAbility
Copyright 2017-2022 NavAbility

Licensed under a Market Limited version of the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software
Expand Down
7 changes: 5 additions & 2 deletions 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.18.4"
version = "0.18.5"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -15,7 +15,9 @@ LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
ManifoldsBase = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
Neo4j = "d2adbeaf-5838-5367-8a2f-e46d570981db"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Expand All @@ -29,13 +31,14 @@ Unmarshal = "cbff2730-442d-58d7-89d1-8e530c41eb02"
Colors = "0.10, 0.11, 0.12"
Distributions = "0.23, 0.24, 0.25"
DocStringExtensions = "0.8, 0.9"
Graphs = "1.4"
GraphPlot = "0.5.0"
Graphs = "1.4"
JSON = "0.21"
JSON2 = "0.3.1"
LightGraphs = "1.2, 1.3"
ManifoldsBase = "0.11, 0.12, 0.13"
Neo4j = "2"
OrderedCollections = "1.4"
Pkg = "1.4, 1.5"
Reexport = "1"
Requires = "1"
Expand Down
19 changes: 19 additions & 0 deletions src/Deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ function Base.convert(::Type{DateTime}, ts::ZonedDateTime)
return DateTime(ts, Local)
end

## ================================================================================
## Deprecate before v0.20 - Kept longer with error
##=================================================================================

function getTypeFromSerializationModule(dfg::G, moduleType::Symbol) where G <: AbstractDFG
error("Deprecating getTypeFromSerializationModule(dfg,symbol), use getTypeFromSerializationModule(string) instead.")
st = nothing
try
st = getfield(Main, Symbol(moduleType))
catch ex
@error "Unable to deserialize packed variableType $(moduleType)"
io = IOBuffer()
showerror(io, ex, catch_backtrace())
err = String(take!(io))
@error(err)
end
return st
end

## ================================================================================
## Deprecate before v0.19 - Kept longer with error
##=================================================================================
Expand Down
3 changes: 3 additions & 0 deletions src/DistributedFactorGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import ManifoldsBase
import ManifoldsBase: AbstractManifold, manifold_dimension
export AbstractManifold, manifold_dimension

import RecursiveArrayTools: ArrayPartition
export ArrayPartition

import Base: getindex


Expand Down
10 changes: 6 additions & 4 deletions src/GraphsDFG/FactorGraphs/FactorGraphs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module FactorGraphs
using Graphs

using OrderedCollections

import Base:
eltype, show, ==, Pair,
Tuple, copy, length, size,
Expand Down Expand Up @@ -42,18 +44,18 @@ include("BiMaps.jl")
struct FactorGraph{T <: Integer,V <: AbstractVariableType, F <: AbstractFactorType} <: AbstractGraph{T}
graph::SimpleGraph{T}
labels::BiDictMap{T}
variables::Dict{Symbol,V}
factors::Dict{Symbol,F}
variables::OrderedDict{Symbol,V}
factors::OrderedDict{Symbol,F}
end

function FactorGraph{T, V, F}(nv::Int=100, nf::Int=100) where {T <: Integer, V <: AbstractVariableType, F <: AbstractFactorType}
fadjlist = Vector{Vector{T}}()
sizehint!(fadjlist, nv + nf)
g = SimpleGraph{T}(0, fadjlist)
labels = BiDictMap{T}(sizehint=nv+nf)
variables = Dict{Symbol,V}()
variables = OrderedDict{Symbol,V}()
sizehint!(variables, nv)
factors = Dict{Symbol,F}()
factors = OrderedDict{Symbol,F}()
sizehint!(factors, nf)
return FactorGraph{T, V, F}(g, labels, variables, factors)
end
Expand Down
25 changes: 25 additions & 0 deletions src/GraphsDFG/services/GraphsDFG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,28 @@ function findShortestPathDijkstra( dfg::GraphsDFG,
return dijkpath
end

export bfs_tree
export dfs_tree
export traverseGraphTopologicalSort

function Graphs.bfs_tree(fg::GraphsDFG, s::Symbol)
return bfs_tree(fg.g, fg.g.labels[s])
end

function Graphs.dfs_tree(fg::GraphsDFG, s::Symbol)
return dfs_tree(fg.g, fg.g.labels[s])
end

"""
$SIGNATURES
Return a topological sort of a factor graph as a vector of vertex labels in topological order.
Starting from s::Symbol
"""
function traverseGraphTopologicalSort(fg::GraphsDFG, s::Symbol, fs_tree=bfs_tree)
tree = fs_tree(fg, s)
list = topological_sort_by_dfs(tree)
symlist = map(s->fg.g.labels[s], list)
return symlist
end

9 changes: 1 addition & 8 deletions src/LightDFG/entities/LightDFG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Create an in-memory LightDFG with the following parameters:
- V: Variable type
- F: Factor type
"""
function LightDFG end
function LightDFG{T,V,F}(g::FactorGraph{Int,V,F}=FactorGraph{Int,V,F}();
description::String="LightGraphs.jl implementation",
userId::String="DefaultUser",
Expand All @@ -48,14 +49,6 @@ end

# LightDFG{T}(; kwargs...) where T <: AbstractParams = LightDFG{T,DFGVariable,DFGFactor}(;kwargs...)

"""
$(SIGNATURES)
Create an in-memory LightDFG with the following parameters:
- T: Solver parameters (defaults to `NoSolverParams()`)
- V: Variable type
- F: Factor type
"""
function LightDFG{T}(g::FactorGraph{Int,DFGVariable,DFGFactor}=FactorGraph{Int,DFGVariable,DFGFactor}();
kwargs...) where T <: AbstractParams
return LightDFG{T,DFGVariable,DFGFactor}(g; kwargs...)
Expand Down
Loading

0 comments on commit 1002956

Please sign in to comment.