From 9c278245154da22285a84dbe525bc01705effa57 Mon Sep 17 00:00:00 2001 From: Ivan Utkin Date: Sat, 25 Nov 2023 13:51:21 +0100 Subject: [PATCH] Make example self-contained --- docs/make.jl | 7 ------- src/Grids/cartesian_grid.jl | 5 ++++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 9a65d236..004ceb29 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,13 +3,6 @@ using FastIce push!(LOAD_PATH,"../src/") -const DOC_SETUP = quote - using FastIce - using FastIce.Grids -end - -DocMeta.setdocmeta!(FastIce, :DocTestSetup, DOC_SETUP; recursive=true) - makedocs( sitename = "FastIce", authors="Ludovic Räss, Ivan Utkin and contributors", diff --git a/src/Grids/cartesian_grid.jl b/src/Grids/cartesian_grid.jl index 3f13220a..3d053f31 100644 --- a/src/Grids/cartesian_grid.jl +++ b/src/Grids/cartesian_grid.jl @@ -1,9 +1,12 @@ """ Rectilinear grid with uniform spacing. -# Examples +Examples +======== ```jldoctest +julia> using FastIce.Grids + julia> grid = CartesianGrid(origin=(0.0,0.0), extent=(1.0,1.0), size=(4,4)) 2D 4×4 CartesianGrid{Float64}: x ∈ [0.0–1.0]; Δx = 0.25