From 32105a7c90b866c0a2127f4c3c33d6b5cc18b835 Mon Sep 17 00:00:00 2001 From: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:59:08 +0100 Subject: [PATCH 1/4] Use Asciicast.jl to display console outpout --- docs/Project.toml | 1 + docs/make.jl | 5 ++++- docs/src/tutorials_template/tut_setup.md | 6 ++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index b8d5ad961..c084ec103 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,5 @@ [deps] +Asciicast = "2600d445-abca-43b9-92aa-ce144ac0b05b" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" diff --git a/docs/make.jl b/docs/make.jl index 1fb16e935..a3e71a6c0 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,6 +2,7 @@ using Documenter, DocumenterCitations using TrixiParticles using TrixiBase using PointNeighbors +using Asciicast: Asciicast # Get TrixiParticles.jl root directory trixiparticles_root_dir = dirname(@__DIR__) @@ -111,7 +112,9 @@ makedocs(sitename="TrixiParticles.jl", plugins=[bib], # Run doctests and check docs for the following modules modules=[TrixiParticles], - format=Documenter.HTML(), + format=Documenter.HTML(; + assets=Asciicast.assets(), + ), # Explicitly specify documentation structure pages=[ "Home" => "index.md", diff --git a/docs/src/tutorials_template/tut_setup.md b/docs/src/tutorials_template/tut_setup.md index 99873dcdf..ad2de4521 100644 --- a/docs/src/tutorials_template/tut_setup.md +++ b/docs/src/tutorials_template/tut_setup.md @@ -208,9 +208,8 @@ respective simulation. You can find both approaches in our [example files](@ref examples). Here, we just use the method with the default parameters, and only disable `save_everystep` to avoid expensive saving of the solution in every time step. -```@example tut_setup +```@cast tut_setup; width=100, height=50, delay=0.25 sol = solve(ode, RDPK3SpFSAL35(), save_everystep=false, callback=callbacks); -nothing # hide ``` See [Visualization](@ref) for how to visualize the final solution. @@ -315,8 +314,7 @@ In order to use our kernel in a pre-defined example file, we can use the functio The following will run the example simulation `examples/fluid/hydrostatic_water_column_2d.jl` with our custom kernel and the corresponding smoothing length. -```@example tut_setup +```@cast tut_setup; width=100, height=50, delay=0.1 trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), smoothing_kernel=MyGaussianKernel(), smoothing_length=smoothing_length_gauss); -nothing # hide ``` From a2053b17168246020403aeea4ba34edf7b660554 Mon Sep 17 00:00:00 2001 From: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:12:11 +0100 Subject: [PATCH 2/4] Add compat for Asciicast.jl --- docs/Project.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Project.toml b/docs/Project.toml index c084ec103..2cffb816f 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -6,8 +6,10 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PointNeighbors = "1c4d5385-0a27-49de-8e2c-43b175c8985c" TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284" +TrixiParticles = "66699cd8-9c01-4e9d-a059-b96c86d16b3a" [compat] +Asciicast = "0.1.2" Documenter = "1" DocumenterCitations = "1" OrdinaryDiffEq = "6" From a515a3fd900612a6f8bfbeebf548489887db73cb Mon Sep 17 00:00:00 2001 From: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:11:33 +0100 Subject: [PATCH 3/4] Fix incorrect smoothing length --- docs/src/tutorials_template/tut_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/tutorials_template/tut_setup.md b/docs/src/tutorials_template/tut_setup.md index ad2de4521..a6c52e800 100644 --- a/docs/src/tutorials_template/tut_setup.md +++ b/docs/src/tutorials_template/tut_setup.md @@ -316,5 +316,5 @@ The following will run the example simulation smoothing length. ```@cast tut_setup; width=100, height=50, delay=0.1 trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - smoothing_kernel=MyGaussianKernel(), smoothing_length=smoothing_length_gauss); + smoothing_kernel=MyGaussianKernel()); ``` From c5ea9900d038ef80ed1e0c5e0610f53f64cd22f3 Mon Sep 17 00:00:00 2001 From: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:13:36 +0100 Subject: [PATCH 4/4] Reformat code --- docs/make.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index a3e71a6c0..b12f03b67 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -112,9 +112,7 @@ makedocs(sitename="TrixiParticles.jl", plugins=[bib], # Run doctests and check docs for the following modules modules=[TrixiParticles], - format=Documenter.HTML(; - assets=Asciicast.assets(), - ), + format=Documenter.HTML(; assets=Asciicast.assets()), # Explicitly specify documentation structure pages=[ "Home" => "index.md",