Skip to content

CI: Unify required dependencies installation #16117

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

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ environment:
- PYTHON_VERSION: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
TEST_ALL: "no"
EXTRAREQS: "-r requirements/testing/travis36.txt"
- PYTHON_VERSION: "3.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
TEST_ALL: "no"
Expand All @@ -49,22 +50,18 @@ install:
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
- set PYTHONUNBUFFERED=1
- conda config --set always_yes true
- conda update --all
- conda config --set show_channel_urls yes
- conda config --prepend channels conda-forge
# this is now the downloaded conda...
- activate
- conda info -a

# For building, use a new environment which only includes the requirements for mpl
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
- conda create -q -n test-environment python=%PYTHON_VERSION%
freetype=2.6 tk=8.5
pip setuptools numpy sphinx tornado

# For building, use a new environment
- conda create -q -n test-environment python=%PYTHON_VERSION% tk
- activate test-environment
- echo %PYTHON_VERSION% %TARGET_ARCH%
- pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
# Install dependencies from PyPI.
- python -mpip install --upgrade -r requirements/testing/travis_all.txt %EXTRAREQS% %PINNEDVERS%
# Install optional dependencies from PyPI.
# Sphinx is needed to run sphinxext tests
- python -mpip install --upgrade sphinx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just go into EXTRAREQS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know, probably then GUIs also should go into EXTRAREQS


# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
# https://github.com/matplotlib/matplotlib/issues/9176
Expand All @@ -84,7 +81,7 @@ test_script:
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'

# this are optional dependencies so that we don't skip so many tests...
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to have lost pillow here as an optional dependency. Do you have a sense of many tests are not being ran as a result?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not. It is installed via pip from travis_all.txt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for the clarification :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think we should just delete cycler/numpy/pillow from travis_all.txt, given that we can rely on pip to install them (they're all straight dependencies). (and travis36minver will pin the oldest versions we want to test on that single test instance)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, but I will leave it for other PR.

# missing packages on conda-forge for avconv imagemagick
# This install sometimes failed randomly :-(
#- choco install imagemagick
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ install:
python -mpip install --upgrade $PRE -r requirements/testing/travis_all.txt $EXTRAREQS $PINNEDVERS
- |
# Install optional dependencies from PyPI.
# Sphinx is needed to run sphinxext tests
python -mpip install --upgrade sphinx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

# GUI toolkits are pip-installable only for some versions of Python so
# don't fail if we can't install them. Make it easier to check whether the
# install was successful by trying to import the toolkit (sometimes, the
Expand Down