Skip to content

Commit 8da4fa9

Browse files
committed
Only use larger terminal width on extension doctests
1 parent 0cdeeac commit 8da4fa9

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

docs/make.jl

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,34 @@ doctestfilters = [
2929
r"\s+\"created_at\" => .*", # ignore timestamps in doctests
3030
]
3131

32-
# Increase the terminal width from 80 to 100 chars to avoid column truncation
33-
withenv("COLUMNS" => 100) do
34-
makedocs(;
35-
modules=[
36-
InferenceObjects,
37-
Base.get_extension(InferenceObjects, :InferenceObjectsMCMCDiagnosticToolsExt),
38-
Base.get_extension(InferenceObjects, :InferenceObjectsPosteriorStatsExt),
39-
],
40-
authors="Seth Axen <[email protected]> and contributors",
41-
repo=Remotes.GitHub("arviz-devs", "InferenceObjects.jl"),
42-
sitename="InferenceObjects.jl",
43-
format=Documenter.HTML(;
44-
prettyurls=get(ENV, "CI", "false") == "true",
45-
canonical="https://arviz-devs.github.io/InferenceObjects.jl",
46-
edit_link="main",
47-
assets=String[],
48-
),
49-
pages=[
50-
"Home" => "index.md",
51-
"Dataset" => "dataset.md",
52-
"InferenceData" => "inference_data.md",
53-
"Extensions" => [
54-
"MCMCDiagnosticTools" => "extensions/mcmcdiagnostictools.md",
55-
"PosteriorStats" => "extensions/posteriorstats.md",
56-
],
32+
makedocs(;
33+
modules=[
34+
InferenceObjects,
35+
Base.get_extension(InferenceObjects, :InferenceObjectsMCMCDiagnosticToolsExt),
36+
Base.get_extension(InferenceObjects, :InferenceObjectsPosteriorStatsExt),
37+
],
38+
authors="Seth Axen <[email protected]> and contributors",
39+
repo=Remotes.GitHub("arviz-devs", "InferenceObjects.jl"),
40+
sitename="InferenceObjects.jl",
41+
format=Documenter.HTML(;
42+
prettyurls=get(ENV, "CI", "false") == "true",
43+
canonical="https://arviz-devs.github.io/InferenceObjects.jl",
44+
edit_link="main",
45+
assets=String[],
46+
),
47+
pages=[
48+
"Home" => "index.md",
49+
"Dataset" => "dataset.md",
50+
"InferenceData" => "inference_data.md",
51+
"Extensions" => [
52+
"MCMCDiagnosticTools" => "extensions/mcmcdiagnostictools.md",
53+
"PosteriorStats" => "extensions/posteriorstats.md",
5754
],
58-
doctestfilters=doctestfilters,
59-
warnonly=:missing_docs,
60-
plugins=[links],
61-
)
62-
end
55+
],
56+
doctestfilters=doctestfilters,
57+
warnonly=:missing_docs,
58+
plugins=[links],
59+
)
6360

6461
# run doctests on extensions
6562
function get_extension(mod::Module, name::Symbol)
@@ -77,7 +74,10 @@ for extended_pkg in (MCMCDiagnosticTools, PosteriorStats)
7774
@info "Running doctests for extension $(extension_name)"
7875
mod = get_extension(InferenceObjects, extension_name)
7976
DocMeta.setdocmeta!(mod, :DocTestSetup, :(using $(Symbol(extended_pkg))))
80-
doctest(mod; manual=false)
77+
# Increase the terminal width from 80 to 100 chars to avoid column truncation
78+
withenv("COLUMNS" => 100) do
79+
doctest(mod; manual=false)
80+
end
8181
end
8282

8383
deploydocs(;

0 commit comments

Comments
 (0)