Skip to content

Commit 9650efc

Browse files
authored
Merge pull request #531 from xylar/fix_the_docs_master
Update ReadTheDocs on master
2 parents 19eabf4 + e47e412 commit 9650efc

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ to be generated and is set up properly.
262262

263263
To generate the `sphinx` documentation, run:
264264
```bash
265-
conda install sphinx sphinx_rtd_theme numpydoc m2r tabulate
265+
conda env create -f docs/environment.yml
266+
conda activate mpas-analysis-docs
267+
python setup.py install
266268
cd docs
267269
make html
268270
```

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
import sys
1717
import m2r
1818
from glob import glob
19-
sys.path.insert(0, os.path.abspath('..'))
2019
import mpas_analysis
20+
# a hack to get basemap to work
21+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
22+
if on_rtd:
23+
os.environ['PROJ_LIB'] = '{}/{}/share/proj'.format(
24+
os.environ['CONDA_ENVS_PATH'], os.environ['CONDA_DEFAULT_ENV'])
25+
from mpas_analysis.__main__ import add_task_and_subtasks
2126
from docs.parse_table import build_rst_table_from_xml, build_obs_pages_from_xml
2227
from docs.parse_quick_start import build_quick_start
2328

docs/environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: mpas-analysis-docs
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.6
5+
- python=3.7
66
- pytest
77
- numpy
88
- scipy
@@ -24,3 +24,4 @@ dependencies:
2424
- numpydoc
2525
- tabulate >= 0.8.2
2626
- m2r
27+
- shapely

readthedocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
conda:
22
file: docs/environment.yml
33
build:
4-
image: latest
4+
image: latest
55
python:
6-
version: 3.6
7-
setup_py_install: false
6+
version: 3.7
7+
setup_py_install: true
88
# Build PDF
99
formats:
1010
- pdf

0 commit comments

Comments
 (0)