Skip to content

Commit

Permalink
CI Use lock files for CircleCI doc builds (scikit-learn#23429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesteve committed May 24, 2022
1 parent c5fe6cb commit de65c26
Show file tree
Hide file tree
Showing 24 changed files with 540 additions and 73 deletions.
28 changes: 2 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,7 @@ jobs:
- OMP_NUM_THREADS: 2
- MKL_NUM_THREADS: 2
- CONDA_ENV_NAME: testenv
- PYTHON_VERSION: 3.8
- NUMPY_VERSION: 'min'
- SCIPY_VERSION: 'min'
- MATPLOTLIB_VERSION: 'min'
- CYTHON_VERSION: 'min'
- SCIKIT_IMAGE_VERSION: 'min'
- SPHINX_VERSION: 'min'
- PANDAS_VERSION: 'min'
- SPHINX_GALLERY_VERSION: 'min'
- NUMPYDOC_VERSION: 'min'
- SPHINX_PROMPT_VERSION: 'min'
- SPHINXEXT_OPENGRAPH_VERSION: 'min'
- LOCK_FILE: build_tools/circle/doc_min_dependencies_linux-64_conda.lock
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
Expand Down Expand Up @@ -53,20 +42,7 @@ jobs:
- OMP_NUM_THREADS: 2
- MKL_NUM_THREADS: 2
- CONDA_ENV_NAME: testenv
- PYTHON_VERSION: '3.9'
- NUMPY_VERSION: 'latest'
- SCIPY_VERSION: 'latest'
- MATPLOTLIB_VERSION: 'latest'
- CYTHON_VERSION: 'latest'
- SCIKIT_IMAGE_VERSION: 'latest'
# Bump the sphinx version from time to time. Avoid latest sphinx version
# that tends to break things slightly too often
- SPHINX_VERSION: 4.2.0
- PANDAS_VERSION: 'latest'
- SPHINX_GALLERY_VERSION: 'latest'
- NUMPYDOC_VERSION: 'latest'
- SPHINX_PROMPT_VERSION: 'latest'
- SPHINXEXT_OPENGRAPH_VERSION: 'latest'
- LOCK_FILE: build_tools/circle/doc_linux-64_conda.lock
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.. |JoblibMinVersion| replace:: 1.0.0
.. |ThreadpoolctlMinVersion| replace:: 2.0.0
.. |MatplotlibMinVersion| replace:: 3.1.2
.. |Scikit-ImageMinVersion| replace:: 0.14.5
.. |Scikit-ImageMinVersion| replace:: 0.16.2
.. |PandasMinVersion| replace:: 1.0.5
.. |SeabornMinVersion| replace:: 0.9.0
.. |PytestMinVersion| replace:: 5.0.1
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/debian_atlas_32bit_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
cython
joblib==1.0.0 # min
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- defaults
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/py38_conda_forge_mkl_environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/py38_pip_openblas_32bit_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
numpy
scipy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- defaults
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- defaults
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/pylatest_pip_scipy_dev_environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- defaults
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/pypy3_environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/ubuntu_atlas_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for all Azure CI builds:
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
cython
joblib==1.0.0 # min
Expand Down
33 changes: 5 additions & 28 deletions build_tools/circle/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,35 +153,12 @@ export PATH="/usr/lib/ccache:$MINICONDA_PATH/bin:$PATH"
ccache -M 512M
export CCACHE_COMPRESS=1

# Old packages coming from the 'free' conda channel have been removed but we
# are using them for our min-dependencies doc generation. See
# https://www.anaconda.com/why-we-removed-the-free-channel-in-conda-4-7/ for
# more details.
if [[ "$CIRCLE_JOB" == "doc-min-dependencies" ]]; then
conda config --set restore_free_channel true
fi

# imports get_dep
source build_tools/shared.sh

# packaging won't be needed once setuptools starts shipping packaging>=17.0
mamba create -n $CONDA_ENV_NAME --yes --quiet \
python="${PYTHON_VERSION:-*}" \
"$(get_dep numpy $NUMPY_VERSION)" \
"$(get_dep scipy $SCIPY_VERSION)" \
"$(get_dep cython $CYTHON_VERSION)" \
"$(get_dep matplotlib $MATPLOTLIB_VERSION)" \
"$(get_dep sphinx $SPHINX_VERSION)" \
"$(get_dep pandas $PANDAS_VERSION)" \
joblib memory_profiler packaging seaborn pillow pytest coverage \
compilers
# pin conda-lock to latest released version (needs manual update from time to time)
mamba install conda-lock==1.0.5 -y
conda-lock install --name $CONDA_ENV_NAME $LOCK_FILE
source activate $CONDA_ENV_NAME

source activate testenv
pip install "$(get_dep scikit-image $SCIKIT_IMAGE_VERSION)"
pip install "$(get_dep sphinx-gallery $SPHINX_GALLERY_VERSION)"
pip install "$(get_dep numpydoc $NUMPYDOC_VERSION)"
pip install "$(get_dep sphinx-prompt $SPHINX_PROMPT_VERSION)"
pip install "$(get_dep sphinxext-opengraph $SPHINXEXT_OPENGRAPH_VERSION)"
mamba list

# Set parallelism to 3 to overlap IO bound tasks with CPU bound tasks on CI
# workers with 2 cores when building the compiled extensions of scikit-learn.
Expand Down
30 changes: 30 additions & 0 deletions build_tools/circle/doc_environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
channels:
- conda-forge
dependencies:
- python=3.9
- numpy
- blas
- scipy
- cython
- joblib
- threadpoolctl
- matplotlib
- pandas
- pyamg
- pytest=6.2.5
- pytest-xdist
- pillow
- scikit-image
- seaborn
- memory_profiler
- compilers
- sphinx
- sphinx-gallery
- numpydoc
- sphinx-prompt
- pip
- pip:
- sphinxext-opengraph
Loading

0 comments on commit de65c26

Please sign in to comment.