commit 18a4e925ce2cdf47027206aa5821f339ab1aa4f0
parent ce48aba596ef849c5d3e27c4653d28b1e8d524b0
Author: Erik Loualiche <[email protected]>
Date: Tue, 20 May 2025 20:18:43 -0500
docstrings + documenter
Diffstat:
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/docs/make.jl b/docs/make.jl
@@ -11,6 +11,10 @@ using Documenter
using DocumenterVitepress
# --
+DocMeta.setdocmeta!(BazerData, :DocTestSetup, :(using BazerData);
+ recursive=true)
+
+# --
makedocs(
format = Documenter.HTML(
size_threshold = 512_000, # KiB — raise above your largest file
diff --git a/src/TimeShift.jl b/src/TimeShift.jl
@@ -48,10 +48,8 @@ backward in time by a specified amount `n`.
- If `n` has a type that doesn't match the difference type of `t_vec`
# Examples
-```@example
-x = [1, 2, 3]
-t = [1, 2, 3]
-tlag(x, t, n = 1)
+```jldoctest
+julia> tlag([1, 2, 3], [1, 2, 3], n = 1)
3-element Vector{Union{Missing, Int64}}:
missing
1
@@ -151,10 +149,8 @@ forward in time by a specified amount `n`.
- If `n` has a type that doesn't match the difference type of `t_vec`
# Examples
-```@example
-x = [1, 2, 3]
-t = [8, 9, 10]
-tlead(x, t, n = 1)
+```jldoctest
+julia> tlead([1, 2, 3], [8, 9, 10], n = 1)
3-element Vector{Union{Missing, Int64}}:
2
3
@@ -244,16 +240,14 @@ by a specified amount `n`. Acts as a unified interface to `tlag` and `tlead`.
- If `n` is not specified, issues a warning and defaults to a lag operation
# Examples
-```@example
-x = [1, 2, 3];
-t = [-3, -2, -1];
-tshift(x, t, n = 1)
+```jldoctest
+julia> tshift([1, 2, 3], [-3, -2, -1], n = 1)
3-element Vector{Union{Missing, Int64}}:
missing
1
2
-tshift(x, t, n = -1)
+julia> tshift([1, 2, 3], [-3, -2, -1], n = -1)
3-element Vector{Union{Missing, Int64}}:
2
3