From d8bc99c92867c83b709074be8b8f556dbc34e71e Mon Sep 17 00:00:00 2001 From: Lazaro Alonso Date: Fri, 31 May 2024 14:55:20 +0200 Subject: [PATCH 1/3] test CI --- .gitignore | 6 +++- docs/Project.toml | 1 + docs/make.jl | 11 +++++-- docs/package.json | 17 ++++++++++ docs/pages.jl | 84 +++++++++++++++++++++++++++-------------------- 5 files changed, 80 insertions(+), 39 deletions(-) create mode 100644 docs/package.json diff --git a/.gitignore b/.gitignore index c2b75f41f..97b181935 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,8 @@ Manifest.toml /docs/build/ test/Manifest.toml -test/gpu/Manifest.toml \ No newline at end of file +test/gpu/Manifest.toml +node_modules +package-lock.json +docs/src/assets/Manifest.toml +docs/src/assets/Project.toml \ No newline at end of file diff --git a/docs/Project.toml b/docs/Project.toml index e85a6db00..35b2ad0e2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -8,6 +8,7 @@ DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" diff --git a/docs/make.jl b/docs/make.jl index b9e62e4f5..489649d3e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,4 +1,5 @@ using Documenter, SciMLSensitivity +using DocumenterVitepress cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true) cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true) @@ -13,10 +14,14 @@ makedocs(sitename = "SciMLSensitivity.jl", authors = "Chris Rackauckas et al.", modules = [SciMLSensitivity], clean = true, doctest = false, linkcheck = true, - warnonly = [:missing_docs], - format = Documenter.HTML(assets = ["assets/favicon.ico"], - canonical = "https://docs.sciml.ai/SciMLSensitivity/stable/"), + warnonly = true, + format = DocumenterVitepress.MarkdownVitepress( + repo="https://github.com/SciML/SciMLSensitivity.jl", + ), pages = pages) deploydocs(repo = "github.com/SciML/SciMLSensitivity.jl.git"; + target="build", # this is where Vitepress stores its output + branch = "gh-pages", + devbranch="master", push_preview = true) diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..e8a53a9d2 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,17 @@ +{ + "devDependencies": { + "markdown-it": "^14.1.0", + "markdown-it-mathjax3": "^4.3.2", + "vitepress": "^1.1.4", + "vitepress-plugin-tabs": "^0.5.0" + }, + "scripts": { + "docs:dev": "vitepress dev build/.documenter", + "docs:build": "vitepress build build/.documenter", + "docs:preview": "vitepress preview build/.documenter" + }, + "dependencies": { + "@shikijs/transformers": "^1.1.7", + "markdown-it-footnote": "^4.0.0" + } + } \ No newline at end of file diff --git a/docs/pages.jl b/docs/pages.jl index af24391c3..b5945662b 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -1,37 +1,51 @@ -pages = ["index.md", - "getting_started.md", - "Tutorials" => Any["tutorials/parameter_estimation_ode.md", - "tutorials/direct_sensitivity.md", - "tutorials/adjoint_continuous_functional.md", - "tutorials/data_parallel.md", - "tutorials/chaotic_ode.md", - "Training Techniques and Tips" => Any["tutorials/training_tips/local_minima.md", - "tutorials/training_tips/divergence.md", - "tutorials/training_tips/multiple_nn.md"]], - "Examples" => Any[ - "Ordinary Differential Equations (ODEs)" => Any["examples/ode/exogenous_input.md", - "examples/ode/prediction_error_method.md", - "examples/ode/second_order_adjoints.md", - "examples/ode/second_order_neural.md"], - "Neural Ordinary Differential Equations (Neural ODE)" => Any[ - "examples/neural_ode/neural_ode_flux.md", - "examples/neural_ode/simplechains.md", - "examples/neural_ode/minibatch.md"], - "Stochastic Differential Equations (SDEs)" => Any[ - "examples/sde/optimization_sde.md", - "examples/sde/SDE_control.md"], - "Delay Differential Equations (DDEs)" => Any["examples/dde/delay_diffeq.md"], - "Partial Differential Equations (PDEs)" => Any["examples/pde/pde_constrained.md"], - "Hybrid and Jump Equations" => Any["examples/hybrid_jump/hybrid_diffeq.md", - "examples/hybrid_jump/bouncing_ball.md"], - "Bayesian Estimation" => Any["examples/bayesian/turing_bayesian.md"], - "Optimal and Model Predictive Control" => Any[ - "examples/optimal_control/optimal_control.md", - "examples/optimal_control/feedback_control.md"]], - "Manual and APIs" => Any["manual/differential_equation_sensitivities.md", - "manual/nonlinear_solve_sensitivities.md", - "manual/direct_forward_sensitivity.md", - "manual/direct_adjoint_sensitivities.md"], +pages = ["Home" => "index.md", + "Get Started" => "getting_started.md", + "Tutorials" => [ + "Parameter estimation ode" => "tutorials/parameter_estimation_ode.md", + "Training Techniques and Tips" => [ + "Local minima" => "tutorials/training_tips/local_minima.md", + ] + ], + "Examples" => [ + "Ordinary Differential Equations (ODEs)" => [ + "Exogenous input"=>"examples/ode/exogenous_input.md", + "Prediction error method" => "examples/ode/prediction_error_method.md", + "Second order adjoints" => "examples/ode/second_order_adjoints.md", + "second_order_neural" => "examples/ode/second_order_neural.md" + ], + "Neural Ordinary Differential Equations (Neural ODE)" => [ + "neural ode flux"=>"examples/neural_ode/neural_ode_flux.md", + "Simple chains" => "examples/neural_ode/simplechains.md", + "Minibatch" => "examples/neural_ode/minibatch.md" + ], + "Stochastic Differential Equations (SDEs)" => [ + "optimization sde"=>"examples/sde/optimization_sde.md", + "SDE_control" => "examples/sde/SDE_control.md" + ], + "Delay Differential Equations (DDEs)" => [ + "delay diffeq"=>"examples/dde/delay_diffeq.md" + ], + "Partial Differential Equations (PDEs)" => [ + "pde constrained"=>"examples/pde/pde_constrained.md" + ], + "Hybrid and Jump Equations" => [ + "Hybrid diffeq"=>"examples/hybrid_jump/hybrid_diffeq.md", + "Bouncing ball" => "examples/hybrid_jump/bouncing_ball.md" + ], + "Bayesian Estimation" => [ + "Turing Bayesian"=>"examples/bayesian/turing_bayesian.md" + ], + "Optimal and Model Predictive Control" => [ + "Optimal control"=>"examples/optimal_control/optimal_control.md", + "Feedback control" => "examples/optimal_control/feedback_control.md" + ] + ], + "Manual and APIs" => [ + "Differential equation sensitivities" => "manual/differential_equation_sensitivities.md", + "Nonlinear solve sensitivities" => "manual/nonlinear_solve_sensitivities.md", + "Direct forward sensitivity" => "manual/direct_forward_sensitivity.md", + "Direct adjoint sensitivities" => "manual/direct_adjoint_sensitivities.md" + ], "Benchmarks" => "Benchmark.md", "Sensitivity Math Details" => "sensitivity_math.md" -] +] \ No newline at end of file From e9c40026d39d0319385fe409e7921a79844944e3 Mon Sep 17 00:00:00 2001 From: Lazaro Alonso Date: Sat, 1 Jun 2024 12:06:37 +0200 Subject: [PATCH 2/3] deploy_decision, we should a preview now? --- docs/make.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/make.jl b/docs/make.jl index 489649d3e..fecfa8249 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -10,6 +10,10 @@ using Plots include("pages.jl") +deploy_config = Documenter.auto_detect_deploy_system() +deploy_decision = Documenter.deploy_folder(deploy_config; repo="github.com/SciML/SciMLSensitivity.jl", + devbranch="master", devurl="dev", push_preview=true) + makedocs(sitename = "SciMLSensitivity.jl", authors = "Chris Rackauckas et al.", modules = [SciMLSensitivity], @@ -17,6 +21,8 @@ makedocs(sitename = "SciMLSensitivity.jl", warnonly = true, format = DocumenterVitepress.MarkdownVitepress( repo="https://github.com/SciML/SciMLSensitivity.jl", + devbranch="master", devurl="dev", + deploy_url="https://docs.sciml.ai/SciMLSensitivity/", deploy_decision ), pages = pages) From 1a62c0ca3e0535128a1df73b01961afdcf9da0fa Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 1 Jun 2024 21:41:31 -0700 Subject: [PATCH 3/3] Update docs/make.jl --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index fecfa8249..5deb99afd 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -19,7 +19,7 @@ makedocs(sitename = "SciMLSensitivity.jl", modules = [SciMLSensitivity], clean = true, doctest = false, linkcheck = true, warnonly = true, - format = DocumenterVitepress.MarkdownVitepress( + format = DocumenterVitepress.MarkdownVitepress(; repo="https://github.com/SciML/SciMLSensitivity.jl", devbranch="master", devurl="dev", deploy_url="https://docs.sciml.ai/SciMLSensitivity/", deploy_decision