Skip to content

Commit

Permalink
CompatHelper: bump compat for Turing to 0.21 for package test, (keep …
Browse files Browse the repository at this point in the history
…existing compat) (#48)

* 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 <[email protected]>
Co-authored-by: Théo Galy-Fajou <[email protected]>
  • Loading branch information
3 people authored May 7, 2022
1 parent 9126631 commit 22ff75b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Turkie"
uuid = "8156cc02-0533-41cd-9345-13411ebe105f"
authors = ["Theo Galy-Fajou <[email protected]> and contributors"]
version = "0.1.11"
authors = ["Théo Galy-Fajou <[email protected]> and contributors"]
version = "0.1.12"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand All @@ -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"
2 changes: 1 addition & 1 deletion src/Turkie.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 9 additions & 9 deletions src/live_sampling/online_stats_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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])
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

2 comments on commit 22ff75b

@theogf
Copy link
Owner

@theogf theogf commented on 22ff75b May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/59877

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.12 -m "<description of version>" 22ff75bf20588f8b570b88c9ad07f5489eb35613
git push origin v0.1.12

Please sign in to comment.