Skip to content

Commit e9f0068

Browse files
authored
Merge pull request #707 from control-toolbox/develop
Develop
2 parents d3c1cbb + 71718db commit e9f0068

File tree

170 files changed

+15374
-1028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+15374
-1028
lines changed

.github/workflows/CI.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@ on:
88
pull_request:
99

1010
jobs:
11-
call:
11+
test-cpu-github:
1212
uses: control-toolbox/CTActions/.github/workflows/ci.yml@main
1313
with:
14-
runs_on: '["ubuntu-latest", "windows-latest"]'
14+
versions: '["1.12"]'
15+
runs_on: '["ubuntu-latest", "macos-latest"]'
16+
runner_type: 'github'
17+
use_ct_registry: true
18+
secrets:
19+
SSH_KEY: ${{ secrets.SSH_KEY }}
20+
21+
# Job pour le runner self-hosted kkt (GPU/CUDA)
22+
test-gpu-kkt:
23+
uses: control-toolbox/CTActions/.github/workflows/ci.yml@main
24+
with:
25+
versions: '["1"]'
26+
runs_on: '[["kkt"]]'
27+
runner_type: 'self-hosted'
28+
use_ct_registry: true
29+
secrets:
30+
SSH_KEY: ${{ secrets.SSH_KEY }}

.github/workflows/Coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ on:
88
jobs:
99
call:
1010
uses: control-toolbox/CTActions/.github/workflows/coverage.yml@main
11+
with:
12+
use_ct_registry: true
1113
secrets:
1214
codecov-secret: ${{ secrets.CODECOV_TOKEN }}
15+
SSH_KEY: ${{ secrets.SSH_KEY }}

.github/workflows/Documentation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ on:
1010
jobs:
1111
call:
1212
uses: control-toolbox/CTActions/.github/workflows/documentation.yml@main
13+
with:
14+
use_ct_registry: true
15+
secrets:
16+
SSH_KEY: ${{ secrets.SSH_KEY }}

.github/workflows/SpellCheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ on:
77
jobs:
88
call:
99
uses: control-toolbox/CTActions/.github/workflows/spell-check.yml@main
10+
with:
11+
config-path: '_typos.toml'

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ Manifest.toml
4040
*/.ipynb_checkpoints
4141

4242
#
43-
docs/tmp/
43+
.tmp/
44+
.extras/
45+
#.save/
46+
.windsurf/
47+
.reports/

.save/docs/Project.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[deps]
2+
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
3+
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"
4+
CTDirect = "790bbbee-bee9-49ee-8912-a9de031322d5"
5+
CTFlows = "1c39547c-7794-42f7-af83-d98194f657c2"
6+
CTModels = "34c4fa32-2049-4079-8329-de33c2a22e2d"
7+
CTParser = "32681960-a1b1-40db-9bff-a1ca817385d1"
8+
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
9+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
10+
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
11+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
12+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
13+
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"
14+
ExaModels = "1037b233-b668-4ce9-9b63-f9f681f55dd2"
15+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
16+
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
17+
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
18+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
19+
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
20+
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
21+
MadNLPMumps = "3b83494e-c0a4-4895-918b-9157a7a085a1"
22+
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
23+
NLPModelsKnitro = "bec4dd0d-7755-52d5-9a02-22f0ffc7efcb"
24+
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
25+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
26+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
27+
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
28+
29+
[compat]
30+
ADNLPModels = "0.8"
31+
CTBase = "0.18"
32+
CTDirect = "1"
33+
CTFlows = "0.8"
34+
CTModels = "0.8"
35+
CTParser = "0.8"
36+
CTSolver = "0.2"
37+
CommonSolve = "0.2"
38+
DataFrames = "1"
39+
DifferentiationInterface = "0.7"
40+
Documenter = "1"
41+
DocumenterInterLinks = "1"
42+
DocumenterMermaid = "0.2"
43+
ExaModels = "0.9"
44+
ForwardDiff = "0.10, 1"
45+
JLD2 = "0.6"
46+
JSON3 = "1"
47+
LinearAlgebra = "1"
48+
MINPACK = "1"
49+
MadNLP = "0.8"
50+
MadNLPMumps = "0.5"
51+
NLPModelsIpopt = "0.11"
52+
NLPModelsKnitro = "0.9"
53+
NonlinearSolve = "4"
54+
OrdinaryDiffEq = "6"
55+
Plots = "1"
56+
Suppressor = "0.2"
57+
julia = "1.10"

