Skip to content

Commit

Permalink
Update to Documenter 1.0 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jipolanco authored Sep 18, 2023
1 parent 8357a64 commit 1579f17
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
Documenter = "0.27.25"
Documenter = "1"
Makie = "0.19"

[extras]
Expand Down
18 changes: 8 additions & 10 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ using BSplineKit
using Documenter
using Literate

const MAKE_FAST = "--fast" in ARGS # skip some checks in makedocs

docmeta = quote
using BSplineKit
using Random: Random
Random.seed!(42)
end

# This is to make sure that doctests in docstrings are executed correctly.
DocMeta.setdocmeta!(BSplineKit, :DocTestSetup, docmeta; recursive=true)
DocMeta.setdocmeta!(BSplineKit.BandedTensors, :DocTestSetup,
:(using BSplineKit.BandedTensors); recursive=true)
DocMeta.setdocmeta!(
BSplineKit, :DocTestSetup, docmeta;
recursive = true,
)
DocMeta.setdocmeta!(
BSplineKit.BandedTensors, :DocTestSetup, :(using BSplineKit.BandedTensors);
recursive = true,
)

doctest(BSplineKit; fix = false)

with_checks = !MAKE_FAST

# Generate examples using Literate
# See https://github.com/fredrikekre/Literate.jl/blob/master/docs/make.jl
example_dir = joinpath(@__DIR__, "..", "examples")
Expand Down Expand Up @@ -59,9 +60,6 @@ end
"Internals" => ["diffops.md"],
],
],
doctest = with_checks,
linkcheck = with_checks,
checkdocs = :all,
)

# Documenter can also automatically deploy documentation to gh-pages.
Expand Down
5 changes: 3 additions & 2 deletions examples/heat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ params_col = (

tspan = (0.0, 10.0)
prob = ODEProblem(heat_rhs!, u_init, tspan, params_col)
prob = ODEProblem{true}(heat_rhs!, u_init, tspan, params_col)
sol_collocation = solve(prob, Tsit5(); saveat = 0.5)

function plot_heat_solution(sol, R)
Expand Down Expand Up @@ -395,7 +396,7 @@ params_gal = (
L = Rgal,
)

prob = ODEProblem(heat_rhs!, u_init, tspan, params_gal)
prob = ODEProblem{true}(heat_rhs!, u_init, tspan, params_gal)
sol_galerkin = solve(prob, Tsit5(); saveat = 0.5)

plot_heat_solution(sol_galerkin, R)
Expand Down Expand Up @@ -445,7 +446,7 @@ hi_res = let
Acol = collocation_matrix(R, xcol)
Lcol = ν .* collocation_matrix(R, xcol, Derivative(2))
params_col = (A = lu(Acol), L = Lcol)
prob = ODEProblem(heat_rhs!, u_init, tspan, params_col)
prob = ODEProblem{true}(heat_rhs!, u_init, tspan, params_col)
sol = solve(prob, Tsit5(); saveat = 0.5)
(; R, sol)
end
Expand Down

0 comments on commit 1579f17

Please sign in to comment.