diff --git a/.circleci/config.yml b/.circleci/config.yml index 671f5fe839c..00282a645e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,14 +87,7 @@ jobs: - run: name: Get Python running command: | - python -m pip uninstall -y pydata-sphinx-theme - python -m pip install --user --upgrade --progress-bar off pip setuptools - python -m pip install --user --upgrade --progress-bar off --pre sphinx - python -m pip install --user --upgrade --progress-bar off -r requirements.txt -r requirements_testing.txt -r requirements_doc.txt - python -m pip install --user --progress-bar off https://github.com/pyvista/pyvista/zipball/master - python -m pip install --user --progress-bar off https://github.com/pyvista/pyvistaqt/zipball/master - python -m pip uninstall -yq pysurfer mayavi - python -m pip install --user -e . + ./tools/circleci_dependencies.sh - save_cache: key: pip-cache diff --git a/.github/workflows/linux_pip.yml b/.github/workflows/linux_pip.yml index d401782e577..e60d21c2728 100644 --- a/.github/workflows/linux_pip.yml +++ b/.github/workflows/linux_pip.yml @@ -1,4 +1,4 @@ -name: 'linux / pip' +name: 'linux / pip-pre' on: push: branches: @@ -22,7 +22,7 @@ jobs: commit-filter: '[skip ci];[ci skip];[skip github]' commit-filter-separator: ';' - # PIP + non-default stim channel + log level info + # PIP-pre + non-default stim channel + log level info job: needs: check_skip if: ${{ needs.check_skip.outputs.skip == 'false' }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 95625aa4d0d..1e260d4cd48 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -198,7 +198,7 @@ stages: TEST_MODE: 'pip' PYTHON_VERSION: '3.7' 3.8 pip pre: - TEST_MODE: 'pre-pip' + TEST_MODE: 'pip-pre' PYTHON_VERSION: '3.8' OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 steps: @@ -207,7 +207,7 @@ stages: versionSpec: $(PYTHON_VERSION) architecture: $(PYTHON_ARCH) addToPath: true - condition: in(variables['TEST_MODE'], 'pip', 'pre-pip') + condition: in(variables['TEST_MODE'], 'pip', 'pip-pre') displayName: 'Get Python' # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda # https://github.com/MicrosoftDocs/pipelines-anaconda @@ -223,33 +223,8 @@ stages: displayName: Install OpenGL - bash: | set -e - python -m pip install --upgrade pip setuptools - python -m pip install --upgrade numpy scipy vtk - python -m pip install --upgrade --use-deprecated=legacy-resolver --only-binary="numba,llvmlite" -r requirements.txt -r requirements_testing.txt - python -m pip install codecov - condition: eq(variables['TEST_MODE'], 'pip') - displayName: 'Install dependencies with pip' - - bash: | - set -e - python -m pip install --upgrade pip setuptools - python -m pip install --use-deprecated=legacy-resolver --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" numpy - python -m pip install --use-deprecated=legacy-resolver --upgrade --pre --only-binary ":all:" -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow - python -m pip install --upgrade --only-binary vtk vtk; - python -m pip install https://github.com/pyvista/pyvista/zipball/master - python -m pip install https://github.com/pyvista/pyvistaqt/zipball/master - python -m pip install --use-deprecated=legacy-resolver --only-binary="numba,llvmlite" -r requirements.txt -r requirements_testing.txt codecov - condition: eq(variables['TEST_MODE'], 'pre-pip') - displayName: 'Install dependencies with pip --pre' - - powershell: | - Set-StrictMode -Version Latest - $ErrorActionPreference = "Stop" - $PSDefaultParameterValues['*:ErrorAction']='Stop' - conda update -n base -c defaults conda - conda env update --name base --file environment.yml - pip uninstall -yq mne - pip install -r requirements_testing.txt codecov - condition: eq(variables['TEST_MODE'], 'conda') - displayName: 'Install dependencies with conda' + ./tools/azure_dependencies.sh + displayName: 'Install dependencies' - script: python setup.py develop displayName: 'Install MNE-Python dev' - script: mne sys_info diff --git a/tools/azure_dependencies.sh b/tools/azure_dependencies.sh new file mode 100755 index 00000000000..eca4e32b8d5 --- /dev/null +++ b/tools/azure_dependencies.sh @@ -0,0 +1,24 @@ +#!/bin/bash -ef + +if [ "${TEST_MODE}" == "conda" ]; then + conda update -n base -c defaults conda + conda env update --name base --file environment.yml + pip uninstall -yq mne +elif [ "${TEST_MODE}" == "pip" ]; then + python -m pip install --upgrade pip setuptools + python -m pip install --upgrade numpy scipy vtk + python -m pip install --use-deprecated=legacy-resolver --only-binary="numba,llvmlite" -r requirements.txt +elif [ "${TEST_MODE}" == "pip-pre" ]; then + python -m pip install --upgrade pip setuptools + python -m pip install --use-deprecated=legacy-resolver --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" numpy + python -m pip install --use-deprecated=legacy-resolver --upgrade --pre --only-binary ":all:" -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn h5py Pillow + python -m pip install --use-deprecated=legacy-resolver --upgrade --only-binary ":all:" matplotlib + python -m pip install --upgrade --only-binary vtk vtk; + python -m pip install https://github.com/pyvista/pyvista/zipball/master + python -m pip install https://github.com/pyvista/pyvistaqt/zipball/master + python -m pip install --use-deprecated=legacy-resolver --only-binary="numba,llvmlite" -r requirements.txt +else + echo "Unknown run type ${TEST_MODE}" + exit 1 +fi +python -m pip install -r requirements_testing.txt codecov diff --git a/tools/circleci_dependencies.sh b/tools/circleci_dependencies.sh new file mode 100755 index 00000000000..0f6dd37907d --- /dev/null +++ b/tools/circleci_dependencies.sh @@ -0,0 +1,10 @@ +#!/bin/bash -ef + +python -m pip uninstall -y pydata-sphinx-theme +python -m pip install --user --upgrade --progress-bar off pip setuptools +python -m pip install --user --upgrade --progress-bar off --pre sphinx +python -m pip install --user --upgrade --progress-bar off -r requirements.txt -r requirements_testing.txt -r requirements_doc.txt +python -m pip install --user --progress-bar off https://github.com/pyvista/pyvista/zipball/master +python -m pip install --user --progress-bar off https://github.com/pyvista/pyvistaqt/zipball/master +python -m pip uninstall -yq pysurfer mayavi +python -m pip install --user -e . diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index a54f5dcaabd..be2f0fc0503 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -4,13 +4,14 @@ if [ ! -z "$CONDA_ENV" ]; then pip uninstall -yq mne elif [ ! -z "$CONDA_DEPENDENCIES" ]; then conda install -y $CONDA_DEPENDENCIES -else # pip 3.9 (missing statsmodels and dipy) +else # pip --pre 3.9 (missing statsmodels and dipy) python -m pip install --progress-bar off --upgrade "pip!=20.3.0" setuptools wheel pip uninstall -yq numpy pip install --progress-bar off --upgrade --pre --only-binary ":all:" python-dateutil pytz joblib threadpoolctl pip install --use-deprecated=legacy-resolver --progress-bar off --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" numpy scipy pip install --progress-bar off --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" pandas scikit-learn - pip install --progress-bar off --upgrade --pre --only-binary ":all:" -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" matplotlib + # pip install --progress-bar off --upgrade --pre --only-binary ":all:" -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" matplotlib + pip install --progress-bar off --upgrade --only-binary ":all:" matplotlib # built using vtk master branch on an Ubuntu 18.04.5 VM and uploaded to OSF: wget -q https://osf.io/kej3v/download -O vtk-9.0.20201117-cp39-cp39-linux_x86_64.whl pip install vtk-9.0.20201117-cp39-cp39-linux_x86_64.whl