diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bad6d80a5b..66a78005dbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,8 +99,10 @@ jobs: name: Install fonts needed for diagrams command: | mkdir -p $HOME/.fonts + echo "Source Code Pro" curl https://codeload.github.com/adobe-fonts/source-code-pro/tar.gz/2.038R-ro/1.058R-it/1.018R-VAR | tar xz -C $HOME/.fonts - curl https://codeload.github.com/adobe-fonts/source-sans-pro/tar.gz/3.028R | tar xz -C $HOME/.fonts + echo "Source Sans Pro" + curl https://codeload.github.com/adobe-fonts/source-sans/tar.gz/3.028R | tar xz -C $HOME/.fonts fc-cache -f # Load pip cache diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d535e037c0a..93c104576a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,6 +57,9 @@ jobs: - os: macos-latest python: '3.8' kind: mamba + - os: windows-latest + python: '3.10' + kind: mamba - os: ubuntu-latest python: '3.8' kind: minimal @@ -82,9 +85,9 @@ jobs: # Python (if conda) - uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: ${{ env.CONDA_ACTIVATE_ENV }} python-version: ${{ env.PYTHON_VERSION }} environment-file: ${{ env.CONDA_ENV }} + activate-environment: mne miniforge-version: latest miniforge-variant: Mambaforge use-mamba: ${{ matrix.kind != 'conda' }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ccea1813875..bc36111280b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -242,10 +242,8 @@ stages: variables: MNE_LOGGING_LEVEL: 'warning' MNE_FORCE_SERIAL: 'true' - OPENBLAS_NUM_THREADS: 1 - MKL_NUM_THREADS: 2 + OPENBLAS_NUM_THREADS: 2 OMP_DYNAMIC: 'false' - MKL_DYNAMIC: 'false' PYTHONUNBUFFERED: 1 PYTHONIOENCODING: 'utf-8' AZURE_CI_WINDOWS: 'true' @@ -254,10 +252,6 @@ stages: strategy: maxParallel: 4 matrix: - 3.10 conda: - PLATFORM: 'x86-64' - TEST_MODE: 'conda' - PYTHON_VERSION: '3.10' 3.9 pip: TEST_MODE: 'pip' PYTHON_VERSION: '3.9' @@ -270,44 +264,16 @@ stages: versionSpec: $(PYTHON_VERSION) architecture: $(PYTHON_ARCH) addToPath: true - 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 - # https://github.com/ContinuumIO/anaconda-issues/issues/10949 - - script: | - echo "##vso[task.prependpath]%CONDA%;%CONDA%\condabin;%CONDA%\Scripts;%CONDA%\Library\bin;%PROGRAMFILES%\Git\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%PROGRAMFILES%\Git\usr\bin" - condition: in(variables['TEST_MODE'], 'conda') - displayName: Add conda to PATH, deal with Qt linking bug - bash: | - set -e + set -eo pipefail git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git powershell gl-ci-helpers/appveyor/install_opengl.ps1 displayName: Install OpenGL - - bash: | - set -e - ./tools/azure_dependencies.sh - condition: in(variables['TEST_MODE'], 'pip', 'pip-pre') + - bash: ./tools/azure_dependencies.sh displayName: Install dependencies with pip - - script: conda install -c conda-forge "mamba!=1.4.9" - condition: eq(variables['TEST_MODE'], 'conda') - displayName: Get mamba - - script: mamba env update --name base --file environment.yml - condition: eq(variables['TEST_MODE'], 'conda') - displayName: Setup MNE environment - # ipympl is not tested on Windows and even its installation interferes - # with basic matplotlib functionality so it must be uninstalled until fixed - - bash: | - set -e - mamba remove -c conda-forge --force -yq mne ipympl - rm /c/Miniconda/Scripts/mne.exe - condition: eq(variables['TEST_MODE'], 'conda') - displayName: Remove old MNE - script: pip install -e . displayName: 'Install MNE-Python dev' - - script: pip install --progress-bar off -e .[test] - condition: eq(variables['TEST_MODE'], 'conda') - displayName: Install testing requirements - script: mne sys_info -pd displayName: 'Print config' - script: python -c "import numpy; numpy.show_config()" diff --git a/tools/azure_dependencies.sh b/tools/azure_dependencies.sh index 380113d1127..cc618c52f53 100755 --- a/tools/azure_dependencies.sh +++ b/tools/azure_dependencies.sh @@ -5,7 +5,7 @@ if [ "${TEST_MODE}" == "pip" ]; then python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade --only-binary="numba,llvmlite,numpy,scipy,vtk" -r requirements.txt elif [ "${TEST_MODE}" == "pip-pre" ]; then - python -m pip install --progress-bar off --upgrade pip setuptools wheel packaging + python -m pip install --progress-bar off --upgrade pip setuptools wheel packaging setuptools_scm python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --extra-index-url "https://www.riverbankcomputing.com/pypi/simple" PyQt6 PyQt6-sip PyQt6-Qt6 python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" numpy scipy statsmodels pandas scikit-learn matplotlib python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scipy-wheels-nightly/simple" dipy diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index cec75a75e1a..9ac14002c37 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -4,7 +4,8 @@ STD_ARGS="--progress-bar off --upgrade" EXTRA_ARGS="" if [ ! -z "$CONDA_ENV" ]; then echo "Uninstalling MNE for CONDA_ENV=${CONDA_ENV}" - pip uninstall -yq mne + conda remove -c conda-forge --force -yq mne + python -m pip uninstall -y mne elif [ ! -z "$CONDA_DEPENDENCIES" ]; then echo "Using Mamba to install CONDA_DEPENDENCIES=${CONDA_DEPENDENCIES}" mamba install -y $CONDA_DEPENDENCIES @@ -37,13 +38,19 @@ else pip install --progress-bar off git+https://github.com/mne-tools/mne-qt-browser EXTRA_ARGS="--pre" fi +echo "" + # for compat_minimal and compat_old, we don't want to --upgrade if [ ! -z "$CONDA_DEPENDENCIES" ]; then - pip install -r requirements_base.txt -r requirements_testing.txt + echo "Installing dependencies for conda" + python -m pip install -r requirements_base.txt -r requirements_testing.txt else - pip install $STD_ARGS $EXTRA_ARGS -r requirements_base.txt -r requirements_testing.txt -r requirements_hdf5.txt + echo "Installing dependencies using pip" + python -m pip install $STD_ARGS $EXTRA_ARGS -r requirements_base.txt -r requirements_testing.txt -r requirements_hdf5.txt fi +echo "" if [ "${DEPS}" != "minimal" ]; then - pip install $STD_ARGS $EXTRA_ARGS -r requirements_testing_extra.txt + echo "Installing non-minimal dependencies" + python -m pip install $STD_ARGS $EXTRA_ARGS -r requirements_testing_extra.txt fi diff --git a/tools/github_actions_env_vars.sh b/tools/github_actions_env_vars.sh index cf1dbdb45a5..6b479c76b34 100755 --- a/tools/github_actions_env_vars.sh +++ b/tools/github_actions_env_vars.sh @@ -4,23 +4,19 @@ set -eo pipefail -x # old and minimal use conda if [[ "$MNE_CI_KIND" == "old" ]]; then echo "Setting conda env vars for old" - echo "CONDA_ACTIVATE_ENV=true" >> $GITHUB_ENV echo "CONDA_DEPENDENCIES=numpy=1.20.2 scipy=1.6.3 matplotlib=3.4 pandas=1.2.4 scikit-learn=0.24.2" >> $GITHUB_ENV echo "MNE_IGNORE_WARNINGS_IN_TESTS=true" >> $GITHUB_ENV echo "MNE_SKIP_NETWORK_TESTS=1" >> $GITHUB_ENV elif [[ "$MNE_CI_KIND" == "minimal" ]]; then echo "Setting conda env vars for minimal" - echo "CONDA_ACTIVATE_ENV=true" >> $GITHUB_ENV echo "CONDA_DEPENDENCIES=numpy scipy matplotlib" >> $GITHUB_ENV elif [[ "$MNE_CI_KIND" == "notebook" ]]; then echo "CONDA_ENV=environment.yml" >> $GITHUB_ENV - echo "CONDA_ACTIVATE_ENV=mne" >> $GITHUB_ENV # TODO: This should work but breaks stuff... # echo "MNE_3D_BACKEND=notebook" >> $GITHUB_ENV elif [[ "$MNE_CI_KIND" != "pip"* ]]; then # conda, mamba (use warning level for completeness) echo "Setting conda env vars for $MNE_CI_KIND" echo "CONDA_ENV=environment.yml" >> $GITHUB_ENV - echo "CONDA_ACTIVATE_ENV=mne" >> $GITHUB_ENV echo "MNE_QT_BACKEND=PyQt5" >> $GITHUB_ENV echo "MNE_LOGGING_LEVEL=warning" >> $GITHUB_ENV else # pip-like diff --git a/tools/github_actions_test.sh b/tools/github_actions_test.sh index d4fa197dad4..1f89d926fed 100755 --- a/tools/github_actions_test.sh +++ b/tools/github_actions_test.sh @@ -2,7 +2,7 @@ set -eo pipefail -if [[ "${CI_OS_NAME}" != "macos"* ]]; then +if [[ "${CI_OS_NAME}" == "ubuntu"* ]]; then if [[ "${MNE_CI_KIND}" == "pip-pre" ]]; then CONDITION="not (slowtest or pgtest)" else