Skip to content

Commit 8e6de5a

Browse files
Use SciMLTesting 2.1 QA docs check (#163)
* Use SciMLTesting 2.1 QA docs check Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> * Drop redundant QA self source SciMLTesting develops the package under test before running the QA group, so the QA project does not need a self `[sources]` path entry. Removing it avoids leaking local checkout paths into the PR. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent aff82c5 commit 8e6de5a

6 files changed

Lines changed: 34 additions & 5 deletions

File tree

docs/src/functions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
```
33

44
```@docs
5+
POD
6+
reduce!
7+
SVD
8+
TSVD
9+
RSVD
510
deim
611
```

src/DataReduction/POD.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ end
2626

2727
_rsvd(data, n::Int, p::Int) = rsvd(data, n, p)
2828

29+
"""
30+
POD(snapshots; min_renergy = 1.0, min_nmodes = 1, max_nmodes = length(snapshots[1]))
31+
POD(snapshots, nmodes)
32+
33+
Proper orthogonal decomposition reduction problem built from state snapshots.
34+
"""
2935
mutable struct POD{S, T <: AbstractFloat} <: AbstractDRProblem
3036
# specified
3137
snapshots::S
@@ -81,6 +87,11 @@ function determine_truncation(
8187
return nmodes, energy
8288
end
8389

90+
"""
91+
reduce!(pod, alg)
92+
93+
Compute the reduced basis and spectrum for `pod` using the SVD backend `alg`.
94+
"""
8495
function reduce!(pod::POD{S, T}, alg::SVD)::Nothing where {S, T}
8596
u, s, v = _svd(pod.snapshots; alg.kwargs...)
8697
pod.nmodes,

src/Types.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ abstract type AbstractDRProblem <: AbstractReductionProblem end
44

55
abstract type AbstractSVD end
66

7+
"""
8+
SVD(; kwargs...)
9+
10+
Dense singular value decomposition backend for projection basis construction.
11+
"""
712
struct SVD{K <: NamedTuple} <: AbstractSVD
813
kwargs::K
914
function SVD(; kwargs...)
@@ -12,6 +17,11 @@ struct SVD{K <: NamedTuple} <: AbstractSVD
1217
end
1318
end
1419

20+
"""
21+
TSVD(; kwargs...)
22+
23+
Truncated singular value decomposition backend for projection basis construction.
24+
"""
1525
struct TSVD{K <: NamedTuple} <: AbstractSVD
1626
kwargs::K
1727
function TSVD(; kwargs...)
@@ -20,6 +30,11 @@ struct TSVD{K <: NamedTuple} <: AbstractSVD
2030
end
2131
end
2232

33+
"""
34+
RSVD([p])
35+
36+
Randomized singular value decomposition backend with oversampling parameter `p`.
37+
"""
2338
struct RSVD <: AbstractSVD
2439
p::Int
2540
function RSVD(p::Int = 0)

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ MethodOfLines = "0.11"
1313
ModelingToolkit = "11"
1414
OrdinaryDiffEq = "7"
1515
SafeTestsets = "0.1"
16-
SciMLTesting = "1"
16+
SciMLTesting = "2.1"

test/qa/Project.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ Aqua = "0.8"
1212
JET = "0.9, 0.10, 0.11"
1313
LinearAlgebra = "1"
1414
SafeTestsets = "0.0.1, 0.1"
15-
SciMLTesting = "1.7"
15+
SciMLTesting = "2.1"
1616
Test = "1"
17-
18-
[sources]
19-
ModelOrderReduction = {path = "../.."}

test/qa/qa.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using SciMLTesting, ModelOrderReduction, Test
33
run_qa(
44
ModelOrderReduction;
55
explicit_imports = true,
6+
api_docs_kwargs = (; rendered = true),
67
# Whole-package JET (`report_package`/`test_package`) hits a toplevel
78
# `invalid redefinition of constant ModelOrderReduction.TSVD` error: the package
89
# exports a `TSVD` struct whose name collides with the `TSVD` dependency package

0 commit comments

Comments
 (0)