Skip to content

Commit

Permalink
Merge pull request #190 from MakieOrg/hw/test_lts_pre
Browse files Browse the repository at this point in the history
test on lts and pre
  • Loading branch information
hexaeder authored Oct 16, 2024
2 parents 85d4a58 + 444c2ec commit c1a2d7d
Show file tree
Hide file tree
Showing 73 changed files with 33 additions and 22 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1'
- 'lts' # long-term support release
- '1' # latest stable 1.x release
- 'pre' # latest stable prerelease
os:
- ubuntu-latest
arch:
Expand Down
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ DataStructures = "0.17, 0.18"
GeometryBasics = "0.4"
Graphs = "1.4"
Makie = "0.21"
NetworkLayout = "0.4.3"
NetworkLayout = "0.4.7"
PolynomialRoots = "1"
SimpleTraits = "0.9"
StableRNGs = "1.0.2"
StaticArrays = "1.2"
julia = "1"

Expand All @@ -30,7 +31,8 @@ CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["CairoMakie", "FileIO", "Literate", "ReferenceTests", "Test"]
test = ["CairoMakie", "FileIO", "Literate", "ReferenceTests", "StableRNGs", "Test"]
Binary file modified assets/interactions.jl-01.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/interactions.jl-02.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/interactions.jl-03.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/interactions.jl-04.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/interactions.jl-05.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/interactions.jl-06.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/plots.jl-01.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/plots.jl-02.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/plots.jl-03.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/plots.jl-04.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/plots.jl-05.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/plots.jl-06.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/plots.jl-07.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/plots.jl-08.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/plots.jl-09.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/plots.jl-10.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/plots.jl-11.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/plots.jl-12.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/plots.jl-13.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/plots.jl-14.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/plots.jl-17.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/reftests.jl-01.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/reftests.jl-02.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/reftests.jl-03.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/reftests.jl-04.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/reftests.jl-05.png
Binary file modified assets/reftests.jl-06.png
Binary file modified assets/reftests.jl-07.png
Binary file modified assets/reftests.jl-08.png
Binary file modified assets/reftests.jl-09.png
Binary file modified assets/reftests.jl-10.png
Binary file modified assets/reftests.jl-11.png
Binary file modified assets/reftests.jl-12.png
Binary file modified assets/reftests.jl-13.png
Binary file modified assets/reftests.jl-14.png
Binary file modified assets/reftests.jl-15.png
Binary file modified assets/reftests.jl-16.png
Binary file modified assets/reftests.jl-17.png
Binary file modified assets/reftests.jl-18.png
Binary file modified assets/reftests.jl-19.png
Binary file modified assets/reftests.jl-20.png
Binary file modified assets/reftests.jl-21.png
Binary file modified assets/reftests.jl-22.png
Binary file modified assets/reftests.jl-23.png
Binary file modified assets/reftests.jl-24.png
Binary file modified assets/reftests.jl-25.png
Binary file modified assets/reftests.jl-26.png
Binary file modified assets/reftests.jl-27.png
Binary file modified assets/reftests.jl-28.png
Binary file modified assets/reftests.jl-29.png
Binary file modified assets/reftests.jl-30.png
Binary file modified assets/reftests.jl-31.png
Binary file modified assets/reftests.jl-32.png
Binary file modified assets/reftests.jl-33.png
Binary file modified assets/reftests.jl-34.png
Binary file modified assets/reftests.jl-35.png
Binary file modified assets/reftests.jl-36.png
Binary file modified assets/reftests.jl-37.png
Binary file modified assets/reftests.jl-38.png
Binary file modified assets/reftests.jl-39.png
Binary file modified assets/reftests.jl-40.png
Binary file modified assets/reftests.jl-41.png
Binary file modified assets/reftests.jl-42.png
Binary file modified assets/reftests.jl-43.png
5 changes: 4 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name = "GraphMakie docs"

