Add kwargs support and cleaner feasibility checks #64
Annotations
4 errors, 2 warnings, and 1 notice
../../../.julia/packages/Documenter/CJeWX/src/utilities/utilities.jl#L44
failed to run `@example` block in src/custom.md:89-121
```@example custom
nb_vertices = 4
graph = SimpleDiGraph(nb_vertices)
edge_list = [(1, 2), (1, 3), (2, 3), (2, 4), (3, 4)]
distance_list = [1, 2, -1, 1, 1]
for (i, j) in edge_list
add_edge!(graph, i, j)
end
I = [src(e) for e in edges(graph)]
J = [dst(e) for e in edges(graph)]
d = sparse(I, J, distance_list)
W = 1.0
cost_list = [[0.0], [0.0], [10.0], [0.0], [0]]
w = [0.0 for i in 1:nb_vertices, j in 1:nb_vertices, k in 1:1]
for ((i, j), k) in zip(edge_list, cost_list)
w[i, j, :] = k
end
# origin forward resource and backward forward resource set to 0
resource = Resource(0.0, 0.0)
# forward and backward expansion functions are equal
If = [src(e) for e in edges(graph)]
Jf = [dst(e) for e in edges(graph)]
f = [ExpansionFunction(d[i, j], w[i, j]) for (i, j) in zip(If, Jf)]
F = sparse(If, Jf, f);
instance = CSPInstance(graph, 1, nb_vertices, resource, resource, Cost(W), F, F)
(; p_star, c_star) = generalized_constrained_shortest_path(instance)
@info "Result" c_star p_star
```
exception =
MethodError: no method matching iterate(::Main.__atexample__named__custom.Resource)
Closest candidates are:
iterate(!Matched::SimpleTraits.GenerateTypeVars{:upcase})
@ SimpleTraits ~/.julia/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:445
iterate(!Matched::SimpleTraits.GenerateTypeVars{:lcase})
@ SimpleTraits ~/.julia/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:446
iterate(!Matched::SimpleTraits.GenerateTypeVars{:upcase}, !Matched::Any)
@ SimpleTraits ~/.julia/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:445
...
Stacktrace:
[1] indexed_iterate(I::Main.__atexample__named__custom.Resource, i::Int64)
@ Base ./tuple.jl:95
[2] generalized_a_star(::Type{Graphs.IsDirected{Graphs.SimpleGraphs.SimpleDiGraph{Int64}}}, instance::CSPInstance{Int64, Graphs.SimpleGraphs.SimpleDiGraph{Int64}, Main.__atexample__named__custom.Resource, Main.__atexample__named__custom.Resource, Main.__atexample__named__custom.Cost, SparseArrays.SparseMatrixCSC{Main.__atexample__named__custom.ExpansionFunction, Int64}, SparseArrays.SparseMatrixCSC{Main.__atexample__named__custom.ExpansionFunction, Int64}}, bounds::Vector{Main.__atexample__named__custom.Resource}; kwargs::@kwargs{})
@ ConstrainedShortestPaths ~/work/ConstrainedShortestPaths.jl/ConstrainedShortestPaths.jl/src/algorithms.jl:86
[3] generalized_a_star
@ ~/work/ConstrainedShortestPaths.jl/ConstrainedShortestPaths.jl/src/algorithms.jl:59 [inlined]
[4] generalized_a_star
@ ~/.julia/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:338 [inlined]
[5] #generalized_constrained_shortest_path#21
@ ~/work/ConstrainedShortestPaths.jl/ConstrainedShortestPaths.jl/src/algorithms.jl:164 [inlined]
[6] generalized_constrained_shortest_path
@ ~/work/ConstrainedShortestPaths.jl/ConstrainedShortestPaths.jl/src/algorithms.jl:160 [inlined]
[7] generalized_constrained_shortest_path(instance::CSPInstance{Int64, Graphs.SimpleGraphs.SimpleDiGraph{Int64}, Main.__atexample__named__custom.Resource, Main.__atexample__named__custom.Resource, Main.__atexample__named__custom.Cost, SparseArrays.SparseMatrixCSC{Main.__atexample__named__custom.ExpansionFunction, Int64}, SparseArrays.SparseMatrixCSC{Main.__atexample__named__custom.ExpansionFunction, Int64}})
@ ConstrainedShortestPaths ~/.julia/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:338
[8] top-level scope
@ custom.md:119
[9] eval
@ ./boot.jl:385 [inlined]
[10] #58
@ ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:754 [inlined]
[11] cd(f::Documenter.var"#58#60"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[12] (::Documenter.var"#57#59"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:753
[13] (::IOCapture.var"#4#7"{DataType, Documenter.var"#57#59"{Documenter.Page, Module, Expr}, IOContext{Base.PipeEnd
|
../../../.julia/packages/Documenter/CJeWX/src/utilities/utilities.jl#L44
failed to run `@example` block in src/resource_shortest_path.md:15-19
```@example resource_shortest_path
using ConstrainedShortestPaths
using Graphs, SparseArrays
using GLMakie, GraphMakie
```
exception =
Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/runner/.julia/compiled/v1.10/GLMakie/jl_52OKd2".
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2468
[3] compilecache
@ ./loading.jl:2340 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1974
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile /opt/hostedtoolcache/julia/1.10.4/x64/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ /opt/hostedtoolcache/julia/1.10.4/x64/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
@ FileWatching.Pidfile /opt/hostedtoolcache/julia/1.10.4/x64/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ ./essentials.jl:894 [inlined]
[9] invokelatest
@ ./essentials.jl:889 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2983
[11] maybe_cachefile_lock
@ ./loading.jl:2980 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1970
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1812
[14] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[15] invoke_in_world
@ ./essentials.jl:923 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1803
[17] macro expansion
@ ./loading.jl:1790 [inlined]
[18] macro expansion
@ ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1753
[20] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[21] invoke_in_world
@ ./essentials.jl:923 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1746
[23] eval
@ ./boot.jl:385 [inlined]
[24] #58
@ ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:754 [inlined]
[25] cd(f::Documenter.var"#58#60"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[26] (::Documenter.var"#57#59"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:753
[27] (::IOCapture.var"#4#7"{DataType, Documenter.var"#57#59"{Documenter.Page, Module, Expr}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/Rzdxd/src/IOCapture.jl:161
[28] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:515
[29] with_logger
@ ./logging.jl:627 [inlined]
[30] capture(f::Documenter.var"#57#59"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool, passthrough::Bool, capture_buffer::IOBuffer)
@ IOCapture ~/.julia/packages/IOCapture/Rzdxd/src/IOCapture.jl:158
[31] runner(::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:752
|
../../../.julia/packages/Documenter/CJeWX/src/utilities/utilities.jl#L44
failed to run `@example` block in src/resource_shortest_path.md:39-53
```@example resource_shortest_path
W = [1.0]
cost_list = [[0], [0], [10], [0], [0]]
w = [0.0 for i in 1:nb_vertices, j in 1:nb_vertices, k in 1:1]
for ((i, j), c) in zip(edge_list, cost_list)
w[i, j, :] = c
end
graphplot(
graph;
node_color=:red,
nlabels=["$i" for i in 1:nb_vertices],
elabels=["d=$(d[e.src, e.dst]), w=$(w[e.src, e.dst, :])" for e in edges(graph)],
)
```
exception =
UndefVarError: `graphplot` not defined
Stacktrace:
[1] top-level scope
@ resource_shortest_path.md:47
[2] eval
@ ./boot.jl:385 [inlined]
[3] #58
@ ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:754 [inlined]
[4] cd(f::Documenter.var"#58#60"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[5] (::Documenter.var"#57#59"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:753
[6] (::IOCapture.var"#4#7"{DataType, Documenter.var"#57#59"{Documenter.Page, Module, Expr}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/Rzdxd/src/IOCapture.jl:161
[7] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:515
[8] with_logger
@ ./logging.jl:627 [inlined]
[9] capture(f::Documenter.var"#57#59"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool, passthrough::Bool, capture_buffer::IOBuffer)
@ IOCapture ~/.julia/packages/IOCapture/Rzdxd/src/IOCapture.jl:158
[10] runner(::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/CJeWX/src/expander_pipeline.jl:752
|
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, julia-actions/setup-julia@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache. To ignore, set input `ignore-no-cache: true`
|
This job failed
Loading