.save/docs/make.jl

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
using Documenter
2+
using DocumenterMermaid
3+
using OptimalControl
4+
using CTBase
5+
using CTDirect
6+
using CTFlows
7+
using CTModels
8+
using CTParser
9+
using Plots
10+
using CommonSolve
11+
using OrdinaryDiffEq
12+
using DocumenterInterLinks
13+
using ADNLPModels
14+
using ExaModels
15+
using NLPModelsIpopt
16+
using MadNLP
17+
using MadNLPMumps
18+
using JSON3
19+
using JLD2
20+
using NLPModelsKnitro
21+
22+
#
23+
links = InterLinks(
24+
"CTBase" => (
25+
"https://control-toolbox.org/CTBase.jl/stable/",
26+
"https://control-toolbox.org/CTBase.jl/stable/objects.inv",
27+
joinpath(@__DIR__, "inventories", "CTBase.toml"),
28+
),
29+
"CTDirect" => (
30+
"https://control-toolbox.org/CTDirect.jl/stable/",
31+
"https://control-toolbox.org/CTDirect.jl/stable/objects.inv",
32+
joinpath(@__DIR__, "inventories", "CTDirect.toml"),
33+
),
34+
"CTFlows" => (
35+
"https://control-toolbox.org/CTFlows.jl/stable/",
36+
"https://control-toolbox.org/CTFlows.jl/stable/objects.inv",
37+
joinpath(@__DIR__, "inventories", "CTFlows.toml"),
38+
),
39+
"CTModels" => (
40+
"https://control-toolbox.org/CTModels.jl/stable/",
41+
"https://control-toolbox.org/CTModels.jl/stable/objects.inv",
42+
joinpath(@__DIR__, "inventories", "CTModels.toml"),
43+
),
44+
"CTParser" => (
45+
"https://control-toolbox.org/CTParser.jl/stable/",
46+
"https://control-toolbox.org/CTParser.jl/stable/objects.inv",
47+
joinpath(@__DIR__, "inventories", "CTParser.toml"),
48+
),
49+
"ADNLPModels" => (
50+
"https://jso.dev/ADNLPModels.jl/stable/",
51+
"https://jso.dev/ADNLPModels.jl/stable/objects.inv",
52+
joinpath(@__DIR__, "inventories", "ADNLPModels.toml"),
53+
),
54+
"NLPModelsIpopt" => (
55+
"https://jso.dev/NLPModelsIpopt.jl/stable/",
56+
"https://jso.dev/NLPModelsIpopt.jl/stable/objects.inv",
57+
joinpath(@__DIR__, "inventories", "NLPModelsIpopt.toml"),
58+
),
59+
"ExaModels" => (
60+
"https://exanauts.github.io/ExaModels.jl/stable/",
61+
"https://exanauts.github.io/ExaModels.jl/stable/objects.inv",
62+
joinpath(@__DIR__, "inventories", "ExaModels.toml"),
63+
),
64+
"MadNLP" => (
65+
"https://madnlp.github.io/MadNLP.jl/stable/",
66+
"https://madnlp.github.io/MadNLP.jl/stable/objects.inv",
67+
joinpath(@__DIR__, "inventories", "MadNLP.toml"),
68+
),
69+
"Tutorials" => (
70+
"https://control-toolbox.org/Tutorials.jl/stable/",
71+
"https://control-toolbox.org/Tutorials.jl/stable/objects.inv",
72+
joinpath(@__DIR__, "inventories", "Tutorials.toml"),
73+
),
74+
)
75+
76+
# to add docstrings from external packages
77+
const CTFlowsODE = Base.get_extension(CTFlows, :CTFlowsODE)
78+
const CTModelsPlots = Base.get_extension(CTModels, :CTModelsPlots)
79+
const CTModelsJSON = Base.get_extension(CTModels, :CTModelsJSON)
80+
const CTModelsJLD = Base.get_extension(CTModels, :CTModelsJLD)
81+
const CTDirectExtIpopt = Base.get_extension(CTDirect, :CTDirectExtIpopt)
82+
const CTDirectExtKnitro = Base.get_extension(CTDirect, :CTDirectExtKnitro)
83+
const CTDirectExtMadNLP = Base.get_extension(CTDirect, :CTDirectExtMadNLP)
84+
const CTDirectExtADNLP = Base.get_extension(CTDirect, :CTDirectExtADNLP)
85+
const CTDirectExtExa = Base.get_extension(CTDirect, :CTDirectExtExa)
86+
Modules = [
87+
CTBase,
88+
CTFlows,
89+
CTDirect,
90+
CTModels,
91+
CTParser,
92+
OptimalControl,
93+
CTFlowsODE,
94+
CTModelsPlots,
95+
CTModelsJSON,
96+
CTModelsJLD,
97+
CTDirectExtIpopt,
98+
CTDirectExtKnitro,
99+
CTDirectExtMadNLP,
100+
CTDirectExtADNLP,
101+
CTDirectExtExa,
102+
]
103+
for Module in Modules
104+
isnothing(DocMeta.getdocmeta(Module, :DocTestSetup)) &&
105+
DocMeta.setdocmeta!(Module, :DocTestSetup, :(using $Module); recursive=true)
106+
end
107+
108+
# For reproducibility
109+
mkpath(joinpath(@__DIR__, "src", "assets"))
110+
cp(
111+
joinpath(@__DIR__, "Manifest.toml"),
112+
joinpath(@__DIR__, "src", "assets", "Manifest.toml");
113+
force=true,
114+
)
115+
cp(
116+
joinpath(@__DIR__, "Project.toml"),
117+
joinpath(@__DIR__, "src", "assets", "Project.toml");
118+
force=true,
119+
)
120+
121+
repo_url = "github.com/control-toolbox/OptimalControl.jl"
122+
123+
# if draft is true, then the julia code from .md is not executed
124+
# to disable the draft mode in a specific markdown file, use the following:
125+
#=
126+
```@meta
127+
Draft = false
128+
```
129+
=#
130+
makedocs(;
131+
draft=false, # debug
132+
sitename="OptimalControl.jl",
133+
format=Documenter.HTML(;
134+
repolink="https://" * repo_url,
135+
prettyurls=false,
136+
size_threshold_ignore=[
137+
"api-optimalcontrol-user.md", "example-double-integrator-energy.md"
138+
],
139+
assets=[
140+
asset("https://control-toolbox.org/assets/css/documentation.css"),
141+
asset("https://control-toolbox.org/assets/js/documentation.js"),
142+
"assets/custom.css",
143+
],
144+
),
145+
pages=[
146+
"Getting Started" => "index.md",
147+
"Basic Examples" => [
148+
"Energy minimisation" => "example-double-integrator-energy.md",
149+
"Time mininimisation" => "example-double-integrator-time.md",
150+
],
151+
"Manual" => [
152+
"Define a problem" => "manual-abstract.md",
153+
"Use AI" => "manual-ai-llm.md",
154+
"Problem characteristics" => "manual-model.md",
155+
"Set an initial guess" => "manual-initial-guess.md",
156+
"Solve a problem" => "manual-solve.md",
157+
"Solve on GPU" => "manual-solve-gpu.md",
158+
"Solution characteristics" => "manual-solution.md",
159+
"Plot a solution" => "manual-plot.md",
160+
"Compute flows" => [
161+
"Flow API" => "manual-flow-api.md",
162+
"From optimal control problems" => "manual-flow-ocp.md",
163+
"From Hamiltonians and others" => "manual-flow-others.md",
164+
],
165+
],
166+
"API" => [
167+
"OptimalControl.jl - User" => "api-optimalcontrol-user.md",
168+
"Subpackages - Developers" => [
169+
"CTBase.jl" => "api-ctbase.md",
170+
"CTDirect.jl" => "api-ctdirect.md",
171+
"CTFlows.jl" => "api-ctflows.md",
172+
"CTModels.jl" => "api-ctmodels.md",
173+
"CTParser.jl" => "api-ctparser.md",
174+
"OptimalControl.jl" => "api-optimalcontrol-dev.md",
175+
],
176+
],
177+
"RDNOPA 2025" => "rdnopa-2025.md",
178+
],
179+
plugins=[links],
180+
)
181+
182+
deploydocs(; repo=repo_url * ".git", devbranch="main", push_preview=true)
183+
# push_preview: use https://control-toolbox.org/OptimalControl.jl/previews/PRXXX where XXX is the pull request number
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)