Skip to content

Commit

Permalink
docs: standardize requirement files
Browse files Browse the repository at this point in the history
+ rename the following files:
   - readthedocs.yml -> .readthedocs.yaml
   - docs/requirements.txt -> docs/requirements4rtd.txt
   - docs/conda.txt -> docs/requirements.txt
   - docs/conda_env.yml -> docs/environment.yml

+ update installation notes in mintpy installation page, circle CI and docker file.
  • Loading branch information
yunjunz committed Jul 9, 2021
1 parent ec6cd18 commit f390551
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
git clone https://github.com/insarlab/PySolid.git ${HOME}/tools/PySolid
# install dependencies
source activate root
mamba install --verbose --yes --file ${MINTPY_HOME}/docs/conda.txt gdal>=3 fortran-compiler
mamba install --verbose --yes --file ${MINTPY_HOME}/docs/requirements.txt gdal>=3 fortran-compiler
pip install git+https://github.com/tylere/pykml.git
# compile pysolid Fortran code
cd ${HOME}/tools/PySolid/pysolid
Expand Down
6 changes: 3 additions & 3 deletions readthedocs.yml → .readthedocs.yaml
Expand Up @@ -17,9 +17,9 @@ mkdocs:
formats: all

# Optionally set the version of Python and requirements required to build your docs
# conda method does not work because of the "command killed due to excessive memory consumption" error
python:
version: 3.6
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements4rtd.txt

formats: []
2 changes: 1 addition & 1 deletion docker/Dockerfile
Expand Up @@ -55,7 +55,7 @@ RUN wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh &&

# Install dependencies
RUN ${PYTHON3DIR}/bin/conda config --add channels conda-forge && \
${PYTHON3DIR}/bin/conda install --yes --file ${MINTPY_HOME}/docs/conda.txt
${PYTHON3DIR}/bin/conda install --yes --file ${MINTPY_HOME}/docs/requirements.txt

# Install pykml
RUN ${PYTHON3DIR}/bin/pip install git+https://github.com/yunjunz/pykml.git
Expand Down
26 changes: 0 additions & 26 deletions docs/conda.txt

This file was deleted.

6 changes: 3 additions & 3 deletions docs/conda_env.yml → docs/environment.yml
@@ -1,5 +1,5 @@
# create environment : conda env create -f conda_env.yml
# update dependencies: conda env update -f conda_env.yml
# create environment : conda env create -f environment.yml
# update dependencies: conda env update -f environment.yml
# remove environment : conda env remove -n mintpy
# enter environment : conda activate mintpy
# exit environment : conda deactivate
Expand Down Expand Up @@ -32,7 +32,7 @@ dependencies:
- ecCodes
- netcdf4
- pygrib
- pyhdf
# - pyhdf # required by MERRA, which is currently not supported in pyaps3
# for pyresample
- pyresample
- openmp
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Expand Up @@ -71,7 +71,7 @@ Run the following in your terminal to install the dependencies to your conda env
# Add "gdal>=3" below to install extra dependencies if you use ARIA, FRInGE, HyP3 or GMTSAR
# Add "isce2" below to install extra dependencies if you use ISCE-2
conda install --yes -c conda-forge --file ~/tools/MintPy/docs/conda.txt
conda install --yes -c conda-forge --file ~/tools/MintPy/docs/requirements.txt
$CONDA_PREFIX/bin/pip install git+https://github.com/insarlab/PySolid.git
$CONDA_PREFIX/bin/pip install git+https://github.com/tylere/pykml.git
Expand All @@ -80,7 +80,7 @@ $CONDA_PREFIX/bin/pip install git+https://github.com/tylere/pykml.git
Or run the following in your terminal to install the dependencies to a new environment _**mintpy**_:

```
conda env create -f $MINTPY_HOME/docs/conda_env.yml
conda env create -f $MINTPY_HOME/docs/environment.yml
conda activate mintpy
```

Expand Down
29 changes: 22 additions & 7 deletions docs/requirements.txt
@@ -1,17 +1,32 @@
# requirements.txt for readthedocs, which uses pip and could not handle python>=3.6
# conda.txt for actual installation via conda
# conda_env.yml for actual installation via conda create environment
# ports.txt for actual installation via mac-ports
# setup.py for actual installation via pip [not finished yet]
# requirements4rtd.txt for readthedocs, which uses pip with limited memory usage
# requirements.txt for actual installation via conda
# environment.yml for actual installation via conda create environment
# ports.txt for actual installation via mac-ports
# setup.py for actual installation via pip [not finished yet]
python>=3.6,<3.9
cartopy
cvxopt
dask>=1.0
dask-jobqueue>=0.3
defusedxml
h5py
h5py<3
lxml
matplotlib
numpy
pip
pyproj
pyresample
scikit-image
scipy
# pyaps dependencies
cdsapi
ecCodes
netcdf4
pygrib
# pyhdf # required by MERRA, which is currently not supported in pyaps3
# pyresample dependencies
pyresample
openmp
pykdtree
xarray
zarr

8 changes: 8 additions & 0 deletions docs/requirements4rtd.txt
@@ -0,0 +1,8 @@
# requirements file to build Read the Docs ONLY
defusedxml
h5py
lxml
matplotlib
numpy
pyproj
scipy

0 comments on commit f390551

Please sign in to comment.