From 5ed15552b0761bccd4455d323fb08085afba909e Mon Sep 17 00:00:00 2001 From: Dingcheng Date: Thu, 10 Aug 2023 13:49:06 -0500 Subject: [PATCH] for documentation --- .readthedocs.yml | 20 ++++++++++++++++++++ INSTALL.md | 34 ++++++++++++++++++++++++++++++---- README.md | 1 + doc/requirements.txt | 2 ++ 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .readthedocs.yml create mode 100644 doc/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..fd3bc91 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,20 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the "doc/" directory with Sphinx +sphinx: + configuration: doc/conf.py + +# Additional dependencies +python: + install: + - requirements: doc/requirements.txt diff --git a/INSTALL.md b/INSTALL.md index 3aa05d8..244d78b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -11,8 +11,34 @@ - PETSc dependencies: `parmetis`, `scotch`, `suitesparse`, `superlu_dist`, `ml`, `hypre` - (optional): `gmsh`, `mshr`, `jupyter` -## Recommended installation procedures using conda -1. Install `FEniCS` with appropriate dependencies + +## Recommended installation using Anaconda +### Installation with pip +1. Create an environment with `FEniCS` and appropriate dependencies and activate environment +``` +conda create -n soupy -c conda-forge fenics==2019.1.0 matplotlib scipy jupyter +conda activate soupy +``` + +2. Install `hIPPYlib` via pip +``` +pip install hippylib +``` + +3. Install `SOUPy` via pip +``` +pip install soupy@git+https://github.com/hippylib/soupy +``` + +4. Clone the `SOUPy` directory to access examples +``` +git clone https://github.com/hippylib/soupy.git +``` + +Examples in the `applications` directory can now be run. We refer to the full `FEniCS` [installation instructions](https://hippylib.readthedocs.io/en/3.0.0/installation.html) from `hIPPYlib` for more detail. + +### Installation for developers +1. Create an environment with `FEniCS` with appropriate dependencies ``` conda create -n soupy -c conda-forge fenics==2019.1.0 matplotlib scipy jupyter ``` @@ -34,8 +60,8 @@ conda env config vars set HIPPYLIB_PATH=path/to/hippylib conda env config vars set SOUPY_PATH=path/to/soupy ``` -Examples in the `applications` directory can now be run. We refer to the full `FEniCS` [installation instructions](https://hippylib.readthedocs.io/en/3.0.0/installation.html) from `hIPPYlib` for more detail. - +Examples in the `examples` directory can now be run. + ## Build the SOUPy documentation using Sphinx Documentation for `SOUPy` can be built using `sphinx`, along with extensions diff --git a/README.md b/README.md index ed41edd..a9abcdf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ![Build Status](https://github.com/hippylib/soupy/actions/workflows/ci.yml/badge.svg) +[![Documentation Status](https://readthedocs.org/projects/hippylibsoupy/badge/?version=latest)](https://hippylibsoupy.readthedocs.io/en/latest/?badge=latest) # Stochastic Optimization under high-dimensional Uncertainty in Python diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..b7b8bb6 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,2 @@ +sphinx +myst_parser