From 22ff75bf20588f8b570b88c9ad07f5489eb35613 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 May 2022 22:03:05 +0200 Subject: [PATCH] CompatHelper: bump compat for Turing to 0.21 for package test, (keep existing compat) (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CompatHelper: bump compat for Turing to 0.21 for package test, (keep existing compat) * Update Project.toml * Update Project.toml * Update Project.toml * Update Project.toml * Fixed issues * What's my name Co-authored-by: CompatHelper Julia Co-authored-by: Théo Galy-Fajou --- Project.toml | 8 ++++---- src/Turkie.jl | 2 +- src/live_sampling/online_stats_plots.jl | 18 +++++++++--------- test/Project.toml | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Project.toml b/Project.toml index 3a19244..85867f6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Turkie" uuid = "8156cc02-0533-41cd-9345-13411ebe105f" -authors = ["Theo Galy-Fajou and contributors"] -version = "0.1.11" +authors = ["Théo Galy-Fajou and contributors"] +version = "0.1.12" [deps] ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" @@ -17,7 +17,7 @@ ColorSchemes = "3" Colors = "0.12" KernelDensity = "0.6" MCMCChains = "4, 5" -Makie = "0.15, 0.16" +Makie = "0.15, 0.16, 0.17" OnlineStats = "1.5" -Turing = "0.20" +Turing = "0.20, 0.21" julia = "1.6" diff --git a/src/Turkie.jl b/src/Turkie.jl index b0449a3..86e7c4e 100644 --- a/src/Turkie.jl +++ b/src/Turkie.jl @@ -1,6 +1,6 @@ module Turkie -using Makie: Makie, Figure, Axis, Point2f0 +using Makie: Makie, Figure, Axis, Point2f using Makie: barplot!, lines!, scatter! # Plotting tools using Makie: Observable, lift, on # Observable tools using Makie: recordframe! # Recording tools diff --git a/src/live_sampling/online_stats_plots.jl b/src/live_sampling/online_stats_plots.jl index d3d0f11..b3c33a3 100644 --- a/src/live_sampling/online_stats_plots.jl +++ b/src/live_sampling/online_stats_plots.jl @@ -6,7 +6,7 @@ function onlineplot!(fig::Figure, axis_dict::AbstractDict, stats::AbstractVector limits!(axis_dict[(variable, stat)], 0.0, 10.0, -1.0, 1.0) stats_dict[(variable, stat)] = [] onlineplot!(axis_dict[(variable, stat)], stat, stats_dict[(variable, stat)], iter, data[variable], data[:iter], i, j) - tight_ticklabel_spacing!(axis_dict[(variable, stat)]) + # tight_ticklabel_spacing!(axis_dict[(variable, stat)]) end end @@ -47,8 +47,8 @@ function onlineplot!(axis, stat::T, stats, iter, data, iterations, i, j) where { end push!(stats, statvals) # Pass this observable to create points to pass to Makie - statpoints = map!(Observable(Point2f0.([0], [0])), statvals) do v - Point2f0.(value(iterations[]), value(v)) + statpoints = map!(Observable(Point2f.([0], [0])), statvals) do v + Point2f.(value(iterations[]), value(v)) end lines!(axis, statpoints, color = std_colors[i], linewidth = 3.0) end @@ -60,8 +60,8 @@ function reset!(stats, stat::T) where {T<:OnlineStat} end function onlineplot!(axis, ::Val{:trace}, stats, iter, data, iterations, i, j) - trace = map!(Observable([Point2f0(0, 0)]), iter) do _ - Point2f0.(value(iterations[]), value(data[])) + trace = map!(Observable([Point2f(0, 0)]), iter) do _ + Point2f.(value(iterations[]), value(data[])) end lines!(axis, trace, color = std_colors[i]; linewidth = 3.0) end @@ -72,12 +72,12 @@ function onlineplot!(axis, stat::KHist, stats, iter, data, iterations, i, j) on(iter) do _ stat[] = fit!(stat[], last(value(data[]))) end - hist_vals = Observable(Point2f0.(collect(range(0f0, 1f0, length=nbins)), zeros(Float32, nbins))) + hist_vals = Observable(Point2f.(collect(range(0f0, 1f0, length=nbins)), zeros(Float32, nbins))) push!(stats, stat) on(stat) do h edges, weights = OnlineStats.xy(h) weights = nobs(h) > 1 ? weights / OnlineStats.area(h) : weights - hist_vals[] = Point2f0.(edges, weights) + hist_vals[] = Point2f.(edges, weights) end push!(stats, hist_vals) barplot!(axis, hist_vals; color=std_colors[i]) @@ -86,7 +86,7 @@ end function reset!(stats, stat::KHist) nbins = stat.k stats[1].val = KHist(nbins, Float32) - stats[2].val = Point2f0.(collect(range(0f0, 1f0, length=nbins)), zeros(Float32, nbins)) + stats[2].val = Point2f.(collect(range(0f0, 1f0, length=nbins)), zeros(Float32, nbins)) end function expand_extrema(xs) @@ -142,7 +142,7 @@ function onlineplot!(axis, stat::AutoCov, stats, iter, data, iterations, i, j) value(s) end push!(stats, statvals) - scatter!(axis, Point2f0.([0.0, b], [-0.1, 1.0]), markersize = 0.0, color = RGBA(0.0, 0.0, 0.0, 0.0)) # Invisible points to keep limits fixed + scatter!(axis, Point2f.([0.0, b], [-0.1, 1.0]), markersize = 0.0, color = RGBA(0.0, 0.0, 0.0, 0.0)) # Invisible points to keep limits fixed lines!(axis, 0:b, statvals, color = std_colors[i], linewidth = 3.0) end diff --git a/test/Project.toml b/test/Project.toml index 4c14f7c..3b41857 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -6,7 +6,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" [compat] -CairoMakie = "0.6, 0.7" +CairoMakie = "0.6, 0.7, 0.8" ColorSchemes = "3" OnlineStats = "1" -Turing = "0.20" +Turing = "0.20, 0.21"