Skip to content

Add StochasticDiffEq.jl API documentation #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import ODEProblemLibrary,
SDEProblemLibrary, DDEProblemLibrary, DAEProblemLibrary, BVProblemLibrary
using Sundials, DASKR

# Use development versions for API documentation
import Pkg
Pkg.develop("OrdinaryDiffEq")
Pkg.develop("StochasticDiffEq")

cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true)
cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)

Expand All @@ -28,6 +33,23 @@ if isdir(ordinartdiffeq_docs_path)
cp(common_first_steps_file, common_first_steps_dest, force=true)
end

# Copy StochasticDiffEq.jl documentation
stochasticdiffeq_docs_root = joinpath(dirname(pathof(StochasticDiffEq)), "..", "docs")
stochasticdiffeq_docs_path = joinpath(stochasticdiffeq_docs_root, "src")
if isdir(stochasticdiffeq_docs_path)
# Create the StochasticDiffEq API directory in the docs
stochastic_diffeq_dest = joinpath(@__DIR__, "src", "api", "stochasticdiffeq")
mkpath(dirname(stochastic_diffeq_dest))

# Copy all the docs from StochasticDiffEq.jl
cp(stochasticdiffeq_docs_path, stochastic_diffeq_dest, force=true)

# Copy the pages.jl file from StochasticDiffEq.jl
stochastic_diffeq_pages_dest = joinpath(@__DIR__, "stochasticdiffeq_pages.jl")
stochastic_diffeq_pages_file = joinpath(stochasticdiffeq_docs_root, "pages.jl")
cp(stochastic_diffeq_pages_file, stochastic_diffeq_pages_dest, force=true)
end

ENV["PLOTS_TEST"] = "true"
ENV["GKSwstype"] = "100"

Expand Down Expand Up @@ -96,6 +118,7 @@ makedocs(
"https://github.com/SciML/ColPrac/blob/master/README.md",
"https://github.com/SciML/DiffEqDevTools.jl/blob/master/src/ode_tableaus.jl",
"https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/BVProblemLibrary/src/BVProblemLibrary.jl",
"https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/DDEProblemLibrary/src/DDEProblemLibrary.jl",
],
doctest = false, clean = true,
warnonly = [:missing_docs, :docs_block],
Expand Down
28 changes: 28 additions & 0 deletions docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@ end

ordinary_diffeq_pages = transform_ordinarydiffeq_pages(pages)

# Load StochasticDiffEq pages - if available
stochastic_diffeq_pages_file = joinpath(@__DIR__, "stochasticdiffeq_pages.jl")
stochastic_diffeq_pages = []
if isfile(stochastic_diffeq_pages_file)
include(stochastic_diffeq_pages_file)

# Transform StochasticDiffEq pages to have the api/stochasticdiffeq prefix
function transform_stochasticdiffeq_pages(pages_array)
transformed = []
for page in pages_array
if isa(page, String)
push!(transformed, "api/stochasticdiffeq/" * page)
elseif isa(page, Pair)
key, value = page
if isa(value, String)
push!(transformed, key => "api/stochasticdiffeq/" * value)
elseif isa(value, Vector)
push!(transformed, key => transform_stochasticdiffeq_pages(value))
end
end
end
return transformed
end

stochastic_diffeq_pages = transform_stochasticdiffeq_pages(pages)
end

pages = Any["index.md",
"getting_started.md",
"Tutorials" => Any["tutorials/faster_ode_example.md",
Expand Down Expand Up @@ -94,4 +121,5 @@ pages = Any["index.md",
"External Solver APIs" => Any["api/sundials.md",
"api/daskr.md"],
"OrdinaryDiffEq.jl API" => ordinary_diffeq_pages,
"StochasticDiffEq.jl API" => stochastic_diffeq_pages,
"Extra Details" => Any["extras/timestepping.md"]]
Loading