diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f379e68ad..af2fcc514 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,5 @@ jobs: # uncomment after 2.0 # - uses: julia-actions/julia-runtest@latest - uses: julia-actions/julia-uploadcodecov@latest - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} if: ${{ matrix.julia-version == '1' && matrix.os =='ubuntu-latest' }} diff --git a/README.md b/README.md index cdb63f269..2ebcf8235 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # LightGraphs -[![Build Status](https://travis-ci.org/JuliaGraphs/LightGraphs.jl.svg?branch=master)](https://travis-ci.org/JuliaGraphs/LightGraphs.jl) +[![Build Status](https://github.com/JuliaGraphs/LightGraphs.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/JuliaGraphs/LightGraphs.jl/actions/workflows/ci.yml?query=branch%3Amaster) [![codecov.io](http://codecov.io/github/JuliaGraphs/LightGraphs.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphs/LightGraphs.jl?branch=master) [![](https://img.shields.io/badge/docs-latest-blue.svg)](https://juliagraphs.github.io/LightGraphs.jl/latest) -[![Join the chat at https://gitter.im/JuliaGraphs/LightGraphs.jl](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JuliaGraphs/LightGraphs.jl) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.889971.svg)](https://doi.org/10.5281/zenodo.889971) LightGraphs offers both (a) a set of simple, concrete graph implementations -- `Graph` diff --git a/src/shortestpaths/bellman-ford.jl b/src/shortestpaths/bellman-ford.jl index 9b4d3e0cf..9dcce4a2c 100644 --- a/src/shortestpaths/bellman-ford.jl +++ b/src/shortestpaths/bellman-ford.jl @@ -110,7 +110,7 @@ will return a vector (indexed by destination vertex) of paths from source `v` to all other vertices. In addition, `enumerate_paths(state, v, d)` will return a vector representing the path from vertex `v` to vertex `d`. """ -function enumerate_paths(state::AbstractPathState, vs::Vector{<:Integer}) +function enumerate_paths(state::AbstractPathState, vs::AbstractVector{<:Integer}) parents = state.parents T = eltype(parents) @@ -131,6 +131,6 @@ function enumerate_paths(state::AbstractPathState, vs::Vector{<:Integer}) return all_paths end -enumerate_paths(state::AbstractPathState, v) = enumerate_paths(state, [v])[1] +enumerate_paths(state::AbstractPathState, v::Integer) = enumerate_paths(state, [v])[1] enumerate_paths(state::AbstractPathState) = enumerate_paths(state, [1:length(state.parents);]) diff --git a/test/shortestpaths/dijkstra.jl b/test/shortestpaths/dijkstra.jl index 43695597d..b1bb4945d 100644 --- a/test/shortestpaths/dijkstra.jl +++ b/test/shortestpaths/dijkstra.jl @@ -17,6 +17,9 @@ @test @inferred(enumerate_paths(z)) == enumerate_paths(y) @test @inferred(enumerate_paths(z))[4] == enumerate_paths(z, 4) == + # test that we can pass a range into enumerate_paths - previously this caused + # infinite recursion - see #1552 + enumerate_paths(z, 3:4)[2] == enumerate_paths(y, 4) == [2, 3, 4] end