Skip to content

Commit 3fbdb5b

Browse files
Merge pull request #534 from lcontento/lc/docs
Fix documentation building
2 parents 3bf3175 + 3c570f1 commit 3fbdb5b

File tree

16 files changed

+92
-66
lines changed

16 files changed

+92
-66
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Manifest.toml
55
.DS_Store
66
/docs/build/*
77
/docs/src/libs/*/examples
8+
/docs/src/assets/Project.toml
89
hall_of_fame.*
9-
/tmp/*
10+
/tmp/*

Project.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
1717
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1818
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1919
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
20+
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
2021
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
2122
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2223
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
@@ -35,6 +36,8 @@ ProgressMeter = "1.6"
3536
QuadGK = "2.4"
3637
RecipesBase = "1"
3738
Reexport = "1.0"
39+
OrdinaryDiffEqTsit5 = "1"
40+
SciMLStructures = "1"
3841
Setfield = "1"
3942
Statistics = "1"
4043
StatsBase = "0.32.0, 0.33, 0.34"
@@ -43,10 +46,11 @@ Symbolics = "5.30.1, 6"
4346
julia = "1.10"
4447

4548
[extras]
49+
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
4650
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
4751
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4852
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4953
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5054

5155
[targets]
52-
test = ["Test", "Random", "SafeTestsets", "Pkg"]
56+
test = ["Test", "Random", "SafeTestsets", "Pkg", "OrdinaryDiffEqTsit5"]

docs/make.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dev_subpkg("DataDrivenDMD")
1212
dev_subpkg("DataDrivenSparse")
1313
dev_subpkg("DataDrivenSR")
1414

15+
1516
using Documenter
1617
using DataDrivenDiffEq
1718
using DataDrivenDMD
@@ -21,8 +22,8 @@ using DataDrivenSR
2122
using StatsBase
2223
using Literate
2324

24-
cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true)
25-
cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
25+
cp(joinpath(@__DIR__, "Manifest.toml"), joinpath(@__DIR__, "src", "assets", "Manifest.toml"), force = true)
26+
cp(joinpath(@__DIR__, "Project.toml"), joinpath(@__DIR__, "src", "assets", "Project.toml"), force = true)
2627

2728
ENV["GKSwstype"] = "100"
2829

@@ -73,9 +74,12 @@ makedocs(sitename = "DataDrivenDiffEq.jl",
7374
modules = [DataDrivenDiffEq, DataDrivenDMD, DataDrivenSparse, DataDrivenSR],
7475
clean = true, doctest = false, linkcheck = true,
7576
warnonly = [:missing_docs, :cross_references],
76-
linkcheck_ignore = ["http://cwrowley.princeton.edu/papers/Hemati-2017a.pdf",
77+
linkcheck_ignore = [
78+
"http://cwrowley.princeton.edu/papers/Hemati-2017a.pdf",
7779
"https://royalsocietypublishing.org/doi/10.1098/rspa.2020.0279",
78-
"https://www.pnas.org/doi/10.1073/pnas.1517384113"],
80+
"https://www.pnas.org/doi/10.1073/pnas.1517384113",
81+
"https://link.springer.com/article/10.1007/s00332-015-9258-5",
82+
],
7983
format = Documenter.HTML(assets = ["assets/favicon.ico"],
8084
canonical = "https://docs.sciml.ai/DataDrivenDiffEq/stable/"),
8185
pages = pages)

docs/src/assets/Project.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/src/citations.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@ If you are using `DataDrivenDiffEq.jl` for research, please cite
1515
}
1616
```
1717

18-
If you are using the [SymbolicRegression.jl](https://docs.sciml.ai/SymbolicRegression/stable/) API, please cite
18+
If you are using the [SymbolicRegression.jl](https://ai.damtp.cam.ac.uk/symbolicregression/dev/) API, please cite
1919

2020
```bibtex
21-
@software{pysr,
22-
author = {Miles Cranmer},
23-
title = {PySR: Fast \& Parallelized Symbolic Regression in Python/Julia},
24-
month = sep,
25-
year = 2020,
26-
publisher = {Zenodo},
27-
doi = {10.5281/zenodo.4041459},
28-
url = {http://doi.org/10.5281/zenodo.4041459}
21+
@misc{cranmerInterpretableMachineLearning2023,
22+
title = {Interpretable {Machine} {Learning} for {Science} with {PySR} and {SymbolicRegression}.jl},
23+
url = {http://arxiv.org/abs/2305.01582},
24+
doi = {10.48550/arXiv.2305.01582},
25+
urldate = {2023-07-17},
26+
publisher = {arXiv},
27+
author = {Cranmer, Miles},
28+
month = may,
29+
year = {2023},
30+
note = {arXiv:2305.01582 [astro-ph, physics:physics]},
31+
keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Computer Science - Machine Learning, Computer Science - Neural and Evolutionary Computing, Computer Science - Symbolic Computation, Physics - Data Analysis, Statistics and Probability},
2932
}
3033
```

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Pkg.add("DataDrivenSR")
9494
## Contributing
9595

9696
- Please refer to the
97-
[SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac/blob/master/README.md)
97+
[SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac)
9898
for guidance on PRs, issues, and other matters relating to contributing to SciML.
9999

100100
- See the [SciML Style Guide](https://github.com/SciML/SciMLStyle) for common coding practices and other style decisions.

docs/src/libs/datadrivendmd/example_04.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # [Nonlinear Time Continuous System](@id nonlinear_continuos)
22
#
3-
# Similarly, we can use the [Extended Dynamic Mode Decomposition](https://link.springer.com/article/10.1007/s00332-015-9258-5) via a nonlinear [`Basis`](@ref) of observables. Here, we will look at a rather [famous example](https://arxiv.org/pdf/1510.03007.pdf) with a finite dimensional solution.
3+
# Similarly, we can use the [Extended Dynamic Mode Decomposition](https://link.springer.com/article/10.1007/s00332-015-9258-5) via a nonlinear [`Basis`](@ref) of observables. Here, we will look at a rather [famous example](https://arxiv.org/pdf/1510.03007) with a finite dimensional solution.
44

55
using DataDrivenDiffEq
66
using LinearAlgebra

docs/src/libs/datadrivensparse/example_03.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# # [Implicit Nonlinear Dynamics : Michaelis-Menten](@id michaelis_menten)
22
#
33
# What if you want to estimate an implicitly defined system of the form ``f(u_t, u, p, t) = 0``?
4-
# The solution : Implicit Sparse Identification. This method was originally described in [this paper](http://ieeexplore.ieee.org/document/7809160/), and currently there exist [robust algorithms](https://royalsocietypublishing.org/doi/10.1098/rspa.2020.0279) to identify these systems.
4+
# The solution : Implicit Sparse Identification. This method was originally described in [this paper](https://ieeexplore.ieee.org/document/7809160/), and currently there exist [robust algorithms](https://royalsocietypublishing.org/doi/10.1098/rspa.2020.0279) to identify these systems.
55
# We will focus on [Michaelis-Menten Kinetics](https://en.wikipedia.org/wiki/Michaelis%E2%80%93Menten_kinetics). As before, we will define the [`DataDrivenProblem`](@ref) and the [`Basis`](@ref) containing possible candidate functions for our [sparse regression](@ref sparse_algorithms).
66
# Let's generate some data! We will use two experiments starting from different initial conditions.
77

docs/src/libs/datadrivensparse/example_04.jl

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,41 @@
55

66
using DataDrivenDiffEq
77
using ModelingToolkit
8+
using ModelingToolkit: t_nounits as t, D_nounits as D
89
using OrdinaryDiffEq
910
using LinearAlgebra
1011
using DataDrivenSparse
1112
#md using Plots
1213
#md gr()
1314
using Test #src
1415

15-
@parameters begin
16-
t
17-
α = 1.0
18-
β = 1.3
19-
γ = 2.0
20-
δ = 0.5
16+
@mtkmodel Autoregulation begin
17+
@parameters begin
18+
α = 1.0
19+
β = 1.3
20+
γ = 2.0
21+
δ = 0.5
22+
end
23+
@variables begin
24+
(x(t))[1:2] = [20.0; 12.0]
25+
end
26+
@equations begin
27+
D(x[1]) ~ α / (1 + x[2]) - β * x[1]
28+
D(x[2]) ~ γ / (1 + x[1]) - δ * x[2]
29+
end
2130
end
2231

23-
@variables begin
24-
x[1:2](t) = [20.0; 12.0]
25-
end
26-
27-
x = collect(x)
28-
D = Differential(t)
29-
30-
eqs = [D(x[1]) ~ α / (1 + x[2]) - β * x[1];
31-
D(x[2]) ~ γ / (1 + x[1]) - δ * x[2]]
32-
33-
sys = ODESystem(eqs, t, x, [α, β, γ, δ], name = :Autoregulation)
34-
35-
x0 = [x[1] => 20.0; x[2] => 12.0]
36-
32+
@mtkbuild sys = Autoregulation()
3733
tspan = (0.0, 5.0)
38-
39-
de_problem = ODEProblem{true, SciMLBase.NoSpecialize}(sys, x0, tspan)
34+
de_problem = ODEProblem{true, SciMLBase.NoSpecialize}(sys, [], tspan, [])
4035
de_solution = solve(de_problem, Tsit5(), saveat = 0.005);
4136
#md plot(de_solution)
4237

4338
# As always, we start by defining a [DataDrivenProblem](@ref problem) and a sufficient basis for sparse regression.
4439

4540
dd_prob = DataDrivenProblem(de_solution)
4641

42+
x = sys.x
4743
eqs = [polynomial_basis(x, 4); D.(x); x .* D(x[1]); x .* D(x[2])]
4844

4945
basis = Basis(eqs, x, independent_variable = t, implicits = D.(x))

docs/src/libs/datadrivensr/example_01.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Hence, the performance might differ and depends strongly on the hyperparameters of the optimization.
66
# This example might not recover the groundtruth, but is showing off the use within `DataDrivenDiffEq.jl`.
77
#
8-
# DataDrivenDiffEq offers an interface to [`SymbolicRegression.jl`](https://docs.sciml.ai/SymbolicRegression/stable/) to infer more complex functions.
8+
# DataDrivenDiffEq offers an interface to [`SymbolicRegression.jl`](https://ai.damtp.cam.ac.uk/symbolicregression/dev/) to infer more complex functions.
99

1010
using DataDrivenDiffEq
1111
using LinearAlgebra

0 commit comments

Comments
 (0)