Skip to content

Commit

Permalink
[INFRA] Add tests min requirements with Matplotlib (#3144)
Browse files Browse the repository at this point in the history
* Add tests min req with matplotlib

* remove useless variable

* [circle full] update README
  • Loading branch information
NicolasGensollen authored and achamma723 committed Jan 28, 2022
1 parent fb5c56b commit 27e00f0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/testing.yml
Expand Up @@ -55,6 +55,36 @@ jobs:
if: success()
name: 'Upload coverage to CodeCov'

min_requirements_matplotlib:
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: "ubuntu-latest"
name: Python 3.6, minimal requirements with Matplotlib
defaults:
run:
shell: bash
env:
MIN_REQUIREMENTS: true
MATPLOTLIB: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
name: 'Setup python'
- shell: bash -l {0}
name: 'Display Python version'
run: python -c "import sys; print(sys.version)"
- shell: bash -l {0}
run: ./build_tools/github/dependencies.sh
name: 'Install dependencies'
- shell: bash -l {0}
run: ./build_tools/github/install.sh
name: 'Install nilearn'
- shell: bash -l {0}
run: ./build_tools/github/test.sh
name: 'Run tests'

latest:
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
Expand Down
3 changes: 1 addition & 2 deletions README.rst
Expand Up @@ -53,8 +53,7 @@ The required dependencies to use the software are:
* Nibabel >= 3.0
* Pandas >= 1.0

If you are using nilearn plotting functionalities or running the
examples, matplotlib >= 1.5.1 is required.
If you are using nilearn plotting functionalities or running the examples, matplotlib >= 3.0 is required.

Some plotting functions in Nilearn support both matplotlib and plotly as plotting engines.
In order to use the plotly engine in these functions, you will need to install both plotly and kaleido, which can both be installed with pip and anaconda.
Expand Down
3 changes: 3 additions & 0 deletions build_tools/github/dependencies.sh
Expand Up @@ -3,6 +3,9 @@
python -m pip install --progress-bar off --upgrade pip setuptools wheel flake8
if [ ! -z "$MIN_REQUIREMENTS" ]; then
pip install --progress-bar off --upgrade -r requirements-min.txt
if [ ! -z "$MATPLOTLIB" ]; then
pip install --progress-bar off --upgrade matplotlib==3.0
fi
else
pip install --progress-bar off --upgrade -r requirements-dev.txt
fi

0 comments on commit 27e00f0

Please sign in to comment.