Skip to content

Commit e2b50b0

Browse files
Merge pull request #551 from ChrisRackauckas-Claude/agent/public-doc-coverage
Use SciMLTesting public API docs QA
2 parents f7e01d5 + 3faf56e commit e2b50b0

29 files changed

Lines changed: 257 additions & 291 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Reexport = "1.2"
6161
SafeTestsets = "0.1.0"
6262
SciMLBase = "3.30"
6363
SciMLLogging = "1.10.1, 2"
64-
SciMLTesting = "1"
64+
SciMLTesting = "2.1"
6565
Sparspak = "0.3.11"
6666
StaticArrays = "1.9.8"
6767
Test = "1.10"

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
2121
SimpleBoundaryValueDiffEq = "be0294bd-f90f-4760-ac4e-3421ce2b2da0"
2222

2323
[sources]
24-
BoundaryValueDiffEq = {path = ".."}
2524
BoundaryValueDiffEqAscher = {path = "../lib/BoundaryValueDiffEqAscher"}
2625
BoundaryValueDiffEqCore = {path = "../lib/BoundaryValueDiffEqCore"}
2726
BoundaryValueDiffEqFIRK = {path = "../lib/BoundaryValueDiffEqFIRK"}

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pages = [
1616
"solvers/mirk.md", "solvers/firk.md", "solvers/shooting.md", "solvers/mirkn.md",
1717
"solvers/ascher.md", "solvers/simple_solvers.md", "solvers/wrappers.md",
1818
],
19-
"Wrapped Solver APIs" => Any["api/odeinterface.md"],
19+
"API" => Any["api/odeinterface.md"],
2020
"Development Documentation" => Any["devdocs/internal_interfaces.md"],
2121
"References" => "references.md",
2222
]

docs/src/tutorials/extremum.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Let's walk through this functionality with an intuitive example. We still revisi
1212
where `lb=-4.8161991710010925` and `ub=5.0496477654230745`. So the states must conform that the maximum value of the state should be `lb` while the minimum value of the state should be `ub`. To solve such problems, we can simply use the `maxsol` and `minsol` functions when defining the boundary value problem in BoundaryValueDiffEq.jl.
1313

1414
```@example inequality
15-
using BoundaryValueDiffEq, Plots
15+
using BoundaryValueDiffEq
1616
tspan = (0.0, pi / 2)
1717
function simplependulum!(du, u, p, t)
1818
θ = u[1]
@@ -25,6 +25,16 @@ function bc!(residual, u, p, t)
2525
residual[2] = minsol(u, (0.0, pi / 2)) + 4.8161991710010925
2626
end
2727
prob = BVProblem(simplependulum!, bc!, [pi / 2, pi / 2], tspan)
28-
sol = solve(prob, MIRK4(), dt = 0.05)
28+
```
29+
30+
For extremum boundary conditions, prefer a finite-difference Jacobian backend for
31+
the boundary condition residuals.
32+
33+
```julia
34+
using Plots
35+
jac_alg = BVPJacobianAlgorithm(;
36+
bc_diffmode = AutoFiniteDiff(), nonbc_diffmode = AutoSparse(AutoFiniteDiff())
37+
)
38+
sol = solve(prob, MIRK4(; jac_alg), dt = 0.05)
2939
plot(sol)
3040
```

lib/BoundaryValueDiffEqAscher/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Random = "1.10"
3131
RecursiveArrayTools = "3.27.0, 4"
3232
Reexport = "1.2"
3333
SciMLBase = "3.30"
34-
SciMLTesting = "1"
34+
SciMLTesting = "2.1"
3535
Setfield = "1.1.1"
3636
StaticArrays = "1.9.8"
3737
Test = "1.10"

lib/BoundaryValueDiffEqAscher/test/qa/Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
66
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
77

88
[sources]
9-
BoundaryValueDiffEqAscher = {path = "../.."}
109
BoundaryValueDiffEqCore = {path = "../../../BoundaryValueDiffEqCore"}
1110

1211
[compat]
1312
Aqua = "0.8"
1413
BoundaryValueDiffEqAscher = "1"
1514
BoundaryValueDiffEqCore = "2"
16-
SciMLTesting = "1.6"
15+
SciMLTesting = "2.1"
1716
Test = "1.10"
1817
julia = "1.10"

lib/BoundaryValueDiffEqAscher/test/qa/qa.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@ using SciMLTesting
22
using BoundaryValueDiffEqAscher
33
using Test
44

5+
const DOCS_SRC = normpath(joinpath(@__DIR__, "..", "..", "..", "..", "docs", "src"))
6+
7+
function upstream_reexports_with_doc_ownership(pkg, owners, extra = ())
8+
names = Set{Symbol}(extra)
9+
for owner in owners
10+
isdefined(pkg, owner) || continue
11+
union!(names, SciMLTesting.public_api_names(getproperty(pkg, owner)))
12+
push!(names, owner)
13+
end
14+
return Tuple(sort!(collect(names)))
15+
end
16+
17+
const UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP = upstream_reexports_with_doc_ownership(
18+
BoundaryValueDiffEqAscher,
19+
(:ADTypes, :NonlinearSolveFirstOrder, :SciMLBase, :SciMLOperators),
20+
(
21+
:AllObserved, :BoundaryValueDiffEqCore, :deleteat!, :init, :pickchunksize, :solve,
22+
:solve!, :step!,
23+
)
24+
)
25+
526
run_qa(
627
BoundaryValueDiffEqAscher;
728
explicit_imports = true,
@@ -13,4 +34,10 @@ run_qa(
1334
# no public replacement.
1435
all_qualified_accesses_are_public = (; ignore = (:Dual, :jacobian!)),
1536
),
37+
api_docs_kwargs = (;
38+
rendered = true,
39+
docs_src = DOCS_SRC,
40+
ignore = UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP,
41+
rendered_ignore = UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP,
42+
),
1643
)

lib/BoundaryValueDiffEqCore/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Reexport = "1.2"
4848
SciMLBase = "3.30"
4949
SciMLLogging = "1.10.1, 2"
5050
SciMLPublic = "1"
51-
SciMLTesting = "1"
51+
SciMLTesting = "2.1"
5252
SciMLStructures = "1.7.0"
5353
Setfield = "1"
5454
SparseArrays = "1.10"

lib/BoundaryValueDiffEqCore/test/qa/Project.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a"
44
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
55
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
66

7-
[sources]
8-
BoundaryValueDiffEqCore = {path = "../.."}
9-
107
[compat]
118
Aqua = "0.8"
129
BoundaryValueDiffEqCore = "2"
13-
SciMLTesting = "1.6"
10+
SciMLTesting = "2.1"
1411
Test = "1.10"
1512
julia = "1.10"

lib/BoundaryValueDiffEqCore/test/qa/qa.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@ using SciMLTesting
22
using BoundaryValueDiffEqCore
33
using Test
44

5+
const DOCS_SRC = normpath(joinpath(@__DIR__, "..", "..", "..", "..", "docs", "src"))
6+
7+
function upstream_reexports_with_doc_ownership(pkg, owners, extra = ())
8+
names = Set{Symbol}(extra)
9+
for owner in owners
10+
isdefined(pkg, owner) || continue
11+
union!(names, SciMLTesting.public_api_names(getproperty(pkg, owner)))
12+
push!(names, owner)
13+
end
14+
return Tuple(sort!(collect(names)))
15+
end
16+
17+
const UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP = upstream_reexports_with_doc_ownership(
18+
BoundaryValueDiffEqCore,
19+
(:NonlinearSolveFirstOrder, :SciMLBase, :SciMLOperators),
20+
(:AllObserved, :deleteat!, :init, :pickchunksize, :solve, :solve!, :step!)
21+
)
22+
523
run_qa(
624
BoundaryValueDiffEqCore;
725
explicit_imports = true,
@@ -34,4 +52,10 @@ run_qa(
3452
),
3553
),
3654
),
55+
api_docs_kwargs = (;
56+
rendered = true,
57+
docs_src = DOCS_SRC,
58+
ignore = UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP,
59+
rendered_ignore = UPSTREAM_REEXPORTS_WITH_DOC_OWNERSHIP,
60+
),
3761
)

0 commit comments

Comments
 (0)