diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..cabfc82 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,49 @@ +name: CI +on: + push: + branches: + - master + tags: ['*'] + pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.6' + - '1' # automatically expands to the latest stable 1.x release of Julia + os: + - ubuntu-latest + arch: + - x64 + steps: + - name: Install matplotlib + run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get install -y python3-matplotlib; fi + shell: bash + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-docdeploy@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.gitignore b/.gitignore index bf5b0c9..b13f4e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,15 @@ +# Files generated by invoking Julia with --code-coverage +*.jl.cov +*.jl.*.cov + +# Files generated by invoking Julia with --track-allocation *.jl.mem + + + +/Manifest.toml +/docs/Manifest.toml +/docs/build/ +/docs/site/ +/.vscode + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a58c936..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: julia - -os: - - linux - -julia: - - 1.6 - - 1.8 - -notifications: - email: false - -#script: # the default script is equivalent to the following -# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi -# - julia -e 'Pkg.clone(pwd()); Pkg.build("OpenStreetMapX"); Pkg.test("OpenStreetMapX"; coverage=true)'; - -after_success: - - julia -e 'using Pkg; cd(Pkg.dir("OpenStreetMapX")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; -# - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("OpenStreetMapX")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; - -jobs: - include: - - stage: "Documentation" - julia: 1.6 - os: linux - script: - - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); - Pkg.develop(PackageSpec(path=pwd()))' - - julia --project=docs/ docs/make.jl - after_success: skip diff --git a/Project.toml b/Project.toml index a114b75..5dcc21f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OpenStreetMapX" uuid = "86cd37e6-c0ff-550b-95fe-21d72c8d4fc9" authors = ["Przemyslaw Szufel ", "Bartosz Pankratz ", "Anna Szczurek ", "Bogumil Kaminski ", "Pawel Pralat "] -version = "0.3.3" +version = "0.3.4" [deps] CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" diff --git a/docs/src/reference.md b/docs/src/reference.md index 3d8fe80..d35da8b 100644 --- a/docs/src/reference.md +++ b/docs/src/reference.md @@ -32,7 +32,7 @@ latlon Routing operations ------------------ ```@docs -generate_point_in_bounds(::MapData) +generate_point_in_bounds point_to_nodes(::Tuple{Float64,Float64}, ::MapData) point_to_nodes(::LLA, ::MapData) shortest_route diff --git a/src/routing.jl b/src/routing.jl index 495b325..96a86c4 100644 --- a/src/routing.jl +++ b/src/routing.jl @@ -35,7 +35,7 @@ end """ For Each Feature Find the Nearest Graph Node ### """ -function features_to_graph(m::MapData, features::Dict{Int,Tuple{String,String}}) where T<:(Union{OpenStreetMapX.ENU,OpenStreetMapX.ECEF}) +function features_to_graph(m::MapData, features::Dict{Int,Tuple{String,String}}) features_to_nodes = Dict{Int,Int}() sizehint!(features_to_nodes,length(features)) for (key,value) in features