Skip to content

Commit cbb664c

Browse files
Add comprehensive documentation with Documenter.jl
This PR adds a complete documentation infrastructure for DiffEqBase.jl: ## Documentation Structure - Set up Documenter.jl with proper configuration - Created comprehensive documentation pages for all interfaces - Added API reference documentation for public functions ## Enhanced Docstrings - Added detailed docstrings for `Tableau` and `ODERKTableau` types - Documented `DECostFunction` abstract type - Enhanced `AbstractParameterizedFunction` documentation - Added comprehensive docs for `ConvergenceSetup` - Documented `SensitivityADPassThrough` algorithm - Added docstrings for `KeywordArgError`, `KeywordArgWarn`, and `KeywordArgSilent` ## Documentation Pages Created ### API Reference - Callbacks interface documentation - Integrator interface documentation - Statistics utilities documentation - General utilities documentation - Tableau types documentation - Internal functions documentation ### Interface Documentation - Problem interface guide - Solution interface guide - Algorithm interface guide - Function interface guide with examples ## CI/CD - Added GitHub Actions workflow for automatic documentation building and deployment The documentation provides clear explanations, usage examples, and cross-references to help users understand and effectively use DiffEqBase.jl's functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 465e9ce commit cbb664c

File tree

16 files changed

+865
-8
lines changed

16 files changed

+865
-8
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: julia-actions/setup-julia@v2
16+
with:
17+
version: '1'
18+
- uses: julia-actions/cache@v2
19+
- name: Install dependencies
20+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
21+
- name: Build and deploy
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
25+
run: julia --project=docs/ docs/make.jl

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

docs/make.jl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using Documenter
2+
using DiffEqBase
3+
4+
DocMeta.setdocmeta!(DiffEqBase, :DocTestSetup, :(using DiffEqBase); recursive = true)
5+
6+
makedocs(;
7+
modules = [DiffEqBase],
8+
sitename = "DiffEqBase.jl",
9+
authors = "Christopher Rackauckas et al.",
10+
format = Documenter.HTML(;
11+
prettyurls = get(ENV, "CI", "false") == "true",
12+
canonical = "https://docs.sciml.ai/DiffEqBase/stable/",
13+
assets = String[],
14+
),
15+
pages = [
16+
"Home" => "index.md",
17+
"API Reference" => [
18+
"Callbacks" => "api/callbacks.md",
19+
"Integrator Interface" => "api/integrator.md",
20+
"Statistics" => "api/statistics.md",
21+
"Utilities" => "api/utilities.md",
22+
"Tableaus" => "api/tableaus.md",
23+
"Internal Functions" => "api/internal.md",
24+
],
25+
"Interfaces" => [
26+
"Problem Interface" => "interfaces/problems.md",
27+
"Solution Interface" => "interfaces/solutions.md",
28+
"Algorithm Interface" => "interfaces/algorithms.md",
29+
"Function Interface" => "interfaces/functions.md",
30+
],
31+
],
32+
)
33+
34+
deploydocs(;
35+
repo = "github.com/SciML/DiffEqBase.jl",
36+
devbranch = "master",
37+
push_preview = true,
38+
)

docs/src/api/callbacks.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Callbacks
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
Callbacks provide a way to affect the integrator during the solution process. They can be used to implement event handling, saving, and control mechanisms.
8+
9+
## Initialization and Finalization
10+
11+
```@docs
12+
initialize!
13+
finalize!
14+
```
15+
16+
## Callback Utilities
17+
18+
The callback system integrates with the SciMLBase callback infrastructure. The main types are:
19+
20+
- `CallbackSet`: A collection of callbacks
21+
- `ContinuousCallback`: Callbacks triggered by continuous conditions
22+
- `DiscreteCallback`: Callbacks triggered at discrete time points
23+
24+
These base types are defined in SciMLBase.jl and extended here with initialization and finalization methods.
25+
26+
## Helper Functions
27+
28+
```@autodocs
29+
Modules = [DiffEqBase]
30+
Pages = ["callbacks.jl"]
31+
Filter = t -> !occursin("initialize!", string(t)) && !occursin("finalize!", string(t))
32+
```

docs/src/api/integrator.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Integrator Interface
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
The integrator interface provides low-level control over the integration process. This allows for step-by-step integration and fine-grained control over the solution process.
8+
9+
## Integrator Accessors
10+
11+
These functions provide access to and modification of integrator state:
12+
13+
```@autodocs
14+
Modules = [DiffEqBase]
15+
Pages = ["integrator_accessors.jl"]
16+
```
17+
18+
## Internal Integration Methods
19+
20+
### Euler Method
21+
22+
The internal Euler method implementation for basic integration:
23+
24+
```@autodocs
25+
Modules = [DiffEqBase]
26+
Pages = ["internal_euler.jl"]
27+
```
28+
29+
### Interpolation
30+
31+
Internal interpolation utilities:
32+
33+
```@autodocs
34+
Modules = [DiffEqBase]
35+
Pages = ["internal_itp.jl"]
36+
```

docs/src/api/internal.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Internal Functions
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
Internal functions that are part of the public API but primarily used by solver packages.
8+
9+
## Solver Functions
10+
11+
```@autodocs
12+
Modules = [DiffEqBase]
13+
Pages = ["solve.jl"]
14+
```
15+
16+
## No-Recompile Utilities
17+
18+
Functions for avoiding recompilation:
19+
20+
```@autodocs
21+
Modules = [DiffEqBase]
22+
Pages = ["norecompile.jl"]
23+
```
24+
25+
## Cost Functions
26+
27+
```@docs
28+
DECostFunction
29+
```
30+
31+
## Parameterized Functions
32+
33+
```@docs
34+
AbstractParameterizedFunction
35+
```
36+
37+
## Convergence Setup
38+
39+
```@docs
40+
ConvergenceSetup
41+
```
42+
43+
## Sensitivity Analysis
44+
45+
```@docs
46+
SensitivityADPassThrough
47+
```
48+
49+
## Keyword Argument Handling
50+
51+
```@docs
52+
KeywordArgError
53+
KeywordArgWarn
54+
KeywordArgSilent
55+
```

docs/src/api/statistics.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Statistics
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
Statistical analysis utilities for differential equation solutions.
8+
9+
## Statistics Functions
10+
11+
```@autodocs
12+
Modules = [DiffEqBase]
13+
Pages = ["stats.jl"]
14+
```
15+
16+
## Residual Calculations
17+
18+
Functions for calculating residuals between solutions:
19+
20+
```@autodocs
21+
Modules = [DiffEqBase]
22+
Pages = ["calculate_residuals.jl"]
23+
```

docs/src/api/tableaus.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Tableaus
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
Butcher tableaus and related structures for Runge-Kutta methods.
8+
9+
## Tableau Types
10+
11+
```@docs
12+
Tableau
13+
ODERKTableau
14+
```
15+
16+
## Tableau Functions
17+
18+
```@autodocs
19+
Modules = [DiffEqBase]
20+
Pages = ["tableaus.jl"]
21+
Filter = t -> !(t in [Tableau, ODERKTableau])
22+
```

docs/src/api/utilities.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Utilities
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
General utility functions for working with differential equations.
8+
9+
## Utility Functions
10+
11+
```@autodocs
12+
Modules = [DiffEqBase]
13+
Pages = ["utils.jl"]
14+
```
15+
16+
## Common Defaults
17+
18+
Default values and configurations:
19+
20+
```@autodocs
21+
Modules = [DiffEqBase]
22+
Pages = ["common_defaults.jl"]
23+
```

docs/src/index.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# DiffEqBase.jl
2+
3+
```@meta
4+
CurrentModule = DiffEqBase
5+
```
6+
7+
## Overview
8+
9+
DiffEqBase.jl is the common foundation library for the DifferentialEquations.jl ecosystem. It provides the core types, interfaces, and functionality that are shared across all differential equation solvers in the SciML ecosystem.
10+
11+
## Features
12+
13+
- Common problem and solution types for ODEs, SDEs, DDEs, DAEs, and more
14+
- Unified integrator interface for all differential equation types
15+
- Callback system for event handling and control
16+
- Statistics and analysis utilities
17+
- Interpolation and tableau definitions
18+
- Integration with automatic differentiation and sensitivity analysis
19+
20+
## Installation
21+
22+
```julia
23+
using Pkg
24+
Pkg.add("DiffEqBase")
25+
```
26+
27+
## Getting Started
28+
29+
DiffEqBase.jl is typically used as a dependency by other packages in the DifferentialEquations.jl ecosystem. However, you can use it directly for low-level operations:
30+
31+
```julia
32+
using DiffEqBase
33+
34+
# Most functionality is re-exported from SciMLBase
35+
# and used through higher-level packages
36+
```
37+
38+
## Main Components
39+
40+
### Problems and Solutions
41+
The package defines abstract types and interfaces for various differential equation problems and their solutions.
42+
43+
### Integrators
44+
Low-level integrator interface for step-by-step integration control.
45+
46+
### Callbacks
47+
Event handling system for modifying solutions during integration.
48+
49+
### Utilities
50+
Various utility functions for working with differential equations.
51+
52+
## Package Ecosystem
53+
54+
DiffEqBase.jl is part of the larger SciML ecosystem:
55+
56+
- **SciMLBase.jl**: Core types and interfaces
57+
- **OrdinaryDiffEq.jl**: ODE solvers
58+
- **StochasticDiffEq.jl**: SDE solvers
59+
- **DelayDiffEq.jl**: DDE solvers
60+
- **DifferentialEquations.jl**: Meta-package
61+
62+
## Index
63+
64+
```@index
65+
```

0 commit comments

Comments
 (0)