Skip to content

Commit 00206ad

Browse files
committed
fix: installation of build docs improvements
1 parent 5d9df07 commit 00206ad

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

.circleci/config.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,31 +120,62 @@ jobs:
120120
twine check dist/*
121121
122122
build_docs:
123-
docker:
124-
- image: python:3.7.4
123+
machine:
124+
# https://discuss.circleci.com/t/linux-machine-executor-images-2021-april-q2-update/39928
125+
# upgrade Docker version
126+
image: ubuntu-2004:202104-01
125127
environment:
126128
- FSLOUTPUTTYPE: NIFTI
127129
- SUBJECTS_DIR: /tmp/subjects
128130
steps:
129131
- checkout
132+
- restore_cache:
133+
keys:
134+
- env-v3-{{ .Branch }}-
135+
- env-v3-master-
136+
- env-v3-
137+
- run:
138+
name: Install base packages
139+
command: |
140+
export PATH="$HOME/.conda/bin:$PATH"
141+
if ! [ -x "$(command -v curl)" ]; then
142+
sudo apt-get update
143+
sudo apt-get install -y --no-install-recommends curl
144+
fi
145+
146+
if ! [ -x "$(command -v conda)" ]; then
147+
curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
148+
bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -b -p $HOME/.conda
149+
fi
150+
- run:
151+
name: Setup conda environment
152+
command: |
153+
$HOME/.conda/bin/conda install -y -c conda-forge -c anaconda graphviz pandoc curl "setuptools>=45" "setuptools_scm>=6.2" "pip>20" wheel sphinx=4 ipython
154+
$HOME/.conda/bin/python -m pip install --no-cache-dir -r docs/requirements.txt
155+
- save_cache:
156+
key: env-v3-{{ .Branch }}-{{ .BuildNum }}
157+
paths:
158+
- ~/.conda
159+
160+
- run:
161+
name: Check out git submodules
162+
command: git submodule update --init
130163
- run:
131164
name: Create subjects folder
132165
command: mkdir -p $SUBJECTS_DIR
133-
- run:
134-
name: Install Graphviz
135-
command: apt update && apt -y install graphviz
136166
- run:
137167
name: Install deps
138168
command: |
139-
pip install --no-cache-dir "setuptools>=45" "setuptools_scm >= 6.2"
169+
export PATH="$HOME/.conda/bin:$PATH"
140170
pip install --no-cache-dir -r docs/requirements.txt
141171
- run:
142172
name: Build only this commit
143173
command: |
174+
export PATH="$HOME/.conda/bin:$PATH"
144175
python setup.py --version
145-
make -C docs SPHINXOPTS="-W" BUILDDIR="/docs" CURBRANCH="${CIRCLE_TAG}" html
176+
make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/html" CURBRANCH="${CIRCLE_TAG}" html
146177
- store_artifacts:
147-
path: /docs/
178+
path: ~/html
148179

149180
deploy_pypi:
150181
docker:

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"sphinx.ext.napoleon",
4040
"sphinx.ext.viewcode",
4141
"sphinxcontrib.apidoc",
42-
"sphinx_multiversion",
4342
"nbsphinx",
4443
]
4544

docs/requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
docutils<0.17
2+
ipython
13
nbsphinx
24
packaging
5+
pandoc
36
pybids>=0.11.1
47
pydot>=1.2.3
58
pydotplus
69
requests
7-
sphinx-argparse
810
sphinx ~= 4.0
11+
sphinx-argparse
912
sphinx_rtd_theme >= 0.4.3
1013
sphinxcontrib-apidoc
11-
sphinx_multiversion
1214
tqdm

0 commit comments

Comments
 (0)