Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Resolve the version issues on RTD (pydata#3589)
Browse files Browse the repository at this point in the history
* add the project root to PYTHONPATH and sys.path

* don't install the package

* update the requirements for the documentation environment

so we definitely trigger the version collision.

* comment on the reasons for the sys.path and os.environ modifications
  • Loading branch information
keewis authored and max-sixty committed Dec 3, 2019
1 parent 69c85b8 commit ed05f98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 2 additions & 5 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- python=3.7
- bottleneck
- cartopy
- eccodes
- cfgrib
- h5netcdf
- ipykernel
- ipython
Expand All @@ -21,8 +21,5 @@ dependencies:
- seaborn
- sphinx
- sphinx_rtd_theme
- xarray
- zarr
- pip
- pip:
- cfgrib

6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@

import datetime
import os
import pathlib
import subprocess
import sys
from contextlib import suppress

# make sure the source version is preferred (#3567)
root = pathlib.Path(__file__).absolute().parent.parent
os.environ["PYTHONPATH"] = str(root)
sys.path.insert(0, str(root))

import xarray

allowed_failures = set()
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ conda:
file: ci/requirements/doc.yml
python:
version: 3.7
setup_py_install: true
setup_py_install: false
formats: []

0 comments on commit ed05f98

Please sign in to comment.