[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Expand All @@ -15,6 +17,7 @@ NetworkDynamics = "22e9dc34-2a0d-11e9-0de0-8588d035468b"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
RegistryInstances = "2792f1a3-b283-48e8-9a74-f99dce5104f3"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[compat]
Expand All @@ -31,7 +34,7 @@ Literate = "2"
MLJ = "0.20"
Makie = "0.21"
NetworkDynamics = "0.8.3"
NetworkLayout = "0.4"
NetworkLayout = "0.4.7"
OrdinaryDiffEq = "6"
RegistryInstances = "0.1"
WGLMakie = "0.10"
21 changes: 9 additions & 12 deletions docs/examples/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CairoMakie.activate!(type="png") # hide
set_theme!(size=(800, 400)) #hide
using GraphMakie
using Graphs
using StableRNGs

g = wheel_graph(10)
f, ax, p = graphplot(g)
Expand Down Expand Up @@ -82,7 +83,7 @@ hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
# This is not very nice, lets change the offsets based on the `node_positions`

offsets = 0.15 * (p[:node_pos][] .- p[:node_pos][][1])
offsets[1] = Point2f(0, 0.3)
offsets[1] = Point2f(0.1, 0.3)
p.nlabels_offset[] = offsets
autolimits!(ax)
@save_reference f #hide
Expand All @@ -98,18 +99,18 @@ f, ax, p = graphplot(g;
xlims!(ax, (-1.5, 1.3))
ylims!(ax, (-2.3, 0.7))
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
f #hide
@save_reference f #hide

# ## Adding Edge Labels
g = barabasi_albert(6, 2; seed=42)
g = barabasi_albert(6, 2; rng=StableRNGs.StableRNG(1))

labels = repr.(1:ne(g))

f, ax, p = graphplot(g, elabels=labels,
elabels_color=[:black for i in 1:ne(g)],
edge_color=[:black for i in 1:ne(g)])
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
@save_reference f #hide
f #hide

#=
The position of the edge labels is determined by several plot arguments.
Expand All @@ -118,15 +119,15 @@ All possible arguments are described in the docs of the [`graphplot`](@ref) func
By default, each label is placed in the middle of the edge and rotated to match the edge rotation.
The rotation for each label can be overwritten with the `elabels_rotation` argument.
=#
p.elabels_rotation[] = Dict(i => i == 5 ? 0.0 : Makie.automatic for i in 1:ne(g))
p.elabels_rotation[] = Dict(i => i == 2 ? 0.0 : Makie.automatic for i in 1:ne(g))
nothing #hide

#=
One can shift the label along the edge with the `elabels_shift` argument and determine the distance
in pixels using the `elabels_distance` argument.
=#

p.elabels_side[] = Dict(i => :right for i in [1,2,8,6])
p.elabels_side[] = Dict(i => :right for i in [6,7])
p.elabels_offset[] = [Point2f(0.0, 0.0) for i in 1:ne(g)]
p.elabels_offset[][5] = Point2f(-0.4,0)
p.elabels_offset[] = p.elabels_offset[]
Expand Down Expand Up @@ -181,7 +182,7 @@ hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()

# It is possible to change the appearance using the `selfedge_` attributes:
p.selfedge_size = Dict(1=>Makie.automatic, 4=>3.6, 6=>0.5) #idx as in edges(g)
p.selfedge_direction = Point2f(0.3, 1)
p.selfedge_direction = Point2f(-0.25, -0.3)
p.selfedge_width = Any[Makie.automatic for i in 1:ne(g)]
p.selfedge_width[][4] = 0.6*π; notify(p.selfedge_width)
autolimits!(ax)
Expand Down Expand Up @@ -218,7 +219,7 @@ It is also possible to specify the distance on a per edge base:
g = complete_digraph(3)
distances = collect(0.05:0.05:ne(g)*0.05)
elabels = "d = ".* repr.(round.(distances, digits=2))
f, ax, p = graphplot(g; curve_distance=distances, elabels, arrow_size=20)
f, ax, p = graphplot(g; curve_distance=distances, elabels, arrow_size=20, elabels_distance=15)
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
@save_reference f #hide

Expand Down Expand Up @@ -307,12 +308,8 @@ experimental. Feel free to file an issue if there are any problems.
=#
set_theme!(size=(800, 800)) #hide
g = smallgraph(:cubical)
elabels_shift = [0.5 for i in 1:ne(g)]
elabels_shift[[2,7,8,9]] .= 0.3
elabels_shift[10] = 0.25
f, ax, p = graphplot(g; layout=Spring(dim=3, seed=5),
elabels="Edge ".*repr.(1:ne(g)),
elabels_shift,
arrow_show=true,
arrow_shift=0.9,
arrow_size=15)
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/reftests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ graphplot(fig[1,2],
)
hidedecorations!(current_axis())

graphplot(fig[2,1],
graphplot(fig[2,1], layout=Stress(),
DiGraph([Edge(1 => 2), Edge(2 => 3), Edge(3=>4), Edge(4=>1)]),
edge_attr = (; linestyle = Linestyle([0.5, 1.0, 1.5, 2.5])),
edge_plottype = :beziersegments,
)
hidedecorations!(current_axis())
fig
@save_reference fig

# ## Self loop with waypoints
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/scenegraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
## This is a utility function for the label, to avoid
## the cruft that comes from excessive type printing.
label_str(::Scene) = "Scene"
label_str(::Makie.Combined{F, T}) where {F, T} = string(F) # get only the plot func, not the argument type
label_str(::Plot{F}) where {F} = string(F) # get only the plot func, not the argument type
nothing #hide


Expand Down
4 changes: 4 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ using NetworkDynamics
using LayeredLayouts
using Graphs
using RegistryInstances
using NetworkLayout
using StableRNGs

NetworkLayout.DEFAULT_RNG[] = StableRNG

DocMeta.setdocmeta!(GraphMakie, :DocTestSetup, :(using GraphMakie); recursive=true)

Expand Down
6 changes: 3 additions & 3 deletions test/referencetests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ end

# equal = ReferenceTests.psnr_equality()(load(old), load(new))
score = compare(load(old), load(new))
MEH = 48
GOOD = 200
MEH = 40
GOOD = 90

# basicially disable check on older julia versions
if VERSION < v"1.10"
if VERSION < v"1.11"
MEH = 0;
end

Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ using GraphMakie.NetworkLayout
using Makie.Colors
using StaticArrays
using Test
using StableRNGs

NetworkLayout.DEFAULT_RNG[] = StableRNG

include("beziercurves_test.jl")

Expand Down

0 comments on commit c1a2d7d

Please sign in to comment.