Skip to content

Commit

Permalink
Bonito compat fixes in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov committed Jun 3, 2024
1 parent dfd8c08 commit a65757e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
20 changes: 10 additions & 10 deletions examples/colorcentermodularcluster/3_makie_interactive.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Base.Threads
using WGLMakie
WGLMakie.activate!()
using JSServe
using Bonito
using Markdown

include("setup.jl");

const custom_css = JSServe.DOM.style("ul {list-style: circle !important;}") # TODO remove after fix of bug in JSServe https://github.com/SimonDanisch/JSServe.jl/issues/178
const custom_css = Bonito.DOM.style("ul {list-style: circle !important;}") # TODO remove after fix of bug in Bonito https://github.com/SimonDanisch/Bonito.jl/issues/178

"""Run a simulation until all links in the cluster state are established,
then report time to completion and average link fidelity."""
Expand Down Expand Up @@ -118,7 +118,7 @@ landing = App() do
[See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster)
"""
return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content)
return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content)
end;

##
Expand Down Expand Up @@ -188,7 +188,7 @@ ensemble = App() do
[See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster)
"""
return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content)
return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content)
end;

##
Expand Down Expand Up @@ -325,7 +325,7 @@ singletraj = App() do
[See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster)
"""
return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content)
return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content)
end;

##
Expand Down Expand Up @@ -389,11 +389,11 @@ isdefined(Main, :server) && close(server);
port = parse(Int, get(ENV, "QS_COLORCENTERMODCLUSTER_PORT", "8888"))
interface = get(ENV, "QS_COLORCENTERMODCLUSTER_IP", "127.0.0.1")
proxy_url = get(ENV, "QS_COLORCENTERMODCLUSTER_PROXY", "")
server = JSServe.Server(interface, port; proxy_url);
JSServe.HTTPServer.start(server)
JSServe.route!(server, "/" => landing);
JSServe.route!(server, "/ensemble" => ensemble);
JSServe.route!(server, "/single-trajectory" => singletraj);
server = Bonito.Server(interface, port; proxy_url);
Bonito.HTTPServer.start(server)
Bonito.route!(server, "/" => landing);
Bonito.route!(server, "/ensemble" => ensemble);
Bonito.route!(server, "/single-trajectory" => singletraj);

##

Expand Down
2 changes: 1 addition & 1 deletion examples/colorcentermodularcluster/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[compat]
JSServe = "2.2.7"
Bonito = "3.1"
2 changes: 1 addition & 1 deletion examples/congestionchain/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[compat]
JSServe = "2.2.7"
Bonito = "3.1"
3 changes: 3 additions & 0 deletions examples/simpleswitch/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
QuantumSavory = "2de2e421-972c-4cb5-a0c3-999c85908079"
ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[compat]
Bonito = "3.1"

0 comments on commit a65757e

Please sign in to comment.