Skip to content

Commit

Permalink
Also install the package in the docs (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Apr 1, 2022
1 parent dca6eec commit bcf5a6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ build:
conda:
environment: docs/environment.yml
sphinx:
configuration: docs/conf.py
configuration: docs/conf.py
fail_on_warning: true
36 changes: 8 additions & 28 deletions BUILD_HOWTO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,14 @@ Sphinx Documentation has an excellent `introduction to reST
<http://sphinx.pocoo.org/rest.html>`__. Review the Sphinx docs to perform more
complex changes to the documentation as well.

How to build the documentation
------------------------------

Requirements
~~~~~~~~~~~~

There are some extra requirements to build the docs: you will need to
have ``sphinx``, ``sphinx-book-theme``, ``numpydoc`` and ``ipython`` installed.

We recommend to use conda (or mamba) to create an environment for oggm-edu.
Create a text file called `oggm_edu_docs.yaml` with the following content
in it::


name: oggm_edu_docs
channels:
- conda-forge
dependencies:
- sphinx
- sphinx-book-theme
- ipython
- numpydoc
- sphinx-intl

Then, from your `base` environment, do `mamba env create -f oggm_edu_docs.yml`
(or `conda env create -f oggm_edu_docs.yml`). To activate the environment,
type: `conda activate oggm_edu_docs`.

Installation
------------

Download (or clone) the latest version of the oggm-edu repository.
From the repository's root folder, activate conda if necessary and then,
from your `base` environment, run ``mamba env create -f docs/environment.yml``
(or ``conda env create -f docs/environment.yml``). To activate the environment,
type: ``conda activate oggm_edu_docs``.

Building the documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 3 additions & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ dependencies:
- joblib
- progressbar2
- git+https://github.com/OGGM/pytest-mpl
- oggm
- oggm
# relative to this file. Needs to be editable to be accepted.
- -e ..

0 comments on commit bcf5a6c

Please sign in to comment.