From 004f5fbf48434f8dcc8d90950a8cd80c92064448 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 09:37:42 -0400 Subject: [PATCH 1/8] expanding listSolveKeys --- src/services/AbstractDFG.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/services/AbstractDFG.jl b/src/services/AbstractDFG.jl index 8a079c43..b79eb07f 100644 --- a/src/services/AbstractDFG.jl +++ b/src/services/AbstractDFG.jl @@ -506,9 +506,14 @@ Related listSupersolves, getSolverDataDict, listVariables """ -function listSolveKeys(dfg::AbstractDFG) +function listSolveKeys(dfg::AbstractDFG, + fltr::Union{Type{<:InferenceVariable},Regex}; + tags::Vector{Symbol}=Symbol[], + solvable::Int=0 ) + # skeys = Set{Symbol}() - for vs in listVariables(dfg), ky in keys(getSolverDataDict(getVariable(dfg, vs))) + varList = listVariables(dfg, fltr, tags=tags, solvable=solvable) + for vs in varList, ky in keys(getSolverDataDict(getVariable(dfg, vs))) push!(skeys, ky) end return skeys From 04ca1437f98cf1fa5ea23f0237ee246b496317c6 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 13:19:56 -0400 Subject: [PATCH 2/8] expand listVariables --- src/services/AbstractDFG.jl | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/services/AbstractDFG.jl b/src/services/AbstractDFG.jl index b79eb07f..83968e41 100644 --- a/src/services/AbstractDFG.jl +++ b/src/services/AbstractDFG.jl @@ -484,9 +484,23 @@ listVariables(dfg, r"l", tags=[:APRILTAG;]) Related: - ls """ -function listVariables(dfg::G, regexFilter::Union{Nothing, Regex}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0) where G <: AbstractDFG +function listVariables(dfg::AbstractDFG, + regexFilter::Union{Nothing, Regex}=nothing; + tags::Vector{Symbol}=Symbol[], + solvable::Int=0 ) + # vars = getVariables(dfg, regexFilter, tags=tags, solvable=solvable) - return map(v -> v.label, vars) + return map(v -> v.label, vars)::Vector{Symbol} +end + +# to be consolidated, see #612 +function listVariables(dfg::AbstractDFG, + typeFilter::Type{<:InferenceVariable}; + tags::Vector{Symbol}=Symbol[], + solvable::Int=0 ) + # + retlist::Vector{Symbol} = ls(dfg, typeFilter) + 0 < length(tags) || solvable != 0 ? intersect(retlist, ls(dfg, tags=tags, solvable=solvable)) : retlist end """ @@ -495,7 +509,7 @@ Get a list of the IDs (labels) of the DFGFactors in the DFG. Optionally specify a label regular expression to retrieves a subset of the factors. """ function listFactors(dfg::G, regexFilter::Union{Nothing, Regex}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0)::Vector{Symbol} where G <: AbstractDFG - return map(f -> f.label, getFactors(dfg, regexFilter, tags=tags, solvable=solvable)) + return map(f -> f.label, getFactors(dfg, regexFilter, tags=tags, solvable=solvable)) end """ @@ -507,7 +521,7 @@ Related listSupersolves, getSolverDataDict, listVariables """ function listSolveKeys(dfg::AbstractDFG, - fltr::Union{Type{<:InferenceVariable},Regex}; + fltr::Union{Type{<:InferenceVariable},Regex, Nothing}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0 ) # From e900c95a79dff187eaffa24ac8ec195dd9247872 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 13:26:30 -0400 Subject: [PATCH 3/8] update travis --- .travis.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87ace849..0325c049 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,6 @@ arch: services: - neo4j -julia: - - 1.5 - - nightly - env: - IIF_TEST=false @@ -25,16 +21,17 @@ branches: jobs: include: - - julia: 1.4 + - name: "Julia 1.5, with IIF_TEST" env: - IIF_TEST=true if: NOT branch =~ ^release.*$ - - arch: arm64 + - julia: nightly + if: NOT branch =~ ^release.*$ + - name: "Julia 1.5, ARM64" + arch: arm64 env: SKIP_CGDFG_TESTS=true before_script: - stage: "Documentation" - julia: 1.4 - os: linux script: - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - julia --project=docs/ docs/make.jl From 14b2f03c914eda773c33f4bc0175bb6bbd24c904 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 13:27:52 -0400 Subject: [PATCH 4/8] autoanme --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0325c049..1f502a5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,14 +21,12 @@ branches: jobs: include: - - name: "Julia 1.5, with IIF_TEST" - env: + - env: - IIF_TEST=true if: NOT branch =~ ^release.*$ - julia: nightly if: NOT branch =~ ^release.*$ - - name: "Julia 1.5, ARM64" - arch: arm64 + - arch: arm64 env: SKIP_CGDFG_TESTS=true before_script: - stage: "Documentation" From 91d8eb14ea6ffee700e445a50a2ad9b5d996c359 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 13:29:06 -0400 Subject: [PATCH 5/8] Julia 1.5 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1f502a5e..4e4e0313 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,9 @@ arch: services: - neo4j +julia: + - 1.5 + env: - IIF_TEST=false From d6d1885f747f5e628e0c912dc812e043454e6132 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 15:14:03 -0400 Subject: [PATCH 6/8] change travis back --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e4e0313..87ace849 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ services: julia: - 1.5 + - nightly env: - IIF_TEST=false @@ -24,15 +25,16 @@ branches: jobs: include: - - env: + - julia: 1.4 + env: - IIF_TEST=true if: NOT branch =~ ^release.*$ - - julia: nightly - if: NOT branch =~ ^release.*$ - arch: arm64 env: SKIP_CGDFG_TESTS=true before_script: - stage: "Documentation" + julia: 1.4 + os: linux script: - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - julia --project=docs/ docs/make.jl From bcd537de388f37a88d6f276215ef47f461a47a43 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 15:38:55 -0400 Subject: [PATCH 7/8] option skip CGDFG test on IIF_TEST --- test/runtests.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index c5ac8ba3..bb162ff3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -86,11 +86,10 @@ if get(ENV, "IIF_TEST", "") == "true" using IncrementalInference - apis = [ - # GraphsDFG{SolverParams}(), - LightDFG(solverParams=SolverParams(), userId="testUserId"), - CloudGraphsDFG(solverParams=SolverParams(), userId="testUserId") - ] + apis = [LightDFG(solverParams=SolverParams(), userId="testUserId")] + ENV["SKIP_CGDFG_TESTS"] != "true" ? push!(apis, CloudGraphsDFG(solverParams=SolverParams(), userId="testUserId") ) : nothing + # GraphsDFG{SolverParams}() + for api in apis @testset "Testing Driver: $(typeof(api))" begin @info "Testing Driver: $(api)" From 3650a48fd7dcb7aef7003f8de47da714b42561b3 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 14 Aug 2020 15:44:32 -0400 Subject: [PATCH 8/8] oops, haskey too --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index bb162ff3..9a201af5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -87,9 +87,9 @@ if get(ENV, "IIF_TEST", "") == "true" using IncrementalInference apis = [LightDFG(solverParams=SolverParams(), userId="testUserId")] - ENV["SKIP_CGDFG_TESTS"] != "true" ? push!(apis, CloudGraphsDFG(solverParams=SolverParams(), userId="testUserId") ) : nothing + haskey(ENV, "SKIP_CGDFG_TESTS") && ENV["SKIP_CGDFG_TESTS"] != "true" ? push!(apis, CloudGraphsDFG(solverParams=SolverParams(), userId="testUserId") ) : nothing # GraphsDFG{SolverParams}() - + for api in apis @testset "Testing Driver: $(typeof(api))" begin @info "Testing Driver: $(api)"