Skip to content

Commit bf40517

Browse files
committed
test: make tutorial checks robust (require index.jmd and Project.toml only); docs: minor copy edits
1 parent 5afaba3 commit bf40517

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

test/runtests.jl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ function tests()
55
readdir(rootdir),
66
)
77
for dir in dirs
8-
subdirs = readdir(joinpath(rootdir, dir))
8+
subdirs = filter(y -> isdir(joinpath(rootdir, dir, y)), readdir(joinpath(rootdir, dir)))
99
for subdir in subdirs
10-
prefix = joinpath(rootdir, dir, subdir, subdir)
10+
prefix = joinpath(rootdir, dir, subdir, "index")
1111
println("Verifying files in $dir/$subdir")
12-
for suffix in [".jmd", ".html", ".ipynb", ".jl"]
13-
spc = " "^(6 - length(suffix))
14-
print(" $subdir$suffix$spc exists…… ")
15-
@assert isfile(prefix * suffix)
16-
println("")
17-
end
12+
# Require the source markdown to be present
13+
print(" index.jmd exists…… ")
14+
@assert isfile(prefix * ".jmd")
15+
println("")
16+
17+
# Optional: ensure each tutorial folder has a Project.toml for deps
18+
print(" Project.toml exists…… ")
19+
@assert isfile(joinpath(rootdir, dir, subdir, "Project.toml"))
20+
println("")
1821
end
1922
end
2023
end

tutorials/advanced-jsosolvers/index.jmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ The same subsolver selection pattern applies to TRON’s least-squares specializ
6868
stats_tron = tron(nls; subsolver = :lsmr, rtol = RTOL, atol = ATOL, max_time = max_time)
6969
```
7070

71-
Note on API updates: since JSOSolvers v0.11, subsolvers are selected using the keyword argument `subsolver` with a Symbol, for example `subsolver = :lsmr`. The previous form using `subsolver_type = CglsSolver` (and similar types) has been removed. The lists returned by `JSOSolvers.trunkls_allowed_subsolvers` and `JSOSolvers.tronls_allowed_subsolvers` enumerate the valid symbols you can pass.
72-
7371
```julia
7472
solvers = Dict(
7573
:trunk_cgls => nlp -> trunk(nlp; subsolver = :cgls),

0 commit comments

Comments
 (0)