-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[MRG] MAINT moving to modern way of building docs. #9402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
cf33384
68cead4
2a7ab00
4aaeed3
11568d4
517de77
3f9399f
2cb396b
77846ee
2ac57d7
712774f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,18 +28,33 @@ apt-run: &apt-install | |
libgeos-dev \ | ||
otf-freefont | ||
|
||
conda-run: &conda-install | ||
conda36-run: &conda36-install | ||
name: Install conda | ||
command: | | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH | ||
export PATH="$MINICONDA_PATH/bin:$PATH" | ||
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
echo $PATH | ||
conda update --yes --quiet conda | ||
|
||
# Configure the conda environment and put it in the path using the | ||
# provided versions | ||
conda create -n $CONDA_ENV_NAME --yes --quiet python | ||
conda create -n testenv --yes --quiet python | ||
source activate testenv | ||
|
||
conda27-run: &conda27-install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these are templated so you don't need to write out two copies for Python 3 and 2. There should not be a separate 36 and 27 template. You can use an environment variable to differentiate if necessary (see the |
||
name: Install conda | ||
command: | | ||
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
conda update --yes --quiet conda | ||
|
||
# Configure the conda environment and put it in the path using the | ||
# provided versions | ||
conda create -n testenv --yes --quiet python | ||
source activate testenv | ||
|
||
fonts-run: &fonts-install | ||
|
@@ -66,23 +81,40 @@ pip-run: &pip-install | |
# Upgrade pip and setuptools and wheel to get as clean an install as possible | ||
name: Upgrade pip, setuptools, wheel | ||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate testenv | ||
pip install --upgrade pip | ||
pip install --upgrade wheel | ||
pip install --upgrade setuptools | ||
|
||
deps-run: &deps-install | ||
name: Install Python dependencies | ||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate testenv | ||
pip install python-dateutil numpy${NUMPY_VERSION} pyparsing!=2.1.6 cycler codecov coverage sphinx pillow | ||
pip install -r doc-requirements.txt | ||
|
||
mpl-run: &mpl-install | ||
name: Install Matplotlib | ||
command: pip install -ve . | ||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate testenv | ||
pip install -ve . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do the docs build with a non-editable installation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They should. I can switch to |
||
|
||
linkchecker-run: &linkchecker-install | ||
name: Install linkchecker | ||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate testenv | ||
pip install $PRE requests==2.9.2 linkchecker | ||
|
||
doc-run: &doc-build | ||
name: Build documentation | ||
command: make | ||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate testenv | ||
make | ||
working_directory: doc | ||
|
||
doc-bundle-run: &doc-bundle | ||
|
@@ -96,14 +128,14 @@ doc-bundle-run: &doc-bundle | |
# | ||
|
||
jobs: | ||
docs-python35: | ||
docs-python36: | ||
docker: | ||
- image: circleci/python:3.5 | ||
- image: circleci/python:3.6 | ||
steps: | ||
- checkout | ||
|
||
- run: *apt-install | ||
- run: *conda-install | ||
- run: *conda36-install | ||
- run: *fonts-install | ||
- run: *pip-install | ||
|
||
|
@@ -137,7 +169,7 @@ jobs: | |
- checkout | ||
|
||
- run: *apt-install | ||
- run: *conda-install | ||
- run: *conda27-install | ||
- run: *fonts-install | ||
- run: *pip-install | ||
|
||
|
@@ -147,7 +179,7 @@ jobs: | |
NUMPY_VERSION: "==1.7.1" | ||
# Linkchecker only works with python 2.7 for the time being. | ||
# Linkchecker is currently broken with requests 2.10.0 so force an earlier version. | ||
- run: pip install $PRE requests==2.9.2 linkchecker | ||
- run: *linkchecker-install | ||
- run: *mpl-install | ||
|
||
- run: *doc-build | ||
|
@@ -181,5 +213,5 @@ workflows: | |
version: 2 | ||
build: | ||
jobs: | ||
- docs-python35 | ||
- docs-python36 | ||
- docs-python27 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ ipython | |
mock | ||
numpydoc | ||
pillow | ||
sphinx-gallery>=0.1.12 | ||
sphinx-gallery | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why drop the pinning on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was a mistake… putting it back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why switch to conda? It looks like all we are using is python and then pip installing everything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switch to conda only for the environment: we now need to access the scripts "sphinx-build", and not only the library as before. When installing with --user, we either need to change the PYTHONPATH manually, or use conda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use
python -msphinx
instead? AFAIK sphinx-build is a strict synonym to it, except thatpython -msphinx
looks up PYTHONPATH (which is the same as what we did before in make.py) whereas sphinx-build uses PATH (which may be set differently).This relates to my earlier point about using the shorter/newer makefile generated by recent versions of sphinx.