diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 00000000..2f0fe283 --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,27 @@ +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +# The reusable documentation workflow requests these permissions for its +# build job; declare them here so the call starts even when the repo's +# default GITHUB_TOKEN permissions are read-only. +permissions: + actions: write + contents: write + pull-requests: write + statuses: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + build-and-deploy-docs: + name: "Documentation" + uses: "SciML/.github/.github/workflows/documentation.yml@v1" + secrets: "inherit" diff --git a/.gitignore b/.gitignore index 3f02ca74..7acdee6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.jl.*.cov *.jl.mem Manifest.toml +docs/build/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 00000000..970cb5c9 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,23 @@ +[deps] +BVProblemLibrary = "ded0fc24-dfea-4565-b1d9-79c027d14d84" +DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8" +DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800" +DiffEqProblemLibrary = "a077e3f3-b75c-5d7f-a0c6-6bc4c8ec64a9" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +JumpProblemLibrary = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e" +NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5" +SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e" + +[compat] +BVProblemLibrary = "0.1" +DAEProblemLibrary = "0.1" +DDEProblemLibrary = "0.1" +Documenter = "1" +JumpProblemLibrary = "2" +NonlinearProblemLibrary = "0.1" +ODEProblemLibrary = "1" +OrdinaryDiffEq = "6" +SDEProblemLibrary = "1" +julia = "1.10" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 00000000..51325fe8 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,26 @@ +using Documenter +using DiffEqProblemLibrary +using BVProblemLibrary, DAEProblemLibrary, DDEProblemLibrary, JumpProblemLibrary +using NonlinearProblemLibrary, ODEProblemLibrary, SDEProblemLibrary + +makedocs(; + modules = [ + DiffEqProblemLibrary, + BVProblemLibrary, DAEProblemLibrary, DDEProblemLibrary, JumpProblemLibrary, + NonlinearProblemLibrary, ODEProblemLibrary, SDEProblemLibrary, + ], + authors = "SciML Contributors", + sitename = "DiffEqProblemLibrary.jl", + format = Documenter.HTML(; + prettyurls = get(ENV, "CI", "false") == "true", + canonical = "https://docs.sciml.ai/DiffEqProblemLibrary/stable/", + ), + pages = [ + "Home" => "index.md", + "API" => "api.md", + ], +) + +deploydocs(; + repo = "github.com/SciML/DiffEqProblemLibrary.jl.git", +) diff --git a/docs/src/api.md b/docs/src/api.md new file mode 100644 index 00000000..93d86b98 --- /dev/null +++ b/docs/src/api.md @@ -0,0 +1,43 @@ +# API Reference + +## ODEProblemLibrary + +```@autodocs +Modules = [ODEProblemLibrary] +``` + +## SDEProblemLibrary + +```@autodocs +Modules = [SDEProblemLibrary] +``` + +## DDEProblemLibrary + +```@autodocs +Modules = [DDEProblemLibrary] +``` + +## DAEProblemLibrary + +```@autodocs +Modules = [DAEProblemLibrary] +``` + +## BVProblemLibrary + +```@autodocs +Modules = [BVProblemLibrary] +``` + +## JumpProblemLibrary + +```@autodocs +Modules = [JumpProblemLibrary] +``` + +## NonlinearProblemLibrary + +```@autodocs +Modules = [NonlinearProblemLibrary] +``` diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 00000000..79aed7a7 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,48 @@ +# DiffEqProblemLibrary.jl + +DiffEqProblemLibrary.jl is a component package in the DifferentialEquations +ecosystem. It contains premade problems for the differential equations solvers. +These can either be used as tests or as examples that show how to use the +solvers. + +The problems are split into one sublibrary per problem class: + +| Sublibrary | Problems | +| --- | --- | +| `ODEProblemLibrary` | ordinary differential equations | +| `SDEProblemLibrary` | stochastic differential equations | +| `DDEProblemLibrary` | delay differential equations | +| `DAEProblemLibrary` | differential-algebraic equations | +| `BVProblemLibrary` | boundary value problems | +| `JumpProblemLibrary` | jump and Gillespie problems | +| `NonlinearProblemLibrary` | nonlinear systems | + +Each problem is exposed as a `prob_*` constructor, so a solver workbook can pull +in a canonical example instead of re-deriving one. + +## Installation + +To install DiffEqProblemLibrary.jl, use the Julia package manager: + +```julia +using Pkg +Pkg.add("DiffEqProblemLibrary") +``` + +## Example + +Each sublibrary is a dependency of the umbrella package, so one `using` per +sublibrary reaches its problems: + +```@example problem-library +using DiffEqProblemLibrary +using ODEProblemLibrary: prob_ode_linear +using OrdinaryDiffEq: solve, Tsit5 + +sol = solve(prob_ode_linear, Tsit5()) +sol.retcode +``` + +Users interested in the full solver API should see +[DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl) +and the [DifferentialEquations documentation](https://docs.sciml.ai/DiffEqDocs/stable/).