From 7a87193757095d839f638f35fae14ba57cb560f3 Mon Sep 17 00:00:00 2001 From: Ludger Paehler Date: Mon, 29 Jan 2024 05:45:54 -0800 Subject: [PATCH] Repair readthedocs build. --- .readthedocs.yaml | 31 +++++++++++ docs/FlowConfigurations.md | 13 ----- docs/Makefile | 4 +- docs/RayClusterSetup.md | 45 --------------- docs/Status051822.md | 25 --------- docs/{source => }/_static/imgs/cavity.png | Bin docs/{source => }/_static/imgs/cylinder.png | Bin docs/{source => }/_static/imgs/logo.svg | 0 docs/{source => }/_static/imgs/pinball.png | Bin docs/{source => }/api.rst | 0 docs/{source => }/conf.py | 10 +++- docs/{source => }/distributed_backend.rst | 0 docs/{source => }/docker_development.rst | 0 docs/{source => }/further_backend.rst | 0 docs/{source => }/index.rst | 0 docs/{source => }/installation.rst | 0 docs/make.bat | 8 ++- docs/{source => }/parallel_scaling.rst | 0 docs/{source => }/quickstart.rst | 0 docs/{source => }/ray.rst | 0 docs/requirements.txt | 58 ++++++++++++++++++++ docs/{source => }/rllib.rst | 0 docs/{source => }/torch_rl.rst | 0 23 files changed, 103 insertions(+), 91 deletions(-) create mode 100644 .readthedocs.yaml delete mode 100644 docs/FlowConfigurations.md delete mode 100644 docs/RayClusterSetup.md delete mode 100644 docs/Status051822.md rename docs/{source => }/_static/imgs/cavity.png (100%) rename docs/{source => }/_static/imgs/cylinder.png (100%) rename docs/{source => }/_static/imgs/logo.svg (100%) rename docs/{source => }/_static/imgs/pinball.png (100%) rename docs/{source => }/api.rst (100%) rename docs/{source => }/conf.py (74%) rename docs/{source => }/distributed_backend.rst (100%) rename docs/{source => }/docker_development.rst (100%) rename docs/{source => }/further_backend.rst (100%) rename docs/{source => }/index.rst (100%) rename docs/{source => }/installation.rst (100%) rename docs/{source => }/parallel_scaling.rst (100%) rename docs/{source => }/quickstart.rst (100%) rename docs/{source => }/ray.rst (100%) create mode 100644 docs/requirements.txt rename docs/{source => }/rllib.rst (100%) rename docs/{source => }/torch_rl.rst (100%) diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..44ee2f7 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,31 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # You can also specify other tool versions: + # nodejs: "16" + # rust: "1.55" + # golang: "1.17" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/docs/FlowConfigurations.md b/docs/FlowConfigurations.md deleted file mode 100644 index d6f3b01..0000000 --- a/docs/FlowConfigurations.md +++ /dev/null @@ -1,13 +0,0 @@ -# Flow Configurations - -## Periodic Cylinder Wake (Re=100) - -![](imgs/cylinder.png) - -## Chaotic pinball (Re=130) - -![](imgs/pinball.png) - -## Open Cavity (Re=7500) - -![](imgs/cavity.png) diff --git a/docs/Makefile b/docs/Makefile index 7f290d9..291cf22 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,8 +1,8 @@ # Minimal makefile for Sphinx documentation SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build +SOURCEDIR = . +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/RayClusterSetup.md b/docs/RayClusterSetup.md deleted file mode 100644 index f830e90..0000000 --- a/docs/RayClusterSetup.md +++ /dev/null @@ -1,45 +0,0 @@ -# Ray Cluster Setup - -## Manual Ray Cluster - -Especially for a manual cluster we need to consider a few basic principles: - -- All machines need to have **the same** basic setup with the package pre-installed, and all dependencies present - -We can then initialize the headnode - -```bash -ray start --head -``` - -and subsequently attach all the worker nodes - -```bash -ray start --address=IP_OF_THE_HEAD_NODE -``` - -> If a fast interconnect is available e.g. higher-bandwidth ethernet, Omnipath, Infiniband, etc. consider using the custom IPs of that interconnect to force the usage of the faster connections. - -With the cluster now initialized we can use it in any of our scripts With - -```python -import ray -ray.init(address=IP_OF_THE_HEAD_NODE) -``` - - -## Ray Cluster on Kubernetes - -Ray can easily be installed on Kubernetes with [Helm](https://helm.sh) using the Ray Kubernetes Operator, the detailed documentation for which can be found in [Ray's documentation](https://docs.ray.io/en/latest/cluster/kubernetes.html). - -> On clouds like AWS, Azure, and GCP this is entirely straightforward and automated away. - -## Ray Cluster on Slurm - -Ray on Slurm is currently still experimental in its support, but the progress and current approach can be viewed in [Ray's documentation](https://docs.ray.io/en/latest/cluster/slurm.html). The biggest difference here coming from the different way Ray and Slurm treat - -1. Ports binding -2. IP binding - -But there exist example [launch script](https://docs.ray.io/en/latest/cluster/examples/slurm-launch.html#slurm-launch), and [templated launch scripts](https://docs.ray.io/en/latest/cluster/examples/slurm-template.html#slurm-template). - diff --git a/docs/Status051822.md b/docs/Status051822.md deleted file mode 100644 index 70da1d2..0000000 --- a/docs/Status051822.md +++ /dev/null @@ -1,25 +0,0 @@ -# Status on the 18th of May 2022 - -## What currently works - -* Overview of features in Jupyter notebooks -* Feedback control of cylinder and pinball flows (both `gym.Env` and solver interfaces) -* Newton-Krylov fixed point solver -* Time integration with a projection scheme -* Direct and adjoint global stability analysis with SLEPc -* Conversion to discrete-time LTI system -* Interface to Modred for modal analysis -* Adjoint-based optimization with PyAdjoint -* Basic test suite - - -## What doesn't work (yet) - -* Adjoint operator construction in discrete time -* LQR control for cylinder (control design works, but blows up in DNS) - - -## What needs to be tested? - -* Cavity flow - diff --git a/docs/source/_static/imgs/cavity.png b/docs/_static/imgs/cavity.png similarity index 100% rename from docs/source/_static/imgs/cavity.png rename to docs/_static/imgs/cavity.png diff --git a/docs/source/_static/imgs/cylinder.png b/docs/_static/imgs/cylinder.png similarity index 100% rename from docs/source/_static/imgs/cylinder.png rename to docs/_static/imgs/cylinder.png diff --git a/docs/source/_static/imgs/logo.svg b/docs/_static/imgs/logo.svg similarity index 100% rename from docs/source/_static/imgs/logo.svg rename to docs/_static/imgs/logo.svg diff --git a/docs/source/_static/imgs/pinball.png b/docs/_static/imgs/pinball.png similarity index 100% rename from docs/source/_static/imgs/pinball.png rename to docs/_static/imgs/pinball.png diff --git a/docs/source/api.rst b/docs/api.rst similarity index 100% rename from docs/source/api.rst rename to docs/api.rst diff --git a/docs/source/conf.py b/docs/conf.py similarity index 74% rename from docs/source/conf.py rename to docs/conf.py index bf562d1..94c3b06 100644 --- a/docs/source/conf.py +++ b/docs/conf.py @@ -3,8 +3,8 @@ # -- Project information project = "Hydrogym" -copyright = "2022, Hydrogym Developers" -author = "tbd" +copyright = "2023, Hydrogym Developers" +author = "Ludger Paehler" release = "0.1" version = "0.1.0" @@ -20,6 +20,7 @@ ] intersphinx_mapping = { + "rtd": ("https://docs.readthedocs.io/en/stable/", None), "python": ("https://docs.python.org/3/", None), "sphinx": ("https://www.sphinx-doc.org/en/master/", None), } @@ -31,5 +32,8 @@ html_theme = "alabaster" +# Custom paths for static files +html_static_path = ["_static"] + # -- Options for EPUB output -epub_show_urls = "footnote" +epub_show_urls = "footnote" \ No newline at end of file diff --git a/docs/source/distributed_backend.rst b/docs/distributed_backend.rst similarity index 100% rename from docs/source/distributed_backend.rst rename to docs/distributed_backend.rst diff --git a/docs/source/docker_development.rst b/docs/docker_development.rst similarity index 100% rename from docs/source/docker_development.rst rename to docs/docker_development.rst diff --git a/docs/source/further_backend.rst b/docs/further_backend.rst similarity index 100% rename from docs/source/further_backend.rst rename to docs/further_backend.rst diff --git a/docs/source/index.rst b/docs/index.rst similarity index 100% rename from docs/source/index.rst rename to docs/index.rst diff --git a/docs/source/installation.rst b/docs/installation.rst similarity index 100% rename from docs/source/installation.rst rename to docs/installation.rst diff --git a/docs/make.bat b/docs/make.bat index 9534b01..ba0d35f 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,8 +7,8 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=source -set BUILDDIR=build +set SOURCEDIR=. +set BUILDDIR=_build if "%1" == "" goto help @@ -25,6 +25,8 @@ if errorlevel 9009 ( exit /b 1 ) +if "%1" == "" goto help + %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end @@ -32,4 +34,4 @@ goto end %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end -popd +popd \ No newline at end of file diff --git a/docs/source/parallel_scaling.rst b/docs/parallel_scaling.rst similarity index 100% rename from docs/source/parallel_scaling.rst rename to docs/parallel_scaling.rst diff --git a/docs/source/quickstart.rst b/docs/quickstart.rst similarity index 100% rename from docs/source/quickstart.rst rename to docs/quickstart.rst diff --git a/docs/source/ray.rst b/docs/ray.rst similarity index 100% rename from docs/source/ray.rst rename to docs/ray.rst diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..35ca70f --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,58 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile docs/requirements.in +# +alabaster==0.7.12 + # via sphinx +babel==2.10.3 + # via sphinx +certifi==2022.6.15 + # via requests +charset-normalizer==2.1.0 + # via requests +docutils==0.17.1 + # via + # sphinx + # sphinx-rtd-theme +idna==3.3 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.2 + # via sphinx +markupsafe==2.1.1 + # via jinja2 +packaging==21.3 + # via sphinx +pygments==2.12.0 + # via sphinx +pyparsing==3.0.9 + # via packaging +pytz==2022.1 + # via babel +requests==2.28.1 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==5.0.2 + # via + # -r docs/requirements.in + # sphinx-rtd-theme +sphinx-rtd-theme==1.0.0 + # via -r docs/requirements.in +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +urllib3==1.26.9 + # via requests \ No newline at end of file diff --git a/docs/source/rllib.rst b/docs/rllib.rst similarity index 100% rename from docs/source/rllib.rst rename to docs/rllib.rst diff --git a/docs/source/torch_rl.rst b/docs/torch_rl.rst similarity index 100% rename from docs/source/torch_rl.rst rename to docs/torch_rl.rst