Skip to content

Commit

Permalink
update LTS - compat Plots v2 (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg authored Oct 13, 2024
1 parent 3924db3 commit 39bd50e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 25 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: ci

on:
push:
workflow_dispatch:
pull_request:
push:
branches: [master, v2]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
Expand All @@ -22,24 +28,39 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6' # lower declared julia compat in `Project.toml`
- '1.10' # lower declared julia compat in `Project.toml`
- '1'
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64]
include:
- os: ubuntu-latest
prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
with:
prefix: ${{ matrix.prefix }} # for `xvfb-run`
- name: Develop RecipesBase, RecipesPipeline, PlotsBase, Plots
env:
JULIA_PKG_PRECOMPILE_AUTO: 0
run: |
julia -e '
using Pkg
Pkg.add([
(; url="https://github.com/JuliaPlots/Plots.jl", subdir="RecipesBase", rev="v2"),
(; url="https://github.com/JuliaPlots/Plots.jl", subdir="RecipesPipeline", rev="v2"),
(; url="https://github.com/JuliaPlots/Plots.jl", subdir="PlotsBase", rev="v2"),
(; url="https://github.com/JuliaPlots/Plots.jl", rev="v2"),
])
Pkg.develop(; path=".")
'
- name: Test GraphRecipes
run: |
cmd=(julia --color=yes)
if [ "$RUNNER_OS" == "Linux" ]; then
cmd=(xvfb-run ${cmd[@]})
fi
echo ${cmd[@]}
${cmd[@]} -e 'using Pkg; Pkg.test("GraphRecipes"; coverage=true)'
Skip:
if: "contains(github.event.head_commit.message, '[skip ci]')"
Expand Down
14 changes: 7 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GraphRecipes"
uuid = "bd48cda9-67a9-57be-86fa-5b3c104eda73"
version = "0.5.13"
version = "1.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -17,16 +17,16 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
AbstractTrees = "0.3.1, 0.4"
GeometryTypes = "0.7.7, 0.8"
AbstractTrees = "0.4"
GeometryTypes = "0.8"
Graphs = "1.7"
Interpolations = "0.12.8, 0.13 - 0.14, 0.15"
NaNMath = "0.3.3, 1"
Interpolations = "0.13 - 0.15"
NaNMath = "1"
NetworkLayout = "0.4"
PlotUtils = "0.6.2, 1"
RecipesBase = "0.7, 0.8, 1"
RecipesBase = "1"
Statistics = "1"
julia = "1.6"
julia = "1.10"

[extras]
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
Expand Down
Binary file modified assets/julia_type_tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/readme_julia_logo_pun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 11 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ using Plots
using Test
using Gtk # for popup

import Plots: PlotsBase

isci() = get(ENV, "CI", "false") == "true"
itol(tol = nothing) = something(tol, isci() ? 1e-3 : 1e-5)

Expand Down Expand Up @@ -58,7 +60,7 @@ cd(joinpath(@__DIR__, "..", "assets")) do
end

@testset "README" begin
@plottest julia_logo_pun() "readme_julia_logo_pun.png" popup = !isci tol = itol()
@plottest julia_logo_pun() "readme_julia_logo_pun.png" popup = !isci() tol = itol()
end
end

Expand Down Expand Up @@ -112,16 +114,16 @@ end
@test GraphRecipes.directed_curve(0.0, 1.0, 0.0, 1.0, rng = rng) ==
GraphRecipes.directed_curve(0, 1, 0, 1, rng = rng)

@test GraphRecipes.isnothing(nothing) == Plots.isnothing(nothing)
@test GraphRecipes.isnothing(missing) == Plots.isnothing(missing)
@test GraphRecipes.isnothing(NaN) == Plots.isnothing(NaN)
@test GraphRecipes.isnothing(0) == Plots.isnothing(0)
@test GraphRecipes.isnothing(1) == Plots.isnothing(1)
@test GraphRecipes.isnothing(0.0) == Plots.isnothing(0.0)
@test GraphRecipes.isnothing(1.0) == Plots.isnothing(1.0)
@test GraphRecipes.isnothing(nothing) == PlotsBase.isnothing(nothing)
@test GraphRecipes.isnothing(missing) == PlotsBase.isnothing(missing)
@test GraphRecipes.isnothing(NaN) == PlotsBase.isnothing(NaN)
@test GraphRecipes.isnothing(0) == PlotsBase.isnothing(0)
@test GraphRecipes.isnothing(1) == PlotsBase.isnothing(1)
@test GraphRecipes.isnothing(0.0) == PlotsBase.isnothing(0.0)
@test GraphRecipes.isnothing(1.0) == PlotsBase.isnothing(1.0)

for (s, e) in [(rand(rng), rand(rng)) for i in 1:100]
@test GraphRecipes.partialcircle(s, e) == Plots.partialcircle(s, e)
@test GraphRecipes.partialcircle(s, e) == PlotsBase.partialcircle(s, e)
end

@testset "nearest_intersection" begin
Expand Down

0 comments on commit 39bd50e

Please sign in to comment.