Skip to content

Commit

Permalink
add runtests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Dec 5, 2024
1 parent ec25f88 commit 0c29f09
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Stipple
using Stipple.ReactiveTools

# testing can be down without StippleUI, it only breaks rendering which we don't test
# using StippleUI

using StippleMakie

Stipple.enable_model_storage(false)

# ------------------------------------------------------------------------------------------------

# if required set a different port, url or proxy_port for Makie's websocket communication, e.g.
# otherwise, Genie's settings are applied for listen_url and proxy_url and Makie's (Bonito's) settings are applied for the ports
configure_makie_server!(listen_port = rand(8081:8999))

@app MakieDemo begin
@out fig1 = MakieFigure()
@out fig2 = MakieFigure()

@onchange isready begin
init_makiefigures(__model__)
# Wait until plots are ready to be written to
# sleep(0.3)
# Makie.scatter(fig1.fig[1, 1], (0:4).^3)
# Makie.heatmap(fig2.fig[1, 1], rand(5, 5))
# Makie.scatter(fig2.fig[1, 2], (0:4).^3)
end
end


UI::ParsedHTMLString = column(style = "height: 80vh; width: 98vw", [
h4("MakiePlot 1")
cell(col = 4, class = "full-width", makie_figure(:fig1))
h4("MakiePlot 2")
cell(col = 4, class = "full-width", makie_figure(:fig2))
])

ui() = UI

model = @init MakieDemo
html!(ui, layout = Stipple.ReactiveTools.DEFAULT_LAYOUT(head_content = [makie_dom(model)]), model = model, context = @__MODULE__)

model.isready[] = true

nothing

2 comments on commit 0c29f09

@hhaensel
Copy link
Member Author

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 updated: JuliaRegistries/General/120711

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.0 -m "<description of version>" 0c29f0971f0475fc2639fddb06db8ae858c0af81
git push origin v0.1.0

Please sign in to comment.