From 5261ad6b1142d47eb99157aca2dfbb0be08de546 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:15:19 +0100 Subject: [PATCH 01/91] Test matrix with pip job [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 50 ++++++++++++++++++++++++++++ tools/get_minimal_commands.sh | 4 +++ tools/github_actions_dependencies.sh | 15 +++++++-- tools/github_actions_test.sh | 21 ++++++++++++ 4 files changed, 88 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f89046655fd..710dc0f4da5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,6 +8,56 @@ on: - '*' jobs: + Pip: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + DISPLAY: ':99.0' + MNE_LOGGING_LEVEL: 'warning' + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + TRAVIS_OS_NAME: 'linux' + strategy: + matrix: + include: + - PYTHON_VERSION: '3.8' + MNE_STIM_CHANNEL: 'STI101' + MNE_LOGGING_LEVEL: 'info' + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' + Conda: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest diff --git a/tools/get_minimal_commands.sh b/tools/get_minimal_commands.sh index 37d5777cc90..61af8c34a61 100755 --- a/tools/get_minimal_commands.sh +++ b/tools/get_minimal_commands.sh @@ -1,5 +1,9 @@ #!/bin/bash -ef +if [ "${DEPS}" == "minimal" ]; then + exit 0 +fi + pushd ~ > /dev/null export MNE_ROOT="${PWD}/minimal_cmds" export PATH=${MNE_ROOT}/bin:$PATH diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index d62670d1b63..f215d394028 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,5 +1,16 @@ #!/bin/bash -ef -pip uninstall -yq mne +if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then + pip uninstall -yq numpy + pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" + pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow + pip install https://github.com/pyvista/pyvista/zipball/master + pip install https://github.com/pyvista/pyvistaqt/zipball/master + pip install --upgrade -r requirements.txt +else + pip uninstall -yq mne +fi pip install --upgrade -r requirements_testing.txt -pip install nitime +if [ "${DEPS}" != "minimal" ]; then + pip install nitime +fi diff --git a/tools/github_actions_test.sh b/tools/github_actions_test.sh index 93ab26e706d..8cb1c755931 100755 --- a/tools/github_actions_test.sh +++ b/tools/github_actions_test.sh @@ -1,5 +1,17 @@ #!/bin/bash -ef +# Remove numpydoc tests on older Python (builtin docstrings not as good) +if [ "${PYTHON_VERSION}" == "3.6" ]; then + pip uninstall -yq numpydoc; +fi; + +# Test run_tests_if_main +if [ "${DEPS}" == "minimal" ]; then + pip uninstall -yq mne; + pip install -e .; + python mne/tests/test_evoked.py; +fi; + USE_DIRS="mne/" if [ "${TRAVIS_OS_NAME}" != "osx" ]; then CONDITION="not ultraslowtest" @@ -8,3 +20,12 @@ else fi echo 'pytest -m "${CONDITION}" --tb=short --cov=mne --cov-report xml -vv ${USE_DIRS}' pytest -m "${CONDITION}" --tb=short --cov=mne --cov-report xml -vv ${USE_DIRS} + +# run the minimal one with the testing data as well +if [ "${DEPS}" == "minimal" ]; then + export MNE_SKIP_TESTING_DATASET_TESTS=false; + python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; +fi; +if [ "${DEPS}" == "minimal" ]; then + pytest -m "${CONDITION}" --tb=short --cov=mne -vv ${USE_DIRS}; +fi; From b65833c3d1a7528feadb38a6972d9de549fffc6f Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:26:54 +0100 Subject: [PATCH 02/91] Tweak pip job [skip circle][skip azp][skip travis] --- tools/github_actions_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index f215d394028..921218301a4 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,7 +1,7 @@ #!/bin/bash -ef if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then - pip uninstall -yq numpy + # pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow pip install https://github.com/pyvista/pyvista/zipball/master From 9b9942e5d387a4095781f315e8aa7e1681d221d2 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:52:11 +0100 Subject: [PATCH 03/91] Test matrix with pip job [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 5 +++++ tools/github_actions_dependencies.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 710dc0f4da5..9efb2bd0481 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -34,6 +34,11 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' + - if: "!$CONDA_DEPENDENCIES" + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.PYTHON_VERSION }} + name: 'Setup python' - shell: bash -el {0} run: | ./tools/github_actions_dependencies.sh diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 921218301a4..f215d394028 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,7 +1,7 @@ #!/bin/bash -ef if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then - # pip uninstall -yq numpy + pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow pip install https://github.com/pyvista/pyvista/zipball/master From 7de604fb7981ad625df2a3464b885adcce7c60ea Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:54:11 +0100 Subject: [PATCH 04/91] Test matrix with pip job [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9efb2bd0481..bfce36267e1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -34,8 +34,7 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: "!$CONDA_DEPENDENCIES" - uses: actions/setup-python@v2 + - uses: actions/setup-python@v2 with: python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup python' From be4a5a1ee0eaa56454aa2123960a2f7dc3b2519e Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:58:10 +0100 Subject: [PATCH 05/91] Test matrix with pip job [skip circle][skip azp][skip travis] --- tools/github_actions_dependencies.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index f215d394028..f1ab72165ce 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,6 +1,7 @@ #!/bin/bash -ef if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then + python -m pip install --upgrade pip setuptools wheel pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow From 5ec9160b9891c183e48b1429594d7d3e76ee384c Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 15:59:44 +0100 Subject: [PATCH 06/91] TST: Remove Azure temporarily --- azure-pipelines.yml | 249 -------------------------------------------- 1 file changed, 249 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 47cb785cb86..00000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,249 +0,0 @@ -trigger: - # start a new build for every push - batch: False - branches: - include: - - 'master' - - 'maint/*' -pr: - branches: - include: - - '*' # must quote since "*" is a YAML reserved character; we want a string - -jobs: - -- job: Style - pool: - vmImage: 'ubuntu-18.04' - variables: - PYTHON_VERSION: '3.8' - PYTHON_ARCH: 'x64' - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: $(PYTHON_VERSION) - architecture: $(PYTHON_ARCH) - addToPath: true - displayName: 'Get Python' - - bash: | - set -e - python -m pip install --upgrade pip setuptools - python -m pip install numpy scipy matplotlib -r requirements_testing.txt - displayName: Install dependencies - condition: always() - - bash: | - make flake - displayName: make flake - condition: always() - - bash: | - make pydocstyle - displayName: make pydocstyle - condition: always() - - bash: | - make codespell-error - displayName: make codespell-error - condition: always() - - bash: | - make docstring - displayName: make docstring - - bash: | - make nesting - displayName: make nesting - condition: always() - - bash: | - make check-manifest - displayName: make check-manifest - condition: always() - - bash: | - make check-readme - displayName: make check-readme - condition: always() - - -- job: Ultraslow - pool: - vmImage: 'ubuntu-18.04' - variables: - DISPLAY: ':99' - OPENBLAS_NUM_THREADS: '1' - steps: - - bash: | - sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* - displayName: 'Install Ubuntu dependencies' - - bash: | - source tools/get_minimal_commands.sh - echo "##vso[task.setvariable variable=MNE_ROOT]${MNE_ROOT}" - echo "##vso[task.setvariable variable=PATH]${PATH}" - echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" - echo "##vso[task.setvariable variable=NEUROMAG2FT_ROOT]${NEUROMAG2FT_ROOT}" - echo "##vso[task.setvariable variable=FREESURFER_HOME]${FREESURFER_HOME}" - echo "##vso[task.setvariable variable=MNE_SKIP_FS_FLASH_CALL]${MNE_SKIP_FS_FLASH_CALL}" - displayName: 'Install minimal commands' - - bash: | - echo $PATH - mne_surf2bem --version - fsl_rigid_register --version - displayName: 'Test minimal commands' - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - architecture: 'x64' - addToPath: true - displayName: 'Get Python' - - bash: | - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - displayName: 'Spin up Xvfb' - - bash: | - set -e - python -m pip install --upgrade pip setuptools - python -m pip install --upgrade numpy scipy vtk -r requirements.txt -r requirements_testing.txt codecov - displayName: 'Install dependencies with pip' - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest -m "ultraslowtest" --tb=short --cov=mne -vv mne - displayName: 'Run ultraslow tests' - - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName)' - failTaskOnFailedTests: true - condition: succeededOrFailed() - - -- job: Notebook - pool: - vmImage: 'ubuntu-18.04' - steps: - - bash: | - set -e - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega - bash miniconda.sh -b -p ~/miniconda - source ~/miniconda/etc/profile.d/conda.sh - conda activate base - conda env update --file server_environment.yml - pip uninstall -yq mne - pip install -ve . - pip install pytest pytest-cov pytest-timeout pytest-sugar pytest-xdist flake8 codecov - echo "##vso[task.setvariable variable=PATH]${PATH}" - echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" - displayName: 'Install dependencies' - - script: mne sys_info - displayName: 'Print config and test access to commands' - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest --tb=short --cov=mne -vv mne/viz - displayName: 'Run viz tests' - - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName)' - failTaskOnFailedTests: true - condition: succeededOrFailed() - - -- job: Windows - pool: - vmImage: 'VS2017-Win2016' - variables: - MNE_LOGGING_LEVEL: 'warning' - MNE_FORCE_SERIAL: 'true' - OPENBLAS_NUM_THREADS: 1 - PYTHONUNBUFFERED: 1 - PYTHONIOENCODING: 'utf-8' - MKL_NUM_THREADS: 1 - AZURE_CI_WINDOWS: 'true' - PYTHON_ARCH: 'x64' - strategy: - maxParallel: 4 - matrix: - 3.7 conda: - PLATFORM: 'x86-64' - TEST_MODE: 'conda' - PYTHON_VERSION: '3.8' - 3.7 pip: - TEST_MODE: 'pip' - PYTHON_VERSION: '3.7' - 3.8 pip pre: - TEST_MODE: 'pre-pip' - PYTHON_VERSION: '3.8' - OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: $(PYTHON_VERSION) - architecture: $(PYTHON_ARCH) - addToPath: true - condition: in(variables['TEST_MODE'], 'pip', 'pre-pip') - displayName: 'Get Python' - # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda - # https://github.com/MicrosoftDocs/pipelines-anaconda - # Qt 5.9 post-link failure: - # https://github.com/ContinuumIO/anaconda-issues/issues/10949 - - script: echo "##vso[task.prependpath]%CONDA%;%CONDA%\condabin;%CONDA%\Scripts;%CONDA%\Library\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;" - condition: in(variables['TEST_MODE'], 'conda') - displayName: Add conda to PATH, deal with Qt 5.9 bug - - bash: | - set -e - git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git - powershell gl-ci-helpers/appveyor/install_opengl.ps1 - displayName: Install OpenGL - - bash: | - set -e - python -m pip install --upgrade pip "setuptools<50.0" - python -m pip install --upgrade numpy scipy vtk - python -m pip install --upgrade -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<50.0" - python -m pip install --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" - python -m pip install --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 -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' - - script: python setup.py develop - displayName: 'Install MNE-Python dev' - - script: mne sys_info - displayName: 'Print config and test access to commands' - - script: python -c "import numpy; numpy.show_config()" - displayName: Print NumPy config - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest -m "not slowtest" --tb=short --cov=mne -vv mne - displayName: 'Run tests' - - script: codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN% - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)' - failTaskOnFailedTests: true - condition: succeededOrFailed() From e9cff6fa236e5d4813ec32236c0a928bf9e3fd65 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:04:00 +0100 Subject: [PATCH 07/91] Try conditional [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bfce36267e1..2b35f0ba2e8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -26,6 +26,7 @@ jobs: - PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' + PIP: true steps: - uses: actions/checkout@v2 with: @@ -34,7 +35,8 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - uses: actions/setup-python@v2 + - if: ${{ env.PIP }} + uses: actions/setup-python@v2 with: python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup python' From 6f2f351d181c2d702caaf6cf2c8b49edf5e6a3be Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:05:59 +0100 Subject: [PATCH 08/91] Try conditional [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2b35f0ba2e8..c8b4c36bb1f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -35,7 +35,7 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ env.PIP }} + - if: ${{ PIP }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.PYTHON_VERSION }} From bf941249b087828de6a95aa271182b76ec4d3289 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:07:44 +0100 Subject: [PATCH 09/91] Try conditional [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c8b4c36bb1f..4c1c4f0a0d9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -35,7 +35,7 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ PIP }} + - if: ${{ matrix.PIP }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.PYTHON_VERSION }} From e6e189daa4c1e9e5b41fd149a556ecea0f23fe09 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:31:22 +0100 Subject: [PATCH 10/91] Try conditional [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 23 +++++++++++++++++++++-- tools/github_actions_dependencies.sh | 11 +++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4c1c4f0a0d9..1625d954214 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -10,6 +10,7 @@ on: jobs: Pip: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: py${{ matrix.PYTHON_VERSION }} - ${{ matrix.GHA_NAME }} runs-on: ubuntu-latest defaults: run: @@ -23,10 +24,23 @@ jobs: strategy: matrix: include: - - PYTHON_VERSION: '3.8' + # PIP + non-default stim channel + log level info + - GHA_NAME: 'pip/pre' + PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true + + # Minimal (runs with and without testing data) + - GHA_NAME: 'minimal' + PYTHON_VERSION: '3.6' + DEPS: 'minimal' + CONDA_DEPENDENCIES: 'numpy scipy matplotlib' + MNE_DONTWRITE_HOME: true + MNE_FORCE_SERIAL: true + MNE_SKIP_NETWORK_TEST: 1 + MNE_SKIP_TESTING_DATASET_TESTS: true + PIP: false steps: - uses: actions/checkout@v2 with: @@ -35,11 +49,16 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ matrix.PIP }} + - if: ${{ matrix.PIP == true }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup python' + - if: ${{ matrix.PIP == false }} + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + name: 'Setup conda' - shell: bash -el {0} run: | ./tools/github_actions_dependencies.sh diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index f1ab72165ce..ed28436e361 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,15 +1,18 @@ #!/bin/bash -ef -if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then +if [ "$CONDA_ENV" ]; then + conda env update --file $CONDA_ENV + conda activate mne + pip uninstall -yq mne +elif [ "$CONDA_DEPENDENCIES" ]; then + conda install $CONDA_DEPENDENCIES +else # pip python -m pip install --upgrade pip setuptools wheel pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow pip install https://github.com/pyvista/pyvista/zipball/master pip install https://github.com/pyvista/pyvistaqt/zipball/master - pip install --upgrade -r requirements.txt -else - pip uninstall -yq mne fi pip install --upgrade -r requirements_testing.txt if [ "${DEPS}" != "minimal" ]; then From 27089e46e9dd97d3f84ad0c26654fc12c7a798c9 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:48:49 +0100 Subject: [PATCH 11/91] Try conditional [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 58 ++++--------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1625d954214..4bc3e627cf6 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,6 +24,12 @@ jobs: strategy: matrix: include: + # Linux + - GHA_NAME: 'conda' + PYTHON_VERSION: '3.8' + CONDA_ENV: 'environment.yml' + PIP: false + # PIP + non-default stim channel + log level info - GHA_NAME: 'pip/pre' PYTHON_VERSION: '3.8' @@ -82,55 +88,3 @@ jobs: - uses: codecov/codecov-action@v1 if: success() name: 'Upload coverage to CodeCov' - - Conda: - if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - runs-on: ubuntu-latest - defaults: - run: - shell: bash - env: - DISPLAY: ':99.0' - PYTHON_VERSION: '3.8' - MNE_LOGGING_LEVEL: 'warning' - OPENBLAS_NUM_THREADS: '1' - PYTHONUNBUFFERED: '1' - CONDA_ENV: 'environment.yml' - TRAVIS_OS_NAME: 'linux' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - run: | - sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - name: 'Setup xvfb' - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: 'mne' - python-version: ${{ env.PYTHON_VERSION }} - environment-file: ${{ env.CONDA_ENV }} - name: 'Setup conda' - - shell: bash -el {0} - run: | - ./tools/github_actions_dependencies.sh - source tools/get_minimal_commands.sh - name: 'Install dependencies' - - shell: bash -el {0} - run: ./tools/github_actions_install.sh - name: 'Install MNE' - - shell: bash -el {0} - run: ./tools/github_actions_infos.sh - name: 'Show infos' - - shell: bash -el {0} - run: ./tools/github_actions_download.sh - name: 'Download testing data' - - shell: bash -el {0} - run: ./tools/github_actions_locale.sh - name: 'Print locale' - - shell: bash -el {0} - run: ./tools/github_actions_test.sh - name: 'Run tests' - - uses: codecov/codecov-action@v1 - if: success() - name: 'Upload coverage to CodeCov' From 49dd717b29eb892d225108aefdf1e5de42c6d376 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 16:58:30 +0100 Subject: [PATCH 12/91] Debug actions [skip circle][skip azp][skip travis] --- tools/github_actions_dependencies.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index ed28436e361..3974a27e6c6 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,12 +1,15 @@ #!/bin/bash -ef if [ "$CONDA_ENV" ]; then + echo "conda env detected" conda env update --file $CONDA_ENV conda activate mne pip uninstall -yq mne elif [ "$CONDA_DEPENDENCIES" ]; then + echo "conda deps detected" conda install $CONDA_DEPENDENCIES else # pip + echo "pip env detected" python -m pip install --upgrade pip setuptools wheel pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" From add7ece13111c8b3995bf665518b3d94cd949fac Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:01:22 +0100 Subject: [PATCH 13/91] Debug actions [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4bc3e627cf6..c0a04a8d93f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -63,6 +63,7 @@ jobs: - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: + activate-environment: 'base' python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} From 0478b54af70b697e7a459f4409b2b627bb4b6b19 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:05:06 +0100 Subject: [PATCH 14/91] Debug actions [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c0a04a8d93f..c1bd4a08a3e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -63,7 +63,7 @@ jobs: - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: 'base' + auto-activate-base: true python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} From 33d2f4567a5d0dd4c34a2a56950ef17b6dca1ab0 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:09:53 +0100 Subject: [PATCH 15/91] Debug actions [skip circle][skip azp][skip travis] --- tools/github_actions_dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 3974a27e6c6..239d35b5bc4 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,11 +1,11 @@ #!/bin/bash -ef -if [ "$CONDA_ENV" ]; then +if [ ! -z "$CONDA_ENV" ]; then echo "conda env detected" conda env update --file $CONDA_ENV conda activate mne pip uninstall -yq mne -elif [ "$CONDA_DEPENDENCIES" ]; then +elif [ ! -z "$CONDA_DEPENDENCIES" ]; then echo "conda deps detected" conda install $CONDA_DEPENDENCIES else # pip From 315374479c249f312aeea1f2c0df7138757bda89 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:35:17 +0100 Subject: [PATCH 16/91] Try another approach [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c1bd4a08a3e..c70f586efb7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,9 +8,9 @@ on: - '*' jobs: - Pip: + main: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: py${{ matrix.PYTHON_VERSION }} - ${{ matrix.GHA_NAME }} + name: ${{ matrix.JOB_NAME }} runs-on: ubuntu-latest defaults: run: @@ -24,21 +24,28 @@ jobs: strategy: matrix: include: - # Linux - - GHA_NAME: 'conda' + - JOB_NAME: 'conda' + - JOB_NAME: 'pip/pre' + - JOB_NAME: 'minimal' + steps: + # Linux + - if: ${{ matrix.JOB_NAME == 'conda' }} + env: PYTHON_VERSION: '3.8' CONDA_ENV: 'environment.yml' PIP: false - # PIP + non-default stim channel + log level info - - GHA_NAME: 'pip/pre' + # PIP + non-default stim channel + log level info + - if: ${{ matrix.JOB_NAME == 'pip/pre' }} + env: PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true - # Minimal (runs with and without testing data) - - GHA_NAME: 'minimal' + # Minimal (runs with and without testing data) + - if: ${{ matrix.JOB_NAME == 'minimal' }} + env: PYTHON_VERSION: '3.6' DEPS: 'minimal' CONDA_DEPENDENCIES: 'numpy scipy matplotlib' @@ -47,7 +54,7 @@ jobs: MNE_SKIP_NETWORK_TEST: 1 MNE_SKIP_TESTING_DATASET_TESTS: true PIP: false - steps: + - uses: actions/checkout@v2 with: fetch-depth: 0 @@ -55,12 +62,12 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ matrix.PIP == true }} + - if: ${{ PIP == true }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.PYTHON_VERSION }} + python-version: ${{ PYTHON_VERSION }} name: 'Setup python' - - if: ${{ matrix.PIP == false }} + - if: ${{ PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true From a4c4bf2874a8726fc28a314478fc4053679192e1 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:46:50 +0100 Subject: [PATCH 17/91] Try another approach [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c70f586efb7..4bfc0a87aee 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,13 +23,11 @@ jobs: TRAVIS_OS_NAME: 'linux' strategy: matrix: - include: - - JOB_NAME: 'conda' - - JOB_NAME: 'pip/pre' - - JOB_NAME: 'minimal' + JOB_NAME: ['conda', 'pip/pre', 'minimal'] steps: # Linux - if: ${{ matrix.JOB_NAME == 'conda' }} + run: echo ${{ matrix.JOB_NAME }} env: PYTHON_VERSION: '3.8' CONDA_ENV: 'environment.yml' @@ -37,6 +35,7 @@ jobs: # PIP + non-default stim channel + log level info - if: ${{ matrix.JOB_NAME == 'pip/pre' }} + run: echo ${{ matrix.JOB_NAME }} env: PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' @@ -45,6 +44,7 @@ jobs: # Minimal (runs with and without testing data) - if: ${{ matrix.JOB_NAME == 'minimal' }} + run: echo ${{ matrix.JOB_NAME }} env: PYTHON_VERSION: '3.6' DEPS: 'minimal' From 7e5d1e79b20f089f2b3a0225e614eeef33c62fae Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:49:55 +0100 Subject: [PATCH 18/91] Try again [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4bfc0a87aee..09cd7aee543 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -62,16 +62,16 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ PIP == true }} + - if: $PIP == true uses: actions/setup-python@v2 with: - python-version: ${{ PYTHON_VERSION }} + python-version: $PYTHON_VERSION name: 'Setup python' - - if: ${{ PIP == false }} + - if: $PIP == false uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: ${{ env.PYTHON_VERSION }} + python-version: $PYTHON_VERSION name: 'Setup conda' - shell: bash -el {0} run: | From 9687b0d033282690f2d213d3090316b678eefeb2 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:55:40 +0100 Subject: [PATCH 19/91] Try again [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 09cd7aee543..9cfe44c5757 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -62,12 +62,12 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: $PIP == true + - if: ${{ env.PIP == true }} uses: actions/setup-python@v2 with: python-version: $PYTHON_VERSION name: 'Setup python' - - if: $PIP == false + - if: ${{ env.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true From 2de23dee7c5d8751576268dc974714011d707a9e Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 17:58:23 +0100 Subject: [PATCH 20/91] Try again [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9cfe44c5757..29f03d96e78 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -65,13 +65,13 @@ jobs: - if: ${{ env.PIP == true }} uses: actions/setup-python@v2 with: - python-version: $PYTHON_VERSION + python-version: ${{ env.PYTHON_VERSION }} name: 'Setup python' - if: ${{ env.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: $PYTHON_VERSION + python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} run: | From beaf6747f3711843342a3b07a296c565039f9c1d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:23:52 +0100 Subject: [PATCH 21/91] Try again [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 51 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 29f03d96e78..9de782548ec 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,37 +23,36 @@ jobs: TRAVIS_OS_NAME: 'linux' strategy: matrix: - JOB_NAME: ['conda', 'pip/pre', 'minimal'] + - JOB_NAME: 'conda' + PYTHON_VERSION: '3.8' + PIP: false + - JOB_NAME: 'pip/pre' + PYTHON_VERSION: '3.8' + PIP: true + - JOB_NAME: 'minimal' + PYTHON_VERSION: '3.6' + PIP: false steps: # Linux - if: ${{ matrix.JOB_NAME == 'conda' }} - run: echo ${{ matrix.JOB_NAME }} - env: - PYTHON_VERSION: '3.8' - CONDA_ENV: 'environment.yml' - PIP: false + run: | + echo "CONDA_ENV=environment.yml" >> GITHUB_ENV # PIP + non-default stim channel + log level info - if: ${{ matrix.JOB_NAME == 'pip/pre' }} - run: echo ${{ matrix.JOB_NAME }} - env: - PYTHON_VERSION: '3.8' - MNE_STIM_CHANNEL: 'STI101' - MNE_LOGGING_LEVEL: 'info' - PIP: true + run: | + echo "MNE_STIM_CHANNEL=STI101" >> GITHUB_ENV + echo "MNE_LOGGING_LEVEL=info" >> GITHUB_ENV # Minimal (runs with and without testing data) - if: ${{ matrix.JOB_NAME == 'minimal' }} - run: echo ${{ matrix.JOB_NAME }} - env: - PYTHON_VERSION: '3.6' - DEPS: 'minimal' - CONDA_DEPENDENCIES: 'numpy scipy matplotlib' - MNE_DONTWRITE_HOME: true - MNE_FORCE_SERIAL: true - MNE_SKIP_NETWORK_TEST: 1 - MNE_SKIP_TESTING_DATASET_TESTS: true - PIP: false + run: | + echo "DEPS=minimal" >> GITHUB_ENV + echo "CONDA_DEPENDENCIES=numpy scipy matplotlib" >> GITHUB_ENV + echo "MNE_DONTWRITE_HOME=true" >> GITHUB_ENV + echo "MNE_FORCE_SERIAL=true" >> GITHUB_ENV + echo "MNE_SKIP_NETWORK_TEST=1" >> GITHUB_ENV + echo "MNE_SKIP_TESTING_DATASET_TESTS=true" >> GITHUB_ENV - uses: actions/checkout@v2 with: @@ -62,16 +61,16 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ env.PIP == true }} + - if: ${{ matrix.PIP == true }} uses: actions/setup-python@v2 with: - python-version: ${{ env.PYTHON_VERSION }} + python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup python' - - if: ${{ env.PIP == false }} + - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: ${{ env.PYTHON_VERSION }} + python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} run: | From 4e29251b332531e67d87dbc437404c96f176146a Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:26:51 +0100 Subject: [PATCH 22/91] Try again [skip circle][skip azp][skip travis] --- .github/workflows/linux.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9de782548ec..0ff3358aa9c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,15 +23,16 @@ jobs: TRAVIS_OS_NAME: 'linux' strategy: matrix: - - JOB_NAME: 'conda' - PYTHON_VERSION: '3.8' - PIP: false - - JOB_NAME: 'pip/pre' - PYTHON_VERSION: '3.8' - PIP: true - - JOB_NAME: 'minimal' - PYTHON_VERSION: '3.6' - PIP: false + include: + - JOB_NAME: 'conda' + PYTHON_VERSION: '3.8' + PIP: false + - JOB_NAME: 'pip/pre' + PYTHON_VERSION: '3.8' + PIP: true + - JOB_NAME: 'minimal' + PYTHON_VERSION: '3.6' + PIP: false steps: # Linux - if: ${{ matrix.JOB_NAME == 'conda' }} From ad39d9335325bb90c8e043dae960aae9c574db80 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:41:02 +0100 Subject: [PATCH 23/91] Debug env [skip circle][skip travis] --- tools/github_actions_dependencies.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 239d35b5bc4..2e264aff009 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,5 +1,7 @@ #!/bin/bash -ef +cat $GITHUB_ENV + if [ ! -z "$CONDA_ENV" ]; then echo "conda env detected" conda env update --file $CONDA_ENV From d1cc4fb252ba0aac49a69f019f28f493ecf470de Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:53:34 +0100 Subject: [PATCH 24/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 48 ++++++++++++++-------------- tools/github_actions_dependencies.sh | 2 -- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0ff3358aa9c..8d0159c6896 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,37 +24,30 @@ jobs: strategy: matrix: include: - - JOB_NAME: 'conda' + # Linux + - GHA_NAME: 'conda' PYTHON_VERSION: '3.8' + CONDA_ENV: 'environment.yml' PIP: false - - JOB_NAME: 'pip/pre' + + # PIP + non-default stim channel + log level info + - GHA_NAME: 'pip/pre' PYTHON_VERSION: '3.8' + MNE_STIM_CHANNEL: 'STI101' + MNE_LOGGING_LEVEL: 'info' PIP: true - - JOB_NAME: 'minimal' + + # Minimal (runs with and without testing data) + - GHA_NAME: 'minimal' PYTHON_VERSION: '3.6' + DEPS: 'minimal' + CONDA_DEPENDENCIES: 'numpy scipy matplotlib' + MNE_DONTWRITE_HOME: true + MNE_FORCE_SERIAL: true + MNE_SKIP_NETWORK_TEST: 1 + MNE_SKIP_TESTING_DATASET_TESTS: true PIP: false steps: - # Linux - - if: ${{ matrix.JOB_NAME == 'conda' }} - run: | - echo "CONDA_ENV=environment.yml" >> GITHUB_ENV - - # PIP + non-default stim channel + log level info - - if: ${{ matrix.JOB_NAME == 'pip/pre' }} - run: | - echo "MNE_STIM_CHANNEL=STI101" >> GITHUB_ENV - echo "MNE_LOGGING_LEVEL=info" >> GITHUB_ENV - - # Minimal (runs with and without testing data) - - if: ${{ matrix.JOB_NAME == 'minimal' }} - run: | - echo "DEPS=minimal" >> GITHUB_ENV - echo "CONDA_DEPENDENCIES=numpy scipy matplotlib" >> GITHUB_ENV - echo "MNE_DONTWRITE_HOME=true" >> GITHUB_ENV - echo "MNE_FORCE_SERIAL=true" >> GITHUB_ENV - echo "MNE_SKIP_NETWORK_TEST=1" >> GITHUB_ENV - echo "MNE_SKIP_TESTING_DATASET_TESTS=true" >> GITHUB_ENV - - uses: actions/checkout@v2 with: fetch-depth: 0 @@ -78,6 +71,10 @@ jobs: ./tools/github_actions_dependencies.sh source tools/get_minimal_commands.sh name: 'Install dependencies' + env: + CONDA_ENV: ${{ matrix.CONDA_ENV }} + CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} + DEPS: ${{ matrix.DEPS }} - shell: bash -el {0} run: ./tools/github_actions_install.sh name: 'Install MNE' @@ -93,6 +90,9 @@ jobs: - shell: bash -el {0} run: ./tools/github_actions_test.sh name: 'Run tests' + env: + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} + DEPS: ${{ matrix.DEPS }} - uses: codecov/codecov-action@v1 if: success() name: 'Upload coverage to CodeCov' diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 2e264aff009..239d35b5bc4 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,7 +1,5 @@ #!/bin/bash -ef -cat $GITHUB_ENV - if [ ! -z "$CONDA_ENV" ]; then echo "conda env detected" conda env update --file $CONDA_ENV From 484461b1862ecdbdd9ae4ee6353d717019ee5010 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:55:17 +0100 Subject: [PATCH 25/91] Fix job name --- .github/workflows/linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8d0159c6896..2a2453c423d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,20 +25,20 @@ jobs: matrix: include: # Linux - - GHA_NAME: 'conda' + - JOB_NAME: 'conda' PYTHON_VERSION: '3.8' CONDA_ENV: 'environment.yml' PIP: false # PIP + non-default stim channel + log level info - - GHA_NAME: 'pip/pre' + - JOB_NAME: 'pip/pre' PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true # Minimal (runs with and without testing data) - - GHA_NAME: 'minimal' + - JOB_NAME: 'minimal' PYTHON_VERSION: '3.6' DEPS: 'minimal' CONDA_DEPENDENCIES: 'numpy scipy matplotlib' From 06faa33e972d13cb56936d04ece66bc24606cc58 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 18:58:25 +0100 Subject: [PATCH 26/91] Debug env [skip circle][skip travis] --- tools/github_actions_dependencies.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 239d35b5bc4..10a623de9e2 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,15 +1,12 @@ #!/bin/bash -ef if [ ! -z "$CONDA_ENV" ]; then - echo "conda env detected" conda env update --file $CONDA_ENV conda activate mne pip uninstall -yq mne elif [ ! -z "$CONDA_DEPENDENCIES" ]; then - echo "conda deps detected" - conda install $CONDA_DEPENDENCIES + conda install -y $CONDA_DEPENDENCIES else # pip - echo "pip env detected" python -m pip install --upgrade pip setuptools wheel pip uninstall -yq numpy pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" From 7afe7924cc96ec70e47e5971abae90719e5ece4e Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 19:06:24 +0100 Subject: [PATCH 27/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 6 +++-- tools/get_minimal_commands.sh | 40 +++++++++++++++----------------- tools/github_actions_download.sh | 4 +++- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2a2453c423d..caa420fed09 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -70,11 +70,11 @@ jobs: run: | ./tools/github_actions_dependencies.sh source tools/get_minimal_commands.sh - name: 'Install dependencies' env: CONDA_ENV: ${{ matrix.CONDA_ENV }} CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} DEPS: ${{ matrix.DEPS }} + name: 'Install dependencies' - shell: bash -el {0} run: ./tools/github_actions_install.sh name: 'Install MNE' @@ -83,16 +83,18 @@ jobs: name: 'Show infos' - shell: bash -el {0} run: ./tools/github_actions_download.sh + env: + DEPS: ${{ matrix.DEPS }} name: 'Download testing data' - shell: bash -el {0} run: ./tools/github_actions_locale.sh name: 'Print locale' - shell: bash -el {0} run: ./tools/github_actions_test.sh - name: 'Run tests' env: PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} DEPS: ${{ matrix.DEPS }} + name: 'Run tests' - uses: codecov/codecov-action@v1 if: success() name: 'Upload coverage to CodeCov' diff --git a/tools/get_minimal_commands.sh b/tools/get_minimal_commands.sh index 61af8c34a61..7ad3a84ed95 100755 --- a/tools/get_minimal_commands.sh +++ b/tools/get_minimal_commands.sh @@ -1,24 +1,22 @@ #!/bin/bash -ef -if [ "${DEPS}" == "minimal" ]; then - exit 0 +if [ "${DEPS}" != "minimal" ]; then + pushd ~ > /dev/null + export MNE_ROOT="${PWD}/minimal_cmds" + export PATH=${MNE_ROOT}/bin:$PATH + if [ "${TRAVIS_OS_NAME}" != "osx" ]; then + if [ ! -d "${PWD}/minimal_cmds" ]; then + curl -L https://osf.io/g7dzs/download | tar xz + fi; + export LD_LIBRARY_PATH=${MNE_ROOT}/lib:$LD_LIBRARY_PATH + export NEUROMAG2FT_ROOT="${PWD}/minimal_cmds/bin" + export FREESURFER_HOME="${MNE_ROOT}" + else + if [ ! -d "${PWD}/minimal_cmds" ]; then + curl -L https://osf.io/rjcz4/download | tar xz + fi; + export DYLD_LIBRARY_PATH=${MNE_ROOT}/lib:$DYLD_LIBRARY_PATH + fi + popd > /dev/null + mne_surf2bem --version fi - -pushd ~ > /dev/null -export MNE_ROOT="${PWD}/minimal_cmds" -export PATH=${MNE_ROOT}/bin:$PATH -if [ "${TRAVIS_OS_NAME}" != "osx" ]; then - if [ ! -d "${PWD}/minimal_cmds" ]; then - curl -L https://osf.io/g7dzs/download | tar xz - fi; - export LD_LIBRARY_PATH=${MNE_ROOT}/lib:$LD_LIBRARY_PATH - export NEUROMAG2FT_ROOT="${PWD}/minimal_cmds/bin" - export FREESURFER_HOME="${MNE_ROOT}" -else - if [ ! -d "${PWD}/minimal_cmds" ]; then - curl -L https://osf.io/rjcz4/download | tar xz - fi; - export DYLD_LIBRARY_PATH=${MNE_ROOT}/lib:$DYLD_LIBRARY_PATH -fi -popd > /dev/null -mne_surf2bem --version diff --git a/tools/github_actions_download.sh b/tools/github_actions_download.sh index fdd8bce0a70..68f56256998 100755 --- a/tools/github_actions_download.sh +++ b/tools/github_actions_download.sh @@ -1,3 +1,5 @@ #!/bin/bash -ef -python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; +if [ "${DEPS}" != "minimal" ]; then + python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; +fi From 3367c962f117d2da5432c9bac015aa58ae3b961b Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 19:30:52 +0100 Subject: [PATCH 28/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index caa420fed09..50fd44184e4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,10 +16,20 @@ jobs: run: shell: bash env: + CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} + CONDA_ENV: ${{ matrix.CONDA_ENV }} + DEPS: ${{ matrix.DEPS }} DISPLAY: ':99.0' + MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} + MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} + MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} MNE_LOGGING_LEVEL: 'warning' + MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} + MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} + MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} TRAVIS_OS_NAME: 'linux' strategy: matrix: @@ -58,22 +68,18 @@ jobs: - if: ${{ matrix.PIP == true }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.PYTHON_VERSION }} + python-version: $PYTHON_VERSION name: 'Setup python' - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: ${{ matrix.PYTHON_VERSION }} + python-version: $PYTHON_VERSION name: 'Setup conda' - shell: bash -el {0} run: | ./tools/github_actions_dependencies.sh source tools/get_minimal_commands.sh - env: - CONDA_ENV: ${{ matrix.CONDA_ENV }} - CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} - DEPS: ${{ matrix.DEPS }} name: 'Install dependencies' - shell: bash -el {0} run: ./tools/github_actions_install.sh @@ -83,17 +89,12 @@ jobs: name: 'Show infos' - shell: bash -el {0} run: ./tools/github_actions_download.sh - env: - DEPS: ${{ matrix.DEPS }} name: 'Download testing data' - shell: bash -el {0} run: ./tools/github_actions_locale.sh name: 'Print locale' - shell: bash -el {0} run: ./tools/github_actions_test.sh - env: - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - DEPS: ${{ matrix.DEPS }} name: 'Run tests' - uses: codecov/codecov-action@v1 if: success() From f86f299045d5757143ffae16523e432cfeae1bb0 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 19:33:13 +0100 Subject: [PATCH 29/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 50fd44184e4..872108e0f0b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,7 +23,6 @@ jobs: MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} - MNE_LOGGING_LEVEL: 'warning' MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} @@ -38,6 +37,7 @@ jobs: - JOB_NAME: 'conda' PYTHON_VERSION: '3.8' CONDA_ENV: 'environment.yml' + MNE_LOGGING_LEVEL: 'warning' PIP: false # PIP + non-default stim channel + log level info @@ -54,6 +54,7 @@ jobs: CONDA_DEPENDENCIES: 'numpy scipy matplotlib' MNE_DONTWRITE_HOME: true MNE_FORCE_SERIAL: true + MNE_LOGGING_LEVEL: 'warning' MNE_SKIP_NETWORK_TEST: 1 MNE_SKIP_TESTING_DATASET_TESTS: true PIP: false From ca9c6ab856587785db525265e61c850ecb4c7817 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 19:39:32 +0100 Subject: [PATCH 30/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 872108e0f0b..93d28116165 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -31,6 +31,7 @@ jobs: PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} TRAVIS_OS_NAME: 'linux' strategy: + fail-fast: false matrix: include: # Linux @@ -69,13 +70,13 @@ jobs: - if: ${{ matrix.PIP == true }} uses: actions/setup-python@v2 with: - python-version: $PYTHON_VERSION + python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup python' - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: $PYTHON_VERSION + python-version: ${{ matrix.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} run: | From 50fdf3f85c9dfc8ad2f7b7a47d5fa99b51f73c48 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 19:52:33 +0100 Subject: [PATCH 31/91] Debug conda [skip circle][skip travis] --- tools/github_actions_dependencies.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 10a623de9e2..c82791cf551 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -2,6 +2,8 @@ if [ ! -z "$CONDA_ENV" ]; then conda env update --file $CONDA_ENV + CONDA_BASE=$(conda info --base) + source $CONDA_BASE/etc/profile.d/conda.sh conda activate mne pip uninstall -yq mne elif [ ! -z "$CONDA_DEPENDENCIES" ]; then From 992c8b1acd1feee4c5afaed2a9f83837d5e709df Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:01:01 +0100 Subject: [PATCH 32/91] MAke MacOS job consistent --- .github/workflows/macos.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6e9a1bc4893..a38eb8cca02 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,7 +8,7 @@ on: - '*' jobs: - Conda: + conda: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: macos-latest defaults: @@ -27,9 +27,8 @@ jobs: fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: 'mne' + auto-activate-base: true python-version: ${{ env.PYTHON_VERSION }} - environment-file: ${{ env.CONDA_ENV }} name: 'Setup conda' - shell: bash -el {0} run: | From 784fae5790eb54efe8ba32be23ccbcccd9c32376 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:07:01 +0100 Subject: [PATCH 33/91] Re-activate conda [skip circle][skip travis] --- tools/github_actions_test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/github_actions_test.sh b/tools/github_actions_test.sh index 8cb1c755931..925cdd4fbc4 100755 --- a/tools/github_actions_test.sh +++ b/tools/github_actions_test.sh @@ -1,5 +1,11 @@ #!/bin/bash -ef +if [ ! -z "$CONDA_ENV" ]; then + CONDA_BASE=$(conda info --base) + source $CONDA_BASE/etc/profile.d/conda.sh + conda activate mne +fi + # Remove numpydoc tests on older Python (builtin docstrings not as good) if [ "${PYTHON_VERSION}" == "3.6" ]; then pip uninstall -yq numpydoc; From d557c1777021c71d5d56f6326fe3a96f3adfc28f Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:08:06 +0100 Subject: [PATCH 34/91] Rename job name --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 93d28116165..62fc25e94d2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: PIP: false # PIP + non-default stim channel + log level info - - JOB_NAME: 'pip/pre' + - JOB_NAME: 'pip / pre' PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' From d2e89b70235a1651d23c1c1a0c2f5c8340f9bded Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:16:08 +0100 Subject: [PATCH 35/91] Re-activate conda a lot [skip circle][skip travis] --- tools/github_actions_download.sh | 6 ++++++ tools/github_actions_infos.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tools/github_actions_download.sh b/tools/github_actions_download.sh index 68f56256998..98f9af64809 100755 --- a/tools/github_actions_download.sh +++ b/tools/github_actions_download.sh @@ -1,5 +1,11 @@ #!/bin/bash -ef +if [ ! -z "$CONDA_ENV" ]; then + CONDA_BASE=$(conda info --base) + source $CONDA_BASE/etc/profile.d/conda.sh + conda activate mne +fi + if [ "${DEPS}" != "minimal" ]; then python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; fi diff --git a/tools/github_actions_infos.sh b/tools/github_actions_infos.sh index ff7de818fa2..15359fa9de9 100755 --- a/tools/github_actions_infos.sh +++ b/tools/github_actions_infos.sh @@ -1,4 +1,10 @@ #!/bin/bash -ef +if [ ! -z "$CONDA_ENV" ]; then + CONDA_BASE=$(conda info --base) + source $CONDA_BASE/etc/profile.d/conda.sh + conda activate mne +fi + mne sys_info python -c "import numpy; numpy.show_config()" From 526b1b448baaea27f61e685a5b767e5441a24794 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:23:20 +0100 Subject: [PATCH 36/91] Re-activate conda a lot [skip circle][skip travis] --- tools/github_actions_install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/github_actions_install.sh b/tools/github_actions_install.sh index 899f5921591..20bd7681ee7 100755 --- a/tools/github_actions_install.sh +++ b/tools/github_actions_install.sh @@ -1,4 +1,10 @@ #!/bin/bash -ef +if [ ! -z "$CONDA_ENV" ]; then + CONDA_BASE=$(conda info --base) + source $CONDA_BASE/etc/profile.d/conda.sh + conda activate mne +fi + python setup.py build python setup.py install From 2e2b9391848ae1d0f8e607e54ea72787bd3549c7 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:23:40 +0100 Subject: [PATCH 37/91] Debug env [skip circle][skip travis] --- .github/workflows/linux.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 62fc25e94d2..573ab31f18e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,12 +42,18 @@ jobs: PIP: false # PIP + non-default stim channel + log level info - - JOB_NAME: 'pip / pre' + - JOB_NAME: 'pip' PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true + # Old dependencies + - JOB_NAME: 'old' + PYTHON_VERSION: '3.6' + CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + MNE_LOGGING_LEVEL: 'warning' + # Minimal (runs with and without testing data) - JOB_NAME: 'minimal' PYTHON_VERSION: '3.6' From 4eb26e866b882be9054964b89745c3526f7da41b Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 20:54:00 +0100 Subject: [PATCH 38/91] Split workflow [skip circle][skip travis] --- .github/workflows/compat.yml | 88 ++++++++++++++++++++++++++++++++++++ .github/workflows/linux.yml | 18 -------- 2 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/compat.yml diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml new file mode 100644 index 00000000000..6e1faa849ce --- /dev/null +++ b/.github/workflows/compat.yml @@ -0,0 +1,88 @@ +name: 'Compatibility' +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + main: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.JOB_NAME }} + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} + CONDA_ENV: ${{ matrix.CONDA_ENV }} + DEPS: ${{ matrix.DEPS }} + DISPLAY: ':99.0' + MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} + MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} + MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} + MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} + MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} + MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} + TRAVIS_OS_NAME: 'linux' + strategy: + fail-fast: false + matrix: + include: + # Old dependencies + - JOB_NAME: 'old' + PYTHON_VERSION: '3.6' + CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + MNE_LOGGING_LEVEL: 'warning' + + # Minimal (runs with and without testing data) + - JOB_NAME: 'minimal' + PYTHON_VERSION: '3.6' + DEPS: 'minimal' + CONDA_DEPENDENCIES: 'numpy scipy matplotlib' + MNE_DONTWRITE_HOME: true + MNE_FORCE_SERIAL: true + MNE_LOGGING_LEVEL: 'warning' + MNE_SKIP_NETWORK_TEST: 1 + MNE_SKIP_TESTING_DATASET_TESTS: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true + python-version: ${{ matrix.PYTHON_VERSION }} + name: 'Setup conda' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 573ab31f18e..2fbc5436d41 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -47,24 +47,6 @@ jobs: MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true - - # Old dependencies - - JOB_NAME: 'old' - PYTHON_VERSION: '3.6' - CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' - MNE_LOGGING_LEVEL: 'warning' - - # Minimal (runs with and without testing data) - - JOB_NAME: 'minimal' - PYTHON_VERSION: '3.6' - DEPS: 'minimal' - CONDA_DEPENDENCIES: 'numpy scipy matplotlib' - MNE_DONTWRITE_HOME: true - MNE_FORCE_SERIAL: true - MNE_LOGGING_LEVEL: 'warning' - MNE_SKIP_NETWORK_TEST: 1 - MNE_SKIP_TESTING_DATASET_TESTS: true - PIP: false steps: - uses: actions/checkout@v2 with: From 0bf6ffa2c361ad0496a42ac7cc267805ffe4a69c Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Fri, 13 Nov 2020 21:05:18 +0100 Subject: [PATCH 39/91] Revert "TST: Remove Azure temporarily" This reverts commit 5ec9160b9891c183e48b1429594d7d3e76ee384c. --- azure-pipelines.yml | 249 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..47cb785cb86 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,249 @@ +trigger: + # start a new build for every push + batch: False + branches: + include: + - 'master' + - 'maint/*' +pr: + branches: + include: + - '*' # must quote since "*" is a YAML reserved character; we want a string + +jobs: + +- job: Style + pool: + vmImage: 'ubuntu-18.04' + variables: + PYTHON_VERSION: '3.8' + PYTHON_ARCH: 'x64' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: $(PYTHON_VERSION) + architecture: $(PYTHON_ARCH) + addToPath: true + displayName: 'Get Python' + - bash: | + set -e + python -m pip install --upgrade pip setuptools + python -m pip install numpy scipy matplotlib -r requirements_testing.txt + displayName: Install dependencies + condition: always() + - bash: | + make flake + displayName: make flake + condition: always() + - bash: | + make pydocstyle + displayName: make pydocstyle + condition: always() + - bash: | + make codespell-error + displayName: make codespell-error + condition: always() + - bash: | + make docstring + displayName: make docstring + - bash: | + make nesting + displayName: make nesting + condition: always() + - bash: | + make check-manifest + displayName: make check-manifest + condition: always() + - bash: | + make check-readme + displayName: make check-readme + condition: always() + + +- job: Ultraslow + pool: + vmImage: 'ubuntu-18.04' + variables: + DISPLAY: ':99' + OPENBLAS_NUM_THREADS: '1' + steps: + - bash: | + sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* + displayName: 'Install Ubuntu dependencies' + - bash: | + source tools/get_minimal_commands.sh + echo "##vso[task.setvariable variable=MNE_ROOT]${MNE_ROOT}" + echo "##vso[task.setvariable variable=PATH]${PATH}" + echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" + echo "##vso[task.setvariable variable=NEUROMAG2FT_ROOT]${NEUROMAG2FT_ROOT}" + echo "##vso[task.setvariable variable=FREESURFER_HOME]${FREESURFER_HOME}" + echo "##vso[task.setvariable variable=MNE_SKIP_FS_FLASH_CALL]${MNE_SKIP_FS_FLASH_CALL}" + displayName: 'Install minimal commands' + - bash: | + echo $PATH + mne_surf2bem --version + fsl_rigid_register --version + displayName: 'Test minimal commands' + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + architecture: 'x64' + addToPath: true + displayName: 'Get Python' + - bash: | + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + displayName: 'Spin up Xvfb' + - bash: | + set -e + python -m pip install --upgrade pip setuptools + python -m pip install --upgrade numpy scipy vtk -r requirements.txt -r requirements_testing.txt codecov + displayName: 'Install dependencies with pip' + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest -m "ultraslowtest" --tb=short --cov=mne -vv mne + displayName: 'Run ultraslow tests' + - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName)' + failTaskOnFailedTests: true + condition: succeededOrFailed() + + +- job: Notebook + pool: + vmImage: 'ubuntu-18.04' + steps: + - bash: | + set -e + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega + bash miniconda.sh -b -p ~/miniconda + source ~/miniconda/etc/profile.d/conda.sh + conda activate base + conda env update --file server_environment.yml + pip uninstall -yq mne + pip install -ve . + pip install pytest pytest-cov pytest-timeout pytest-sugar pytest-xdist flake8 codecov + echo "##vso[task.setvariable variable=PATH]${PATH}" + echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" + displayName: 'Install dependencies' + - script: mne sys_info + displayName: 'Print config and test access to commands' + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest --tb=short --cov=mne -vv mne/viz + displayName: 'Run viz tests' + - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName)' + failTaskOnFailedTests: true + condition: succeededOrFailed() + + +- job: Windows + pool: + vmImage: 'VS2017-Win2016' + variables: + MNE_LOGGING_LEVEL: 'warning' + MNE_FORCE_SERIAL: 'true' + OPENBLAS_NUM_THREADS: 1 + PYTHONUNBUFFERED: 1 + PYTHONIOENCODING: 'utf-8' + MKL_NUM_THREADS: 1 + AZURE_CI_WINDOWS: 'true' + PYTHON_ARCH: 'x64' + strategy: + maxParallel: 4 + matrix: + 3.7 conda: + PLATFORM: 'x86-64' + TEST_MODE: 'conda' + PYTHON_VERSION: '3.8' + 3.7 pip: + TEST_MODE: 'pip' + PYTHON_VERSION: '3.7' + 3.8 pip pre: + TEST_MODE: 'pre-pip' + PYTHON_VERSION: '3.8' + OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: $(PYTHON_VERSION) + architecture: $(PYTHON_ARCH) + addToPath: true + condition: in(variables['TEST_MODE'], 'pip', 'pre-pip') + displayName: 'Get Python' + # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda + # https://github.com/MicrosoftDocs/pipelines-anaconda + # Qt 5.9 post-link failure: + # https://github.com/ContinuumIO/anaconda-issues/issues/10949 + - script: echo "##vso[task.prependpath]%CONDA%;%CONDA%\condabin;%CONDA%\Scripts;%CONDA%\Library\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;" + condition: in(variables['TEST_MODE'], 'conda') + displayName: Add conda to PATH, deal with Qt 5.9 bug + - bash: | + set -e + git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git + powershell gl-ci-helpers/appveyor/install_opengl.ps1 + displayName: Install OpenGL + - bash: | + set -e + python -m pip install --upgrade pip "setuptools<50.0" + python -m pip install --upgrade numpy scipy vtk + python -m pip install --upgrade -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<50.0" + python -m pip install --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" + python -m pip install --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 -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' + - script: python setup.py develop + displayName: 'Install MNE-Python dev' + - script: mne sys_info + displayName: 'Print config and test access to commands' + - script: python -c "import numpy; numpy.show_config()" + displayName: Print NumPy config + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest -m "not slowtest" --tb=short --cov=mne -vv mne + displayName: 'Run tests' + - script: codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN% + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)' + failTaskOnFailedTests: true + condition: succeededOrFailed() From 62bee0ef4141dca3c589f7c5886ab171d2b39424 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 00:04:00 +0100 Subject: [PATCH 40/91] Activate mne conda env right away --- .github/workflows/compat.yml | 4 ++-- .github/workflows/linux.yml | 9 +++++---- .github/workflows/macos.yml | 5 +++-- tools/github_actions_dependencies.sh | 4 ---- tools/github_actions_download.sh | 6 ------ tools/github_actions_infos.sh | 6 ------ tools/github_actions_install.sh | 6 ------ tools/github_actions_test.sh | 6 ------ 8 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 6e1faa849ce..0c86edb73b5 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -1,4 +1,4 @@ -name: 'Compatibility' +name: 'compat' on: push: branches: @@ -42,7 +42,7 @@ jobs: # Minimal (runs with and without testing data) - JOB_NAME: 'minimal' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.7' DEPS: 'minimal' CONDA_DEPENDENCIES: 'numpy scipy matplotlib' MNE_DONTWRITE_HOME: true diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2fbc5436d41..b61e9a8a1f0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: 'Linux' +name: 'linux' on: push: branches: @@ -58,13 +58,14 @@ jobs: - if: ${{ matrix.PIP == true }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} name: 'Setup python' - if: ${{ matrix.PIP == false }} uses: conda-incubator/setup-miniconda@v2 with: - auto-activate-base: true - python-version: ${{ matrix.PYTHON_VERSION }} + activate-environment: 'mne' + python-version: ${{ env.PYTHON_VERSION }} + environment-file: ${{ env.CONDA_ENV }} name: 'Setup conda' - shell: bash -el {0} run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a38eb8cca02..78882694d9a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,4 @@ -name: 'MacOS' +name: 'macos' on: push: branches: @@ -27,8 +27,9 @@ jobs: fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v2 with: - auto-activate-base: true + activate-environment: 'mne' python-version: ${{ env.PYTHON_VERSION }} + environment-file: ${{ env.CONDA_ENV }} name: 'Setup conda' - shell: bash -el {0} run: | diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index c82791cf551..407c4a29730 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -1,10 +1,6 @@ #!/bin/bash -ef if [ ! -z "$CONDA_ENV" ]; then - conda env update --file $CONDA_ENV - CONDA_BASE=$(conda info --base) - source $CONDA_BASE/etc/profile.d/conda.sh - conda activate mne pip uninstall -yq mne elif [ ! -z "$CONDA_DEPENDENCIES" ]; then conda install -y $CONDA_DEPENDENCIES diff --git a/tools/github_actions_download.sh b/tools/github_actions_download.sh index 98f9af64809..68f56256998 100755 --- a/tools/github_actions_download.sh +++ b/tools/github_actions_download.sh @@ -1,11 +1,5 @@ #!/bin/bash -ef -if [ ! -z "$CONDA_ENV" ]; then - CONDA_BASE=$(conda info --base) - source $CONDA_BASE/etc/profile.d/conda.sh - conda activate mne -fi - if [ "${DEPS}" != "minimal" ]; then python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; fi diff --git a/tools/github_actions_infos.sh b/tools/github_actions_infos.sh index 15359fa9de9..ff7de818fa2 100755 --- a/tools/github_actions_infos.sh +++ b/tools/github_actions_infos.sh @@ -1,10 +1,4 @@ #!/bin/bash -ef -if [ ! -z "$CONDA_ENV" ]; then - CONDA_BASE=$(conda info --base) - source $CONDA_BASE/etc/profile.d/conda.sh - conda activate mne -fi - mne sys_info python -c "import numpy; numpy.show_config()" diff --git a/tools/github_actions_install.sh b/tools/github_actions_install.sh index 20bd7681ee7..899f5921591 100755 --- a/tools/github_actions_install.sh +++ b/tools/github_actions_install.sh @@ -1,10 +1,4 @@ #!/bin/bash -ef -if [ ! -z "$CONDA_ENV" ]; then - CONDA_BASE=$(conda info --base) - source $CONDA_BASE/etc/profile.d/conda.sh - conda activate mne -fi - python setup.py build python setup.py install diff --git a/tools/github_actions_test.sh b/tools/github_actions_test.sh index 925cdd4fbc4..8cb1c755931 100755 --- a/tools/github_actions_test.sh +++ b/tools/github_actions_test.sh @@ -1,11 +1,5 @@ #!/bin/bash -ef -if [ ! -z "$CONDA_ENV" ]; then - CONDA_BASE=$(conda info --base) - source $CONDA_BASE/etc/profile.d/conda.sh - conda activate mne -fi - # Remove numpydoc tests on older Python (builtin docstrings not as good) if [ "${PYTHON_VERSION}" == "3.6" ]; then pip uninstall -yq numpydoc; From 25a19a8f787fa100236db598a8f9988690629037 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 00:04:15 +0100 Subject: [PATCH 41/91] Remove travis conf file --- .travis.yml | 135 ---------------------------------------------------- 1 file changed, 135 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7bd217ec438..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,135 +0,0 @@ -language: generic -dist: bionic -cache: - pip: true -addons: - apt: - packages: - - libxkbcommon-x11-0 - - libxcb* - - libosmesa6 - - libglx-mesa0 - - libopengl0 - - libglx0 - - libdbus-1-3 -env: - # OPENBLAS_NUM_THREADS=1 avoid slowdowns: - # https://github.com/xianyi/OpenBLAS/issues/731 - global: PYTHON_VERSION=3.7 DISPLAY=:99.0 MNE_LOGGING_LEVEL=warning - CONDA_VERSION=">=4.3.27" OPENBLAS_NUM_THREADS=1 PYTHONUNBUFFERED=1 - -matrix: - include: - # PIP + non-default stim channel + log level info - - os: linux - env: MNE_STIM_CHANNEL=STI101 MNE_LOGGING_LEVEL=info - language: python - python: "3.8" - - # Old dependencies - - os: linux - env: PYTHON_VERSION=3.6 - CONDA_DEPENDENCIES="numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2" - - # Minimal (runs with and without testing data) - - os: linux - env: DEPS=minimal - CONDA_DEPENDENCIES="numpy scipy matplotlib" - MNE_DONTWRITE_HOME=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TEST=1 MNE_SKIP_TESTING_DATASET_TESTS=true - -# Setup anaconda -before_install: - - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - - | - if [ -z "$CONDA_DEPENDENCIES" ]; then - pip uninstall -yq numpy - pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" - pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow - pip install https://github.com/pyvista/pyvista/zipball/master - pip install https://github.com/pyvista/pyvistaqt/zipball/master - pip install --upgrade -r requirements.txt - else - git clone https://github.com/astropy/ci-helpers.git - source ci-helpers/travis/setup_conda.sh - fi - # Always install these via pip so we get the latest possible versions (testing bugfixes) - - pip install --upgrade -r requirements_testing.txt codecov - - if [ "${DEPS}" != "minimal" ]; then - pip install nitime; - fi - # Don't source mne_setup_sh here because changing PATH etc. can't be done in a script - - if [ "${DEPS}" != "minimal" ]; then - source tools/get_minimal_commands.sh; - fi; - -install: - # Suppress the parallel outputs for logging cleanliness - - python setup.py build - - python setup.py install - - mne sys_info - - python -c "import numpy; numpy.show_config()" - - SRC_DIR=$(pwd) - - cd ~ - # Trigger download of testing data - - if [ "${DEPS}" != "minimal" ]; then - python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; - fi; - - cd ${SRC_DIR} - - -script: - - echo "Print locale " - - locale - - echo "Other stuff" - # OSX runs ~2x slower than Linux on Travis, so skip any slow ones there - # Until https://github.com/numpy/numpy/issues/15580 is resolved we also - # need the --pre wheels to skip slow ones. - - CONDITION='not ultraslowtest'; - # Determine directories to test (could use SPLIT=0 SPLIT=1 but currently - # we are fast enough, so disable it) - - if [ -z ${SPLIT} ]; then - USE_DIRS="mne/"; - else - if [ "${SPLIT}" == "0" ]; then - MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"; - elif [ "${SPLIT}" == "1" ]; then - MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"; - elif [ "${SPLIT}" == "2" ]; then - MNE_DIRS="."; - else - MNE_DIRS="beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"; - fi; - USE_DIRS=""; - for DIR in ${MNE_DIRS}; do - if [ "${DIR}" == "." ]; then - USE_DIRS="mne/tests mne/*.py ${USE_DIRS}"; - else - USE_DIRS="mne/${DIR}/ ${USE_DIRS}"; - fi; - done; - fi; - # Remove numpydoc tests on older Python (builtin docstrings not as good) - - if [ "${PYTHON_VERSION}" == "3.6" ]; then - pip uninstall -yq numpydoc; - fi; - # Test run_tests_if_main - - if [ "${DEPS}" == "minimal" ]; then - pip uninstall -yq mne; - pip install -e .; - python mne/tests/test_evoked.py; - fi; - - echo 'pytest -m "${CONDITION}" --tb=short --cov=mne -vv ${USE_DIRS}' - - pytest -m "${CONDITION}" --tb=short --cov=mne -vv ${USE_DIRS} - # run the minimal one with the testing data as well - - if [ "${DEPS}" == "minimal" ]; then - export MNE_SKIP_TESTING_DATASET_TESTS=false; - python -c 'import mne; mne.datasets.testing.data_path(verbose=True)'; - fi; - - if [ "${DEPS}" == "minimal" ]; then - pytest -m "${CONDITION}" --tb=short --cov=mne -vv ${USE_DIRS}; - fi; - -after_script: - # Need to run from source dir to exectue "git" commands - - cd ${SRC_DIR}; - - codecov; From c400c3a011ee74066e4d5f7fef70f72c18b6e003 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 01:00:34 +0100 Subject: [PATCH 42/91] Remove cruft --- .github/workflows/compat.yml | 6 +----- .github/workflows/linux.yml | 10 +--------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 0c86edb73b5..ddffc5a557b 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -17,15 +17,13 @@ jobs: shell: bash env: CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} - CONDA_ENV: ${{ matrix.CONDA_ENV }} DEPS: ${{ matrix.DEPS }} DISPLAY: ':99.0' MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} - MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} + MNE_LOGGING_LEVEL: 'warning' MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} - MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} @@ -38,7 +36,6 @@ jobs: - JOB_NAME: 'old' PYTHON_VERSION: '3.6' CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' - MNE_LOGGING_LEVEL: 'warning' # Minimal (runs with and without testing data) - JOB_NAME: 'minimal' @@ -47,7 +44,6 @@ jobs: CONDA_DEPENDENCIES: 'numpy scipy matplotlib' MNE_DONTWRITE_HOME: true MNE_FORCE_SERIAL: true - MNE_LOGGING_LEVEL: 'warning' MNE_SKIP_NETWORK_TEST: 1 MNE_SKIP_TESTING_DATASET_TESTS: true steps: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b61e9a8a1f0..947ccb95537 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,19 +16,13 @@ jobs: run: shell: bash env: - CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} CONDA_ENV: ${{ matrix.CONDA_ENV }} - DEPS: ${{ matrix.DEPS }} DISPLAY: ':99.0' - MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} - MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} - MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} - MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} + PYTHON_VERSION: '3.8' TRAVIS_OS_NAME: 'linux' strategy: fail-fast: false @@ -36,14 +30,12 @@ jobs: include: # Linux - JOB_NAME: 'conda' - PYTHON_VERSION: '3.8' CONDA_ENV: 'environment.yml' MNE_LOGGING_LEVEL: 'warning' PIP: false # PIP + non-default stim channel + log level info - JOB_NAME: 'pip' - PYTHON_VERSION: '3.8' MNE_STIM_CHANNEL: 'STI101' MNE_LOGGING_LEVEL: 'info' PIP: true From ede08c0ee2a055c5ac60ca7b1ea61dd3cd65c16d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 10:57:45 +0100 Subject: [PATCH 43/91] Add maint workflow --- .github/workflows/maint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/maint.yml diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml new file mode 100644 index 00000000000..fcb85fbc92c --- /dev/null +++ b/.github/workflows/maint.yml @@ -0,0 +1,27 @@ +name: 'maint' +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + style: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + architecture: 'x64' + - run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install flake8 + name: 'Install dependencies' + - uses: rbialon/flake8-annotations@v1 + name: 'Setup flake8 annotations' + - run: make flake + name: 'Run flake8' From 1921da8abb25946d504007022e395139eb84aba8 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 11:08:48 +0100 Subject: [PATCH 44/91] Test flake8 annots --- mne/viz/_brain/_brain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mne/viz/_brain/_brain.py b/mne/viz/_brain/_brain.py index 5ff8a2207f8..a3c91f90300 100644 --- a/mne/viz/_brain/_brain.py +++ b/mne/viz/_brain/_brain.py @@ -209,7 +209,8 @@ def __init__(self, subject_id, hemi, surf, title=None, self._interaction = 'trackball' if isinstance(background, str): - background = colorConverter.to_rgb(background) + background = \ + colorConverter.to_rgb(background) self._bg_color = background if foreground is None: foreground = 'w' if sum(self._bg_color) < 2 else 'k' From da40c5c3a906eb7cf27730b09495b523ab745e87 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 12:09:24 +0100 Subject: [PATCH 45/91] Revert "Test flake8 annots" This reverts commit 1921da8abb25946d504007022e395139eb84aba8. --- mne/viz/_brain/_brain.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mne/viz/_brain/_brain.py b/mne/viz/_brain/_brain.py index a3c91f90300..5ff8a2207f8 100644 --- a/mne/viz/_brain/_brain.py +++ b/mne/viz/_brain/_brain.py @@ -209,8 +209,7 @@ def __init__(self, subject_id, hemi, surf, title=None, self._interaction = 'trackball' if isinstance(background, str): - background = \ - colorConverter.to_rgb(background) + background = colorConverter.to_rgb(background) self._bg_color = background if foreground is None: foreground = 'w' if sum(self._bg_color) < 2 else 'k' From 1e9eb7120494154365be60141ef413770edb6a4d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 12:16:27 +0100 Subject: [PATCH 46/91] Add codespell action --- .github/workflows/maint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index fcb85fbc92c..3b054a0c72b 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -25,3 +25,11 @@ jobs: name: 'Setup flake8 annotations' - run: make flake name: 'Run flake8' + - uses: codespell-project/actions-codespell@master + with: + path: $CODESPELL_DIRS + skip: $CODESPELL_SKIPS + name: 'Run codespell' + env: + CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' + CODESPELL_SKIPS: 'doc/auto_*,*.fif,*.eve,*.gz,*.tgz,*.zip,*.mat,*.stc,*.label,*.w,*.bz2,*.annot,*.sulc,*.log,*.local-copy,*.orig_avg,*.inflated_avg,*.gii,*.pyc,*.doctree,*.pickle,*.inv,*.png,*.edf,*.touch,*.thickness,*.nofix,*.volume,*.defect_borders,*.mgh,lh.*,rh.*,COR-*,FreeSurferColorLUT.txt,*.examples,.xdebug_mris_calc,bad.segments,BadChannels,*.hist,empty_file,*.orig,*.js,*.map,*.ipynb,searchindex.dat,install_mne_c.rst,plot_*.rst,*.rst.txt,c_EULA.rst*,*.html,gdf_encodes.txt,*.svg' From 38c18905a01f3a99e0b1355d39a9f252fdd744e4 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 12:51:57 +0100 Subject: [PATCH 47/91] Try another syntax --- .github/workflows/maint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index 3b054a0c72b..99e084229fd 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -27,8 +27,8 @@ jobs: name: 'Run flake8' - uses: codespell-project/actions-codespell@master with: - path: $CODESPELL_DIRS - skip: $CODESPELL_SKIPS + path: ${{ env.CODESPELL_DIRS }} + skip: ${{ env.CODESPELL_SKIPS }} name: 'Run codespell' env: CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' From dcd3f1e962ba37fa7b46b2709501b1e4a4c02210 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 13:46:58 +0100 Subject: [PATCH 48/91] Add builtin and ignore_words.txt --- .github/workflows/maint.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index 99e084229fd..b5fd3f28310 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -11,6 +11,9 @@ jobs: style: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest + env: + CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' + CODESPELL_SKIPS: 'doc/auto_*,*.fif,*.eve,*.gz,*.tgz,*.zip,*.mat,*.stc,*.label,*.w,*.bz2,*.annot,*.sulc,*.log,*.local-copy,*.orig_avg,*.inflated_avg,*.gii,*.pyc,*.doctree,*.pickle,*.inv,*.png,*.edf,*.touch,*.thickness,*.nofix,*.volume,*.defect_borders,*.mgh,lh.*,rh.*,COR-*,FreeSurferColorLUT.txt,*.examples,.xdebug_mris_calc,bad.segments,BadChannels,*.hist,empty_file,*.orig,*.js,*.map,*.ipynb,searchindex.dat,install_mne_c.rst,plot_*.rst,*.rst.txt,c_EULA.rst*,*.html,gdf_encodes.txt,*.svg' steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -29,7 +32,6 @@ jobs: with: path: ${{ env.CODESPELL_DIRS }} skip: ${{ env.CODESPELL_SKIPS }} + builtin: 'clear,rare,informal,names,usage' + ignore_words_file: 'ignore_words.txt' name: 'Run codespell' - env: - CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' - CODESPELL_SKIPS: 'doc/auto_*,*.fif,*.eve,*.gz,*.tgz,*.zip,*.mat,*.stc,*.label,*.w,*.bz2,*.annot,*.sulc,*.log,*.local-copy,*.orig_avg,*.inflated_avg,*.gii,*.pyc,*.doctree,*.pickle,*.inv,*.png,*.edf,*.touch,*.thickness,*.nofix,*.volume,*.defect_borders,*.mgh,lh.*,rh.*,COR-*,FreeSurferColorLUT.txt,*.examples,.xdebug_mris_calc,bad.segments,BadChannels,*.hist,empty_file,*.orig,*.js,*.map,*.ipynb,searchindex.dat,install_mne_c.rst,plot_*.rst,*.rst.txt,c_EULA.rst*,*.html,gdf_encodes.txt,*.svg' From 300922159ef56db4a355d8a93527bd36f562883d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 14:04:03 +0100 Subject: [PATCH 49/91] Remove usage from builtin dictionaries --- .github/workflows/maint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index b5fd3f28310..e32b49c5090 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -32,6 +32,6 @@ jobs: with: path: ${{ env.CODESPELL_DIRS }} skip: ${{ env.CODESPELL_SKIPS }} - builtin: 'clear,rare,informal,names,usage' + builtin: 'clear,rare,informal,names' ignore_words_file: 'ignore_words.txt' name: 'Run codespell' From 793eac11e12afb2704fd4f207d53af9bee938442 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 14:36:37 +0100 Subject: [PATCH 50/91] Test prototype codespell --- .github/workflows/maint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index e32b49c5090..3bb93f570ea 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -28,10 +28,11 @@ jobs: name: 'Setup flake8 annotations' - run: make flake name: 'Run flake8' - - uses: codespell-project/actions-codespell@master + - uses: GuillaumeFavelier/actions-codespell@master with: path: ${{ env.CODESPELL_DIRS }} skip: ${{ env.CODESPELL_SKIPS }} + quiet_level: '3' builtin: 'clear,rare,informal,names' ignore_words_file: 'ignore_words.txt' name: 'Run codespell' From 56cb65505f476eb7f8dcca5bec9ee9ad98a69620 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 14:48:57 +0100 Subject: [PATCH 51/91] Test prototype codespell --- .github/workflows/maint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index 3bb93f570ea..570e3220b66 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -28,7 +28,7 @@ jobs: name: 'Setup flake8 annotations' - run: make flake name: 'Run flake8' - - uses: GuillaumeFavelier/actions-codespell@master + - uses: GuillaumeFavelier/actions-codespell@feat/quiet_level with: path: ${{ env.CODESPELL_DIRS }} skip: ${{ env.CODESPELL_SKIPS }} From 457582221636e43b8eca9bebd1a1513e29e01d1a Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sat, 14 Nov 2020 17:55:18 +0100 Subject: [PATCH 52/91] Test separate jobs --- .github/workflows/compat.yml | 86 +++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 27 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index ddffc5a557b..0ea85a5dc2d 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -8,44 +8,76 @@ on: - '*' jobs: - main: + old: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.JOB_NAME }} runs-on: ubuntu-latest defaults: run: shell: bash env: - CONDA_DEPENDENCIES: ${{ matrix.CONDA_DEPENDENCIES }} - DEPS: ${{ matrix.DEPS }} DISPLAY: ':99.0' - MNE_DONTWRITE_HOME: ${{ matrix.MNE_DONTWRITE_HOME }} - MNE_FORCE_SERIAL: ${{ matrix.FORCE_SERIAL }} MNE_LOGGING_LEVEL: 'warning' - MNE_SKIP_NETWORK_TEST: ${{ matrix.MNE_SKIP_NETWORK_TEST }} - MNE_SKIP_TESTING_DATASET_TESTS: ${{ matrix.MNE_SKIP_TESTING_DATASET_TESTS }} OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} TRAVIS_OS_NAME: 'linux' - strategy: - fail-fast: false - matrix: - include: - # Old dependencies - - JOB_NAME: 'old' - PYTHON_VERSION: '3.6' - CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + PYTHON_VERSION: '3.6' + CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true + python-version: ${{ env.PYTHON_VERSION }} + name: 'Setup conda' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' - # Minimal (runs with and without testing data) - - JOB_NAME: 'minimal' - PYTHON_VERSION: '3.7' - DEPS: 'minimal' - CONDA_DEPENDENCIES: 'numpy scipy matplotlib' - MNE_DONTWRITE_HOME: true - MNE_FORCE_SERIAL: true - MNE_SKIP_NETWORK_TEST: 1 - MNE_SKIP_TESTING_DATASET_TESTS: true + minimal: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + DISPLAY: ':99.0' + MNE_LOGGING_LEVEL: 'warning' + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + TRAVIS_OS_NAME: 'linux' + PYTHON_VERSION: '3.7' + DEPS: 'minimal' + CONDA_DEPENDENCIES: 'numpy scipy matplotlib' + MNE_DONTWRITE_HOME: true + MNE_FORCE_SERIAL: true + MNE_SKIP_NETWORK_TEST: 1 + MNE_SKIP_TESTING_DATASET_TESTS: true steps: - uses: actions/checkout@v2 with: @@ -57,7 +89,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - python-version: ${{ matrix.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} run: | From 09c1a1c39311888d592574b781480e1cdb08b704 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sun, 15 Nov 2020 13:31:06 +0100 Subject: [PATCH 53/91] Split jobs --- .github/workflows/compat.yml | 20 +++++---- .github/workflows/linux.yml | 83 ++++++++++++++++++++++++------------ 2 files changed, 67 insertions(+), 36 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 0ea85a5dc2d..d2e3bc19711 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -8,6 +8,7 @@ on: - '*' jobs: + # Old dependencies old: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest @@ -15,13 +16,13 @@ jobs: run: shell: bash env: + CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' DISPLAY: ':99.0' MNE_LOGGING_LEVEL: 'warning' OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' - TRAVIS_OS_NAME: 'linux' PYTHON_VERSION: '3.6' - CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: @@ -59,6 +60,7 @@ jobs: if: success() name: 'Upload coverage to CodeCov' + # Minimal (runs with and without testing data) minimal: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest @@ -66,18 +68,18 @@ jobs: run: shell: bash env: - DISPLAY: ':99.0' - MNE_LOGGING_LEVEL: 'warning' - OPENBLAS_NUM_THREADS: '1' - PYTHONUNBUFFERED: '1' - TRAVIS_OS_NAME: 'linux' - PYTHON_VERSION: '3.7' - DEPS: 'minimal' CONDA_DEPENDENCIES: 'numpy scipy matplotlib' + DEPS: 'minimal' + DISPLAY: ':99.0' MNE_DONTWRITE_HOME: true MNE_FORCE_SERIAL: true + MNE_LOGGING_LEVEL: 'warning' MNE_SKIP_NETWORK_TEST: 1 MNE_SKIP_TESTING_DATASET_TESTS: true + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: '3.7' + TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 947ccb95537..114140647b0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,37 +8,21 @@ on: - '*' jobs: - main: + # Linux + conda: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.JOB_NAME }} runs-on: ubuntu-latest defaults: run: shell: bash env: - CONDA_ENV: ${{ matrix.CONDA_ENV }} + CONDA_ENV: 'environment.yml' DISPLAY: ':99.0' - MNE_LOGGING_LEVEL: ${{ matrix.MNE_LOGGING_LEVEL }} - MNE_STIM_CHANNEL: ${{ matrix.MNE_STIM_CHANNEL }} + MNE_LOGGING_LEVEL: 'warning' OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.8' TRAVIS_OS_NAME: 'linux' - strategy: - fail-fast: false - matrix: - include: - # Linux - - JOB_NAME: 'conda' - CONDA_ENV: 'environment.yml' - MNE_LOGGING_LEVEL: 'warning' - PIP: false - - # PIP + non-default stim channel + log level info - - JOB_NAME: 'pip' - MNE_STIM_CHANNEL: 'STI101' - MNE_LOGGING_LEVEL: 'info' - PIP: true steps: - uses: actions/checkout@v2 with: @@ -47,13 +31,7 @@ jobs: sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; name: 'Setup xvfb' - - if: ${{ matrix.PIP == true }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON_VERSION }} - name: 'Setup python' - - if: ${{ matrix.PIP == false }} - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v2 with: activate-environment: 'mne' python-version: ${{ env.PYTHON_VERSION }} @@ -82,3 +60,54 @@ jobs: - uses: codecov/codecov-action@v1 if: success() name: 'Upload coverage to CodeCov' + + # PIP + non-default stim channel + log level info + pip: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + DISPLAY: ':99.0' + MNE_LOGGING_LEVEL: 'info' + MNE_STIM_CHANNEL: 'STI101' + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: '3.8' + TRAVIS_OS_NAME: 'linux' + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + name: 'Setup python' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' From dcf1951d92f3fded74ac944142e72da9b06b8475 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Sun, 15 Nov 2020 13:39:43 +0100 Subject: [PATCH 54/91] Remove TRAVIS_OS_NAME variable --- .github/workflows/compat.yml | 2 -- .github/workflows/linux.yml | 2 -- .github/workflows/macos.yml | 2 +- tools/get_minimal_commands.sh | 2 +- tools/github_actions_test.sh | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index d2e3bc19711..66f8f171593 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -22,7 +22,6 @@ jobs: OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.6' - TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: @@ -79,7 +78,6 @@ jobs: OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.7' - TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 114140647b0..209436bf2ef 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -22,7 +22,6 @@ jobs: OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.8' - TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: @@ -75,7 +74,6 @@ jobs: OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.8' - TRAVIS_OS_NAME: 'linux' steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 78882694d9a..f964a354727 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -20,7 +20,7 @@ jobs: OPENBLAS_NUM_THREADS: '1' PYTHONUNBUFFERED: '1' CONDA_ENV: 'environment.yml' - TRAVIS_OS_NAME: 'osx' + CI_OS_NAME: 'osx' steps: - uses: actions/checkout@v2 with: diff --git a/tools/get_minimal_commands.sh b/tools/get_minimal_commands.sh index 7ad3a84ed95..399aeea130c 100755 --- a/tools/get_minimal_commands.sh +++ b/tools/get_minimal_commands.sh @@ -4,7 +4,7 @@ if [ "${DEPS}" != "minimal" ]; then pushd ~ > /dev/null export MNE_ROOT="${PWD}/minimal_cmds" export PATH=${MNE_ROOT}/bin:$PATH - if [ "${TRAVIS_OS_NAME}" != "osx" ]; then + if [ "${CI_OS_NAME}" != "osx" ]; then if [ ! -d "${PWD}/minimal_cmds" ]; then curl -L https://osf.io/g7dzs/download | tar xz fi; diff --git a/tools/github_actions_test.sh b/tools/github_actions_test.sh index 8cb1c755931..9add6bcbe6f 100755 --- a/tools/github_actions_test.sh +++ b/tools/github_actions_test.sh @@ -13,7 +13,7 @@ if [ "${DEPS}" == "minimal" ]; then fi; USE_DIRS="mne/" -if [ "${TRAVIS_OS_NAME}" != "osx" ]; then +if [ "${CI_OS_NAME}" != "osx" ]; then CONDITION="not ultraslowtest" else CONDITION="not slowtest" From 1f87e3f6953d0d22d3f10301c9ebdccf439627c6 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 11:15:07 +0100 Subject: [PATCH 55/91] Do not activate base --- .github/workflows/compat.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 66f8f171593..6471c2895d8 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -32,7 +32,6 @@ jobs: name: 'Setup xvfb' - uses: conda-incubator/setup-miniconda@v2 with: - auto-activate-base: true python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} @@ -88,7 +87,6 @@ jobs: name: 'Setup xvfb' - uses: conda-incubator/setup-miniconda@v2 with: - auto-activate-base: true python-version: ${{ env.PYTHON_VERSION }} name: 'Setup conda' - shell: bash -el {0} From 5f5c619fdb98d21331a1314bc036417cf45070d2 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 11:25:27 +0100 Subject: [PATCH 56/91] Test azure skip [skip azp] --- azure-pipelines.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 47cb785cb86..1e9910289cf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,9 @@ jobs: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' steps: + - bash: exit 0 + condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) + displayName: 'CHECK: check if commit contains CI skip' - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) @@ -67,6 +70,9 @@ jobs: DISPLAY: ':99' OPENBLAS_NUM_THREADS: '1' steps: + - bash: exit 0 + condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) + displayName: 'CHECK: check if commit contains CI skip' - bash: | sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* displayName: 'Install Ubuntu dependencies' @@ -119,6 +125,9 @@ jobs: pool: vmImage: 'ubuntu-18.04' steps: + - bash: exit 0 + condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) + displayName: 'CHECK: check if commit contains CI skip' - bash: | set -e wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega @@ -178,6 +187,9 @@ jobs: PYTHON_VERSION: '3.8' OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 steps: + - bash: exit 0 + condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) + displayName: 'CHECK: check if commit contains CI skip' - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) From dcbf8cae389e1e67063a3a57e65f6545565ce356 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 11:33:46 +0100 Subject: [PATCH 57/91] Revert "Test azure skip" [skip ci] This reverts commit 5f5c619fdb98d21331a1314bc036417cf45070d2. --- azure-pipelines.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1e9910289cf..47cb785cb86 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,9 +19,6 @@ jobs: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' steps: - - bash: exit 0 - condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) - displayName: 'CHECK: check if commit contains CI skip' - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) @@ -70,9 +67,6 @@ jobs: DISPLAY: ':99' OPENBLAS_NUM_THREADS: '1' steps: - - bash: exit 0 - condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) - displayName: 'CHECK: check if commit contains CI skip' - bash: | sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* displayName: 'Install Ubuntu dependencies' @@ -125,9 +119,6 @@ jobs: pool: vmImage: 'ubuntu-18.04' steps: - - bash: exit 0 - condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) - displayName: 'CHECK: check if commit contains CI skip' - bash: | set -e wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega @@ -187,9 +178,6 @@ jobs: PYTHON_VERSION: '3.8' OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 steps: - - bash: exit 0 - condition: or(contains(variables['Build.SourceVersionMessage'], '[skip azp]'), contains(variables['Build.SourceVersionMessage'], '[azp skip]'), contains(variables['Build.SourceVersionMessage'], '[skip ci]'), contains(variables['Build.SourceVersionMessage'], '[ci skip]')) - displayName: 'CHECK: check if commit contains CI skip' - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) From 96200555fd29d7500d4819f495be471301c1b7ce Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 16:21:55 +0100 Subject: [PATCH 58/91] Test azure variable [skip github] --- azure-pipelines.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 47cb785cb86..df68a3f3c5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,6 +10,10 @@ pr: include: - '*' # must quote since "*" is a YAML reserved character; we want a string +variables: +- name: github_status + value: '' + jobs: - job: Style @@ -19,6 +23,11 @@ jobs: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' steps: + - bash: echo ${{ variables.github_status }} + - bash: | + commit_msg=$(git log HEAD~2..HEAD~1 --pretty=%B) + echo "##vso[task.setvariable variable=github_status]${commit_msg}" + - bash: echo ${{ variables.github_status }} - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) From a4332c1e4c048845716708841e7f91fb6c52801c Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 16:45:53 +0100 Subject: [PATCH 59/91] Try another syntax [skip ci] --- azure-pipelines.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index df68a3f3c5d..2a726c07dcc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,10 +10,6 @@ pr: include: - '*' # must quote since "*" is a YAML reserved character; we want a string -variables: -- name: github_status - value: '' - jobs: - job: Style @@ -23,11 +19,13 @@ jobs: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' steps: - - bash: echo ${{ variables.github_status }} - bash: | - commit_msg=$(git log HEAD~2..HEAD~1 --pretty=%B) - echo "##vso[task.setvariable variable=github_status]${commit_msg}" - - bash: echo ${{ variables.github_status }} + commit_msg=`git log -n 1 --pretty=format:"%s"` + echo "commit_msg=${commit_msg}" + echo "##vso[task.setvariable variable=commit_msg]${commit_msg}" + - bash: echo ${{ variables.commit_msg }} + - bash: echo "Run tests" + condition: not(contains(variables.commit_msg, '[skip ci]')) - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) From d0f5ffbd7a684556de64a1179bb8d1b21ceade34 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 17:05:37 +0100 Subject: [PATCH 60/91] Show more logs --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2a726c07dcc..7467ed232b8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,7 @@ jobs: PYTHON_ARCH: 'x64' steps: - bash: | - commit_msg=`git log -n 1 --pretty=format:"%s"` + commit_msg=`git log -n 10 --pretty=format:"%s"` echo "commit_msg=${commit_msg}" echo "##vso[task.setvariable variable=commit_msg]${commit_msg}" - bash: echo ${{ variables.commit_msg }} From a13ed085025c8852e77cb7ad13f1ef23857cba11 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 17:19:19 +0100 Subject: [PATCH 61/91] TST: Skip azure style job [skip azp] --- azure-pipelines.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7467ed232b8..cac0a39b2fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,51 +20,49 @@ jobs: PYTHON_ARCH: 'x64' steps: - bash: | - commit_msg=`git log -n 10 --pretty=format:"%s"` + commit_msg=`git log -n 2 --pretty=format:"%s"` echo "commit_msg=${commit_msg}" echo "##vso[task.setvariable variable=commit_msg]${commit_msg}" - - bash: echo ${{ variables.commit_msg }} - - bash: echo "Run tests" - condition: not(contains(variables.commit_msg, '[skip ci]')) - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make flake displayName: make flake - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make pydocstyle displayName: make pydocstyle - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make codespell-error displayName: make codespell-error - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make docstring displayName: make docstring - bash: | make nesting displayName: make nesting - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make check-manifest displayName: make check-manifest - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - bash: | make check-readme displayName: make check-readme - condition: always() + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) - job: Ultraslow From f8304ddf14d3bca1c805384ee12e47865e2556a2 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 17:23:32 +0100 Subject: [PATCH 62/91] Try again [skip azp] --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cac0a39b2fa..f58dbe73d60 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,40 +29,40 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make flake displayName: make flake - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make pydocstyle displayName: make pydocstyle - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make codespell-error displayName: make codespell-error - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make docstring displayName: make docstring - bash: | make nesting displayName: make nesting - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make check-manifest displayName: make check-manifest - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - bash: | make check-readme displayName: make check-readme - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]')))) + condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) - job: Ultraslow From fc24279de5efd7faeea74df350cf947ff8b445b4 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Mon, 16 Nov 2020 17:29:02 +0100 Subject: [PATCH 63/91] Try again [skip azp][skip ci] --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f58dbe73d60..81cf660081d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,40 +29,40 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: not(contains(variables.commit_msg, '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make flake displayName: make flake - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make pydocstyle displayName: make pydocstyle - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make codespell-error displayName: make codespell-error - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make docstring displayName: make docstring - bash: | make nesting displayName: make nesting - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make check-manifest displayName: make check-manifest - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - bash: | make check-readme displayName: make check-readme - condition: and(not(contains(variables.commit_msg, '[skip azp]'), not(contains(variables.commit_msg, '[azp skip]'), not(contains(variables.commit_msg, '[skip ci]')), not(contains(variables.commit_msg, '[ci skip]'))))) + condition: always() - job: Ultraslow From f921ba18d2411b5bd846d78245fb9a4758c5e93c Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 10:20:01 +0100 Subject: [PATCH 64/91] Try again [skip azp] --- azure-pipelines.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 81cf660081d..61177997969 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,6 @@ jobs: steps: - bash: | commit_msg=`git log -n 2 --pretty=format:"%s"` - echo "commit_msg=${commit_msg}" echo "##vso[task.setvariable variable=commit_msg]${commit_msg}" - task: UsePythonVersion@0 inputs: @@ -29,40 +28,33 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: not(contains(variables.commit_msg, '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: always() + condition: not(contains(variables.commit_msg, '[skip azp]')) - bash: | make flake displayName: make flake - condition: always() - bash: | make pydocstyle displayName: make pydocstyle - condition: always() - bash: | make codespell-error displayName: make codespell-error - condition: always() - bash: | make docstring displayName: make docstring - bash: | make nesting displayName: make nesting - condition: always() - bash: | make check-manifest displayName: make check-manifest - condition: always() - bash: | make check-readme displayName: make check-readme - condition: always() - job: Ultraslow From 44e63423dbdaf8ab72a0557267d642fd82f9e88b Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:01:17 +0100 Subject: [PATCH 65/91] Try another syntax [skip azp] --- azure-pipelines.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61177997969..f517f57e7fd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,33 +28,41 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: not(contains(variables.commit_msg, '[skip azp]')) + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make flake displayName: make flake + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make pydocstyle displayName: make pydocstyle + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make codespell-error displayName: make codespell-error + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make docstring displayName: make docstring + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make nesting displayName: make nesting + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make check-manifest displayName: make check-manifest + condition: not(contains($[variables.commit_msg], '[skip azp]')) - bash: | make check-readme displayName: make check-readme + condition: not(contains($[variables.commit_msg], '[skip azp]')) - job: Ultraslow From c0ca0dcdfb5da02b999800f4ca1b17c5b32cb972 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:03:29 +0100 Subject: [PATCH 66/91] Try another syntax (again) [skip azp] --- azure-pipelines.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f517f57e7fd..d98dedd1fa2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,41 +28,41 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make flake displayName: make flake - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make pydocstyle displayName: make pydocstyle - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make codespell-error displayName: make codespell-error - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make docstring displayName: make docstring - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make nesting displayName: make nesting - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make check-manifest displayName: make check-manifest - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make check-readme displayName: make check-readme - condition: not(contains($[variables.commit_msg], '[skip azp]')) + condition: not(contains($(commit_msg), '[skip azp]')) - job: Ultraslow From 0a466f2539b172c1f773e3cd18936c36ab153b1a Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:26:10 +0100 Subject: [PATCH 67/91] Try another syntax (again) [skip azp] --- azure-pipelines.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d98dedd1fa2..9c23a9fef4e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,41 +28,33 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: not(contains($(commit_msg), '[skip azp]')) + condition: not(contains(variables['commit_msg'], '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make flake displayName: make flake - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make pydocstyle displayName: make pydocstyle - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make codespell-error displayName: make codespell-error - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make docstring displayName: make docstring - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make nesting displayName: make nesting - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make check-manifest displayName: make check-manifest - condition: not(contains($(commit_msg), '[skip azp]')) - bash: | make check-readme displayName: make check-readme - condition: not(contains($(commit_msg), '[skip azp]')) - job: Ultraslow From cfaed5ca0cfe692224048b2e4920f552dc81d42d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:38:30 +0100 Subject: [PATCH 68/91] Try another syntax [skip azp] --- azure-pipelines.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9c23a9fef4e..acbe6facd26 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,23 +12,29 @@ pr: jobs: +- job: Skip + steps: + - bash: | + commit_msg=`git log -n 2 --pretty=format:"%s"` + echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${commit_msg}" + name: first_step + - job: Style + dependsOn: Skip pool: vmImage: 'ubuntu-18.04' variables: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x64' + COMMIT_MSG: $[ dependencies.Skip.outputs['first_step.commit_msg'] ] steps: - - bash: | - commit_msg=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg]${commit_msg}" - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: not(contains(variables['commit_msg'], '[skip azp]')) + condition: not(contains(variables['COMMIT_MSG'], '[skip azp]') - bash: | set -e python -m pip install --upgrade pip setuptools From 7e2dd1a566c1be107ed1a8bb92b157a1531f2e0f Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:43:05 +0100 Subject: [PATCH 69/91] Try another syntax [skip azp] --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index acbe6facd26..964453df427 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,8 @@ pr: jobs: - job: Skip + pool: + vmImage: 'ubuntu-18.04' steps: - bash: | commit_msg=`git log -n 2 --pretty=format:"%s"` From 1db58976a3cfa73e481bfa0a6be841bf82313aea Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:45:02 +0100 Subject: [PATCH 70/91] Try another syntax [skip azp] --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 964453df427..219b4f91335 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,7 +36,7 @@ jobs: architecture: $(PYTHON_ARCH) addToPath: true displayName: 'Get Python' - condition: not(contains(variables['COMMIT_MSG'], '[skip azp]') + condition: not(contains(variables['COMMIT_MSG'], '[skip azp]')) - bash: | set -e python -m pip install --upgrade pip setuptools From b5d98354df0648036b56009afb76b1d8d58f964f Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 11:51:15 +0100 Subject: [PATCH 71/91] Try again [skip azp] --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 219b4f91335..97f2651e9ab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,6 +30,7 @@ jobs: PYTHON_ARCH: 'x64' COMMIT_MSG: $[ dependencies.Skip.outputs['first_step.commit_msg'] ] steps: + - bash: echo $COMMIT_MSG - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) From c5291326a94fa682d04a201d88e59121a619d6d6 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:01:48 +0100 Subject: [PATCH 72/91] Try again [skip azp][skip ci] --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 97f2651e9ab..3725cd16c89 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,8 @@ jobs: vmImage: 'ubuntu-18.04' steps: - bash: | - commit_msg=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${commit_msg}" + git_log=`git log -n 2 --pretty=format:"%s"` + echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" name: first_step - job: Style From de5615131cfbd6041666d56a8b6aa42d458d6abe Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:15:01 +0100 Subject: [PATCH 73/91] Try another syntax --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3725cd16c89..0e93e1a808f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ jobs: steps: - bash: | git_log=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" + echo "##vso[task.setvariable variable=commit_msg;isOutput=true]$(git_log)" name: first_step - job: Style From 0fd16ee3a49ffe2d7b2111c1c67b356729660b85 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:16:07 +0100 Subject: [PATCH 74/91] TST: Experiment with maint/style [skip azp][skip ci] --- .github/workflows/maint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index 570e3220b66..99e387473d7 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -9,7 +9,7 @@ on: jobs: style: - if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest env: CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' From a65e19a961bd264721e0bbd791081f5b6b3d5a6d Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:45:38 +0100 Subject: [PATCH 75/91] Try another syntax --- azure-pipelines.yml | 475 ++++++++++++++++++++++---------------------- 1 file changed, 240 insertions(+), 235 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0e93e1a808f..f50858fb660 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,246 +10,251 @@ pr: include: - '*' # must quote since "*" is a YAML reserved character; we want a string -jobs: -- job: Skip - pool: - vmImage: 'ubuntu-18.04' - steps: - - bash: | - git_log=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg;isOutput=true]$(git_log)" - name: first_step +stages: -- job: Style - dependsOn: Skip - pool: - vmImage: 'ubuntu-18.04' - variables: - PYTHON_VERSION: '3.8' - PYTHON_ARCH: 'x64' - COMMIT_MSG: $[ dependencies.Skip.outputs['first_step.commit_msg'] ] - steps: - - bash: echo $COMMIT_MSG - - task: UsePythonVersion@0 - inputs: - versionSpec: $(PYTHON_VERSION) - architecture: $(PYTHON_ARCH) - addToPath: true - displayName: 'Get Python' - condition: not(contains(variables['COMMIT_MSG'], '[skip azp]')) - - bash: | - set -e - python -m pip install --upgrade pip setuptools - python -m pip install numpy scipy matplotlib -r requirements_testing.txt - displayName: Install dependencies - - bash: | - make flake - displayName: make flake - - bash: | - make pydocstyle - displayName: make pydocstyle - - bash: | - make codespell-error - displayName: make codespell-error - - bash: | - make docstring - displayName: make docstring - - bash: | - make nesting - displayName: make nesting - - bash: | - make check-manifest - displayName: make check-manifest - - bash: | - make check-readme - displayName: make check-readme +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-18.04' + steps: + - bash: | + git_log=`git log -n 2 --pretty=format:"%s"` + echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" + echo $(commit_msg) + name: first_step +- stage: Main + condition: not(contains(dependencies.Check.outputs['Skip.first_step.commit_msg'], '[skip azp]')) + dependsOn: Check + jobs: + - job: Style + pool: + vmImage: 'ubuntu-18.04' + variables: + PYTHON_VERSION: '3.8' + PYTHON_ARCH: 'x64' + steps: + - bash: echo $(COMMIT_MSG) + - task: UsePythonVersion@0 + inputs: + versionSpec: $(PYTHON_VERSION) + architecture: $(PYTHON_ARCH) + addToPath: true + displayName: 'Get Python' + - bash: | + set -e + python -m pip install --upgrade pip setuptools + python -m pip install numpy scipy matplotlib -r requirements_testing.txt + displayName: Install dependencies + - bash: | + make flake + displayName: make flake + - bash: | + make pydocstyle + displayName: make pydocstyle + - bash: | + make codespell-error + displayName: make codespell-error + - bash: | + make docstring + displayName: make docstring + - bash: | + make nesting + displayName: make nesting + - bash: | + make check-manifest + displayName: make check-manifest + - bash: | + make check-readme + displayName: make check-readme -- job: Ultraslow - pool: - vmImage: 'ubuntu-18.04' - variables: - DISPLAY: ':99' - OPENBLAS_NUM_THREADS: '1' - steps: - - bash: | - sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* - displayName: 'Install Ubuntu dependencies' - - bash: | - source tools/get_minimal_commands.sh - echo "##vso[task.setvariable variable=MNE_ROOT]${MNE_ROOT}" - echo "##vso[task.setvariable variable=PATH]${PATH}" - echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" - echo "##vso[task.setvariable variable=NEUROMAG2FT_ROOT]${NEUROMAG2FT_ROOT}" - echo "##vso[task.setvariable variable=FREESURFER_HOME]${FREESURFER_HOME}" - echo "##vso[task.setvariable variable=MNE_SKIP_FS_FLASH_CALL]${MNE_SKIP_FS_FLASH_CALL}" - displayName: 'Install minimal commands' - - bash: | - echo $PATH - mne_surf2bem --version - fsl_rigid_register --version - displayName: 'Test minimal commands' - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - architecture: 'x64' - addToPath: true - displayName: 'Get Python' - - bash: | - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - displayName: 'Spin up Xvfb' - - bash: | - set -e - python -m pip install --upgrade pip setuptools - python -m pip install --upgrade numpy scipy vtk -r requirements.txt -r requirements_testing.txt codecov - displayName: 'Install dependencies with pip' - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest -m "ultraslowtest" --tb=short --cov=mne -vv mne - displayName: 'Run ultraslow tests' - - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName)' - failTaskOnFailedTests: true - condition: succeededOrFailed() + - job: Ultraslow + pool: + vmImage: 'ubuntu-18.04' + variables: + DISPLAY: ':99' + OPENBLAS_NUM_THREADS: '1' + steps: + - bash: | + sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb* + displayName: 'Install Ubuntu dependencies' + - bash: | + source tools/get_minimal_commands.sh + echo "##vso[task.setvariable variable=MNE_ROOT]${MNE_ROOT}" + echo "##vso[task.setvariable variable=PATH]${PATH}" + echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" + echo "##vso[task.setvariable variable=NEUROMAG2FT_ROOT]${NEUROMAG2FT_ROOT}" + echo "##vso[task.setvariable variable=FREESURFER_HOME]${FREESURFER_HOME}" + echo "##vso[task.setvariable variable=MNE_SKIP_FS_FLASH_CALL]${MNE_SKIP_FS_FLASH_CALL}" + displayName: 'Install minimal commands' + - bash: | + echo $PATH + mne_surf2bem --version + fsl_rigid_register --version + displayName: 'Test minimal commands' + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + architecture: 'x64' + addToPath: true + displayName: 'Get Python' + - bash: | + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + displayName: 'Spin up Xvfb' + - bash: | + set -e + python -m pip install --upgrade pip setuptools + python -m pip install --upgrade numpy scipy vtk -r requirements.txt -r requirements_testing.txt codecov + displayName: 'Install dependencies with pip' + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest -m "ultraslowtest" --tb=short --cov=mne -vv mne + displayName: 'Run ultraslow tests' + - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName)' + failTaskOnFailedTests: true + condition: succeededOrFailed() -- job: Notebook - pool: - vmImage: 'ubuntu-18.04' - steps: - - bash: | - set -e - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega - bash miniconda.sh -b -p ~/miniconda - source ~/miniconda/etc/profile.d/conda.sh - conda activate base - conda env update --file server_environment.yml - pip uninstall -yq mne - pip install -ve . - pip install pytest pytest-cov pytest-timeout pytest-sugar pytest-xdist flake8 codecov - echo "##vso[task.setvariable variable=PATH]${PATH}" - echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" - displayName: 'Install dependencies' - - script: mne sys_info - displayName: 'Print config and test access to commands' - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest --tb=short --cov=mne -vv mne/viz - displayName: 'Run viz tests' - - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName)' - failTaskOnFailedTests: true - condition: succeededOrFailed() + - job: Notebook + pool: + vmImage: 'ubuntu-18.04' + steps: + - bash: | + set -e + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh --progress=dot:mega + bash miniconda.sh -b -p ~/miniconda + source ~/miniconda/etc/profile.d/conda.sh + conda activate base + conda env update --file server_environment.yml + pip uninstall -yq mne + pip install -ve . + pip install pytest pytest-cov pytest-timeout pytest-sugar pytest-xdist flake8 codecov + echo "##vso[task.setvariable variable=PATH]${PATH}" + echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]${LD_LIBRARY_PATH}" + displayName: 'Install dependencies' + - script: mne sys_info + displayName: 'Print config and test access to commands' + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest --tb=short --cov=mne -vv mne/viz + displayName: 'Run viz tests' + - script: codecov --root $BUILD_REPOSITORY_LOCALPATH -t $CODECOV_TOKEN + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName)' + failTaskOnFailedTests: true + condition: succeededOrFailed() -- job: Windows - pool: - vmImage: 'VS2017-Win2016' - variables: - MNE_LOGGING_LEVEL: 'warning' - MNE_FORCE_SERIAL: 'true' - OPENBLAS_NUM_THREADS: 1 - PYTHONUNBUFFERED: 1 - PYTHONIOENCODING: 'utf-8' - MKL_NUM_THREADS: 1 - AZURE_CI_WINDOWS: 'true' - PYTHON_ARCH: 'x64' - strategy: - maxParallel: 4 - matrix: - 3.7 conda: - PLATFORM: 'x86-64' - TEST_MODE: 'conda' - PYTHON_VERSION: '3.8' - 3.7 pip: - TEST_MODE: 'pip' - PYTHON_VERSION: '3.7' - 3.8 pip pre: - TEST_MODE: 'pre-pip' - PYTHON_VERSION: '3.8' - OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: $(PYTHON_VERSION) - architecture: $(PYTHON_ARCH) - addToPath: true - condition: in(variables['TEST_MODE'], 'pip', 'pre-pip') - displayName: 'Get Python' - # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda - # https://github.com/MicrosoftDocs/pipelines-anaconda - # Qt 5.9 post-link failure: - # https://github.com/ContinuumIO/anaconda-issues/issues/10949 - - script: echo "##vso[task.prependpath]%CONDA%;%CONDA%\condabin;%CONDA%\Scripts;%CONDA%\Library\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;" - condition: in(variables['TEST_MODE'], 'conda') - displayName: Add conda to PATH, deal with Qt 5.9 bug - - bash: | - set -e - git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git - powershell gl-ci-helpers/appveyor/install_opengl.ps1 - displayName: Install OpenGL - - bash: | - set -e - python -m pip install --upgrade pip "setuptools<50.0" - python -m pip install --upgrade numpy scipy vtk - python -m pip install --upgrade -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<50.0" - python -m pip install --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" - python -m pip install --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 -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' - - script: python setup.py develop - displayName: 'Install MNE-Python dev' - - script: mne sys_info - displayName: 'Print config and test access to commands' - - script: python -c "import numpy; numpy.show_config()" - displayName: Print NumPy config - - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" - displayName: 'Get test data' - - script: pytest -m "not slowtest" --tb=short --cov=mne -vv mne - displayName: 'Run tests' - - script: codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN% - displayName: 'Codecov' - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit-*.xml' - testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)' - failTaskOnFailedTests: true - condition: succeededOrFailed() + + - job: Windows + pool: + vmImage: 'VS2017-Win2016' + variables: + MNE_LOGGING_LEVEL: 'warning' + MNE_FORCE_SERIAL: 'true' + OPENBLAS_NUM_THREADS: 1 + PYTHONUNBUFFERED: 1 + PYTHONIOENCODING: 'utf-8' + MKL_NUM_THREADS: 1 + AZURE_CI_WINDOWS: 'true' + PYTHON_ARCH: 'x64' + strategy: + maxParallel: 4 + matrix: + 3.7 conda: + PLATFORM: 'x86-64' + TEST_MODE: 'conda' + PYTHON_VERSION: '3.8' + 3.7 pip: + TEST_MODE: 'pip' + PYTHON_VERSION: '3.7' + 3.8 pip pre: + TEST_MODE: 'pre-pip' + PYTHON_VERSION: '3.8' + OPENBLAS_CORETYPE: 'prescott' # workaround for https://github.com/numpy/numpy/issues/16913 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: $(PYTHON_VERSION) + architecture: $(PYTHON_ARCH) + addToPath: true + condition: in(variables['TEST_MODE'], 'pip', 'pre-pip') + displayName: 'Get Python' + # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda + # https://github.com/MicrosoftDocs/pipelines-anaconda + # Qt 5.9 post-link failure: + # https://github.com/ContinuumIO/anaconda-issues/issues/10949 + - script: echo "##vso[task.prependpath]%CONDA%;%CONDA%\condabin;%CONDA%\Scripts;%CONDA%\Library\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;" + condition: in(variables['TEST_MODE'], 'conda') + displayName: Add conda to PATH, deal with Qt 5.9 bug + - bash: | + set -e + git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git + powershell gl-ci-helpers/appveyor/install_opengl.ps1 + displayName: Install OpenGL + - bash: | + set -e + python -m pip install --upgrade pip "setuptools<50.0" + python -m pip install --upgrade numpy scipy vtk + python -m pip install --upgrade -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<50.0" + python -m pip install --upgrade --pre --only-binary ":all:" -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" "numpy!=1.20.0.dev0+20201111233731.0ffaaf8,!=1.20.0.dev0+20201111232921.0ffaaf8" + python -m pip install --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 -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' + - script: python setup.py develop + displayName: 'Install MNE-Python dev' + - script: mne sys_info + displayName: 'Print config and test access to commands' + - script: python -c "import numpy; numpy.show_config()" + displayName: Print NumPy config + - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" + displayName: 'Get test data' + - script: pytest -m "not slowtest" --tb=short --cov=mne -vv mne + displayName: 'Run tests' + - script: codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN% + displayName: 'Codecov' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + condition: succeededOrFailed() + - task: PublishTestResults@2 + inputs: + testResultsFiles: 'junit-*.xml' + testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)' + failTaskOnFailedTests: true + condition: succeededOrFailed() From 20028aeb953d68a6e8fe32c750cac0e21b32d273 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:45:48 +0100 Subject: [PATCH 76/91] Revert "TST: Experiment with maint/style [skip azp][skip ci]" This reverts commit 0fd16ee3a49ffe2d7b2111c1c67b356729660b85. --- .github/workflows/maint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maint.yml b/.github/workflows/maint.yml index 99e387473d7..570e3220b66 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/maint.yml @@ -9,7 +9,7 @@ on: jobs: style: - if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest env: CODESPELL_DIRS: 'mne/ doc/ tutorials/ examples/' From 2da6cea0ec656d793ee6621cb9278d09a4bc3754 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:46:16 +0100 Subject: [PATCH 77/91] Trigger CIs [skip azp] From dd6a4e98834db30b5d815e65f494697fa0a99daa Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:49:02 +0100 Subject: [PATCH 78/91] Try again [skip azp] --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f50858fb660..f3025171677 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,14 +16,14 @@ stages: - stage: Check jobs: - job: Skip - pool: - vmImage: 'ubuntu-18.04' - steps: - - bash: | - git_log=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" - echo $(commit_msg) - name: first_step + pool: + vmImage: 'ubuntu-18.04' + steps: + - bash: | + git_log=`git log -n 2 --pretty=format:"%s"` + echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" + echo $(commit_msg) + name: first_step - stage: Main condition: not(contains(dependencies.Check.outputs['Skip.first_step.commit_msg'], '[skip azp]')) From 6cd934d00cb4bc5f97378b34459e80fed25d7b56 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 12:55:38 +0100 Subject: [PATCH 79/91] Try again [skip azp] --- azure-pipelines.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f3025171677..a5dc6b4933c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,12 +21,11 @@ stages: steps: - bash: | git_log=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=commit_msg;isOutput=true]${git_log}" - echo $(commit_msg) - name: first_step + echo "##vso[task.setvariable variable=start_main;isOutput=true]false" + name: result - stage: Main - condition: not(contains(dependencies.Check.outputs['Skip.first_step.commit_msg'], '[skip azp]')) + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - job: Style From 6d4b80216f09880e074ab43637176ce7d6848935 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 13:16:29 +0100 Subject: [PATCH 80/91] Try again [skip azp] --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a5dc6b4933c..3d8086d3b47 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,11 @@ stages: steps: - bash: | git_log=`git log -n 2 --pretty=format:"%s"` - echo "##vso[task.setvariable variable=start_main;isOutput=true]false" + echo "##vso[task.setvariable variable=log]$git_log" + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]true" + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]false" + condition: contains(variables.log, '[skip azp]') + - bash: echo $(start_main) name: result - stage: Main From 6d61ebd5d8d5aacfc3245f4ddf2820b4f4895b12 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 13:30:58 +0100 Subject: [PATCH 81/91] Try again [skip azp] --- azure-pipelines.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3d8086d3b47..a10d0f8523c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,14 +18,16 @@ stages: - job: Skip pool: vmImage: 'ubuntu-18.04' + variables: + RET: 'true' steps: - bash: | - git_log=`git log -n 2 --pretty=format:"%s"` + git_log=`git log HEAD~2..HEAD~1 --pretty=format:"%s"` echo "##vso[task.setvariable variable=log]$git_log" - - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]true" - - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]false" + echo $log + - bash: echo "##vso[task.setvariable variable=RET]false" condition: contains(variables.log, '[skip azp]') - - bash: echo $(start_main) + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" name: result - stage: Main From 2a48de0516a9445f09e9ba9bebd0145c4baca185 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 13:33:43 +0100 Subject: [PATCH 82/91] Try again [skip azp] --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a10d0f8523c..854a5b91eb0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ stages: RET: 'true' steps: - bash: | - git_log=`git log HEAD~2..HEAD~1 --pretty=format:"%s"` + git_log=`git log -n 1 --pretty=format:"%s"` echo "##vso[task.setvariable variable=log]$git_log" echo $log - bash: echo "##vso[task.setvariable variable=RET]false" From f24c4b356ea854707b9dfa1cc9214c93fe3e235e Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 13:53:27 +0100 Subject: [PATCH 83/91] TST: Empty commit From f564233506c6551b5cd40ca6bc7658a52fe549e6 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 13:55:31 +0100 Subject: [PATCH 84/91] Try again [skip azp] --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 854a5b91eb0..61de8680a9f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ stages: RET: 'true' steps: - bash: | - git_log=`git log -n 1 --pretty=format:"%s"` + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%s"` echo "##vso[task.setvariable variable=log]$git_log" echo $log - bash: echo "##vso[task.setvariable variable=RET]false" From c2824f5d5e93d3b2702f01167caba49bc7dca2ce Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:00:22 +0100 Subject: [PATCH 85/91] Add the full list --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61de8680a9f..7470fa5ad86 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,9 +24,8 @@ stages: - bash: | git_log=`git log --max-count=1 --skip=1 --pretty=format:"%s"` echo "##vso[task.setvariable variable=log]$git_log" - echo $log - bash: echo "##vso[task.setvariable variable=RET]false" - condition: contains(variables.log, '[skip azp]') + condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" name: result From ec050f7f72839254aae5a6199bf1352d77a0fbc9 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:01:56 +0100 Subject: [PATCH 86/91] Restore style job --- azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7470fa5ad86..309c844325e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,27 +52,34 @@ stages: python -m pip install --upgrade pip setuptools python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies + condition: always() - bash: | make flake displayName: make flake + condition: always() - bash: | make pydocstyle displayName: make pydocstyle + condition: always() - bash: | make codespell-error displayName: make codespell-error + condition: always() - bash: | make docstring displayName: make docstring - bash: | make nesting displayName: make nesting + condition: always() - bash: | make check-manifest displayName: make check-manifest + condition: always() - bash: | make check-readme displayName: make check-readme + condition: always() - job: Ultraslow From 64ad8655f7e47ce9ad94d3b504680285ba646c5a Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:04:20 +0100 Subject: [PATCH 87/91] Test again [skip ci] From baae1d162e01bca79c2e658f11adf424d9d4a560 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:08:16 +0100 Subject: [PATCH 88/91] Test no skip From 1eb7c6b3fc6e00ef6dfe7cd57133608961a259c2 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:45:00 +0100 Subject: [PATCH 89/91] Release new workflows --- .../{maint.yml => codespell_and_flake.yml} | 2 +- .../{compat.yml => compat_minimal.yml} | 55 +---------------- .github/workflows/compat_old.yml | 60 +++++++++++++++++++ .../workflows/{linux.yml => linux_conda.yml} | 55 +---------------- .github/workflows/linux_pip.yml | 60 +++++++++++++++++++ .../workflows/{macos.yml => macos_conda.yml} | 5 +- azure-pipelines.yml | 8 --- 7 files changed, 130 insertions(+), 115 deletions(-) rename .github/workflows/{maint.yml => codespell_and_flake.yml} (98%) rename .github/workflows/{compat.yml => compat_minimal.yml} (52%) create mode 100644 .github/workflows/compat_old.yml rename .github/workflows/{linux.yml => linux_conda.yml} (51%) create mode 100644 .github/workflows/linux_pip.yml rename .github/workflows/{macos.yml => macos_conda.yml} (96%) diff --git a/.github/workflows/maint.yml b/.github/workflows/codespell_and_flake.yml similarity index 98% rename from .github/workflows/maint.yml rename to .github/workflows/codespell_and_flake.yml index 570e3220b66..d3a38a82ac0 100644 --- a/.github/workflows/maint.yml +++ b/.github/workflows/codespell_and_flake.yml @@ -1,4 +1,4 @@ -name: 'maint' +name: 'codespell_and_flake' on: push: branches: diff --git a/.github/workflows/compat.yml b/.github/workflows/compat_minimal.yml similarity index 52% rename from .github/workflows/compat.yml rename to .github/workflows/compat_minimal.yml index 6471c2895d8..f49f0050a86 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat_minimal.yml @@ -1,4 +1,4 @@ -name: 'compat' +name: 'compat / minimal' on: push: branches: @@ -8,59 +8,10 @@ on: - '*' jobs: - # Old dependencies - old: - if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - runs-on: ubuntu-latest - defaults: - run: - shell: bash - env: - CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' - DISPLAY: ':99.0' - MNE_LOGGING_LEVEL: 'warning' - OPENBLAS_NUM_THREADS: '1' - PYTHONUNBUFFERED: '1' - PYTHON_VERSION: '3.6' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - run: | - sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - name: 'Setup xvfb' - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ env.PYTHON_VERSION }} - name: 'Setup conda' - - shell: bash -el {0} - run: | - ./tools/github_actions_dependencies.sh - source tools/get_minimal_commands.sh - name: 'Install dependencies' - - shell: bash -el {0} - run: ./tools/github_actions_install.sh - name: 'Install MNE' - - shell: bash -el {0} - run: ./tools/github_actions_infos.sh - name: 'Show infos' - - shell: bash -el {0} - run: ./tools/github_actions_download.sh - name: 'Download testing data' - - shell: bash -el {0} - run: ./tools/github_actions_locale.sh - name: 'Print locale' - - shell: bash -el {0} - run: ./tools/github_actions_test.sh - name: 'Run tests' - - uses: codecov/codecov-action@v1 - if: success() - name: 'Upload coverage to CodeCov' - # Minimal (runs with and without testing data) - minimal: + job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/compat_old.yml b/.github/workflows/compat_old.yml new file mode 100644 index 00000000000..a8612b6a6b1 --- /dev/null +++ b/.github/workflows/compat_old.yml @@ -0,0 +1,60 @@ +name: 'compat / old' +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + # Old dependencies + job: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.PYTHON_VERSION }} + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + CONDA_DEPENDENCIES: 'numpy=1.15.4 scipy=1.1 matplotlib=3.0.3 pandas=0.23.4 scikit-learn=0.20.2' + DISPLAY: ':99.0' + MNE_LOGGING_LEVEL: 'warning' + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: '3.6' + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + name: 'Setup conda' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' diff --git a/.github/workflows/linux.yml b/.github/workflows/linux_conda.yml similarity index 51% rename from .github/workflows/linux.yml rename to .github/workflows/linux_conda.yml index 209436bf2ef..0b251e8d5af 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux_conda.yml @@ -1,4 +1,4 @@ -name: 'linux' +name: 'linux / conda' on: push: branches: @@ -9,8 +9,9 @@ on: jobs: # Linux - conda: + job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: @@ -59,53 +60,3 @@ jobs: - uses: codecov/codecov-action@v1 if: success() name: 'Upload coverage to CodeCov' - - # PIP + non-default stim channel + log level info - pip: - if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - runs-on: ubuntu-latest - defaults: - run: - shell: bash - env: - DISPLAY: ':99.0' - MNE_LOGGING_LEVEL: 'info' - MNE_STIM_CHANNEL: 'STI101' - OPENBLAS_NUM_THREADS: '1' - PYTHONUNBUFFERED: '1' - PYTHON_VERSION: '3.8' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - run: | - sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; - name: 'Setup xvfb' - - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON_VERSION }} - name: 'Setup python' - - shell: bash -el {0} - run: | - ./tools/github_actions_dependencies.sh - source tools/get_minimal_commands.sh - name: 'Install dependencies' - - shell: bash -el {0} - run: ./tools/github_actions_install.sh - name: 'Install MNE' - - shell: bash -el {0} - run: ./tools/github_actions_infos.sh - name: 'Show infos' - - shell: bash -el {0} - run: ./tools/github_actions_download.sh - name: 'Download testing data' - - shell: bash -el {0} - run: ./tools/github_actions_locale.sh - name: 'Print locale' - - shell: bash -el {0} - run: ./tools/github_actions_test.sh - name: 'Run tests' - - uses: codecov/codecov-action@v1 - if: success() - name: 'Upload coverage to CodeCov' diff --git a/.github/workflows/linux_pip.yml b/.github/workflows/linux_pip.yml new file mode 100644 index 00000000000..cc49ba04971 --- /dev/null +++ b/.github/workflows/linux_pip.yml @@ -0,0 +1,60 @@ +name: 'linux / pip' +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + # PIP + non-default stim channel + log level info + job: + if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.PYTHON_VERSION }} + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + DISPLAY: ':99.0' + MNE_LOGGING_LEVEL: 'info' + MNE_STIM_CHANNEL: 'STI101' + OPENBLAS_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: '3.8' + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: | + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libopengl0 + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset; + name: 'Setup xvfb' + - uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + name: 'Setup python' + - shell: bash -el {0} + run: | + ./tools/github_actions_dependencies.sh + source tools/get_minimal_commands.sh + name: 'Install dependencies' + - shell: bash -el {0} + run: ./tools/github_actions_install.sh + name: 'Install MNE' + - shell: bash -el {0} + run: ./tools/github_actions_infos.sh + name: 'Show infos' + - shell: bash -el {0} + run: ./tools/github_actions_download.sh + name: 'Download testing data' + - shell: bash -el {0} + run: ./tools/github_actions_locale.sh + name: 'Print locale' + - shell: bash -el {0} + run: ./tools/github_actions_test.sh + name: 'Run tests' + - uses: codecov/codecov-action@v1 + if: success() + name: 'Upload coverage to CodeCov' diff --git a/.github/workflows/macos.yml b/.github/workflows/macos_conda.yml similarity index 96% rename from .github/workflows/macos.yml rename to .github/workflows/macos_conda.yml index f964a354727..6f1fffb570f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos_conda.yml @@ -1,4 +1,4 @@ -name: 'macos' +name: 'macos / conda' on: push: branches: @@ -8,8 +8,9 @@ on: - '*' jobs: - conda: + job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" + name: ${{ matrix.PYTHON_VERSION }} runs-on: macos-latest defaults: run: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 309c844325e..8c06ca8ac03 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,18 +53,10 @@ stages: python -m pip install numpy scipy matplotlib -r requirements_testing.txt displayName: Install dependencies condition: always() - - bash: | - make flake - displayName: make flake - condition: always() - bash: | make pydocstyle displayName: make pydocstyle condition: always() - - bash: | - make codespell-error - displayName: make codespell-error - condition: always() - bash: | make docstring displayName: make docstring From 3e345f32e1b911a6865392d528cca3eb42128c14 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:46:40 +0100 Subject: [PATCH 90/91] Fix job name --- .github/workflows/compat_minimal.yml | 2 +- .github/workflows/compat_old.yml | 2 +- .github/workflows/linux_conda.yml | 2 +- .github/workflows/linux_pip.yml | 2 +- .github/workflows/macos_conda.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compat_minimal.yml b/.github/workflows/compat_minimal.yml index f49f0050a86..6036ebb8960 100644 --- a/.github/workflows/compat_minimal.yml +++ b/.github/workflows/compat_minimal.yml @@ -11,7 +11,7 @@ jobs: # Minimal (runs with and without testing data) job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.PYTHON_VERSION }} + name: ${{ env.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/compat_old.yml b/.github/workflows/compat_old.yml index a8612b6a6b1..d7154e35278 100644 --- a/.github/workflows/compat_old.yml +++ b/.github/workflows/compat_old.yml @@ -11,7 +11,7 @@ jobs: # Old dependencies job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.PYTHON_VERSION }} + name: ${{ env.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/linux_conda.yml b/.github/workflows/linux_conda.yml index 0b251e8d5af..74cfe162dcd 100644 --- a/.github/workflows/linux_conda.yml +++ b/.github/workflows/linux_conda.yml @@ -11,7 +11,7 @@ jobs: # Linux job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.PYTHON_VERSION }} + name: ${{ env.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/linux_pip.yml b/.github/workflows/linux_pip.yml index cc49ba04971..cbfae045164 100644 --- a/.github/workflows/linux_pip.yml +++ b/.github/workflows/linux_pip.yml @@ -11,7 +11,7 @@ jobs: # PIP + non-default stim channel + log level info job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.PYTHON_VERSION }} + name: ${{ env.PYTHON_VERSION }} runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/macos_conda.yml b/.github/workflows/macos_conda.yml index 6f1fffb570f..9ecb1cbe605 100644 --- a/.github/workflows/macos_conda.yml +++ b/.github/workflows/macos_conda.yml @@ -10,7 +10,7 @@ on: jobs: job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ matrix.PYTHON_VERSION }} + name: ${{ env.PYTHON_VERSION }} runs-on: macos-latest defaults: run: From aa3acddbee1f08467c0e6bbdf124042446554cb1 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Tue, 17 Nov 2020 14:49:40 +0100 Subject: [PATCH 91/91] Fix job name (again) --- .github/workflows/compat_minimal.yml | 2 +- .github/workflows/compat_old.yml | 2 +- .github/workflows/linux_conda.yml | 2 +- .github/workflows/linux_pip.yml | 2 +- .github/workflows/macos_conda.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compat_minimal.yml b/.github/workflows/compat_minimal.yml index 6036ebb8960..8e7eafc5c29 100644 --- a/.github/workflows/compat_minimal.yml +++ b/.github/workflows/compat_minimal.yml @@ -11,7 +11,7 @@ jobs: # Minimal (runs with and without testing data) job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ env.PYTHON_VERSION }} + name: 'py3.7' runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/compat_old.yml b/.github/workflows/compat_old.yml index d7154e35278..04cbf08d00d 100644 --- a/.github/workflows/compat_old.yml +++ b/.github/workflows/compat_old.yml @@ -11,7 +11,7 @@ jobs: # Old dependencies job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ env.PYTHON_VERSION }} + name: 'py3.6' runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/linux_conda.yml b/.github/workflows/linux_conda.yml index 74cfe162dcd..3123aa67d8c 100644 --- a/.github/workflows/linux_conda.yml +++ b/.github/workflows/linux_conda.yml @@ -11,7 +11,7 @@ jobs: # Linux job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ env.PYTHON_VERSION }} + name: 'py3.8' runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/linux_pip.yml b/.github/workflows/linux_pip.yml index cbfae045164..f35345c5a02 100644 --- a/.github/workflows/linux_pip.yml +++ b/.github/workflows/linux_pip.yml @@ -11,7 +11,7 @@ jobs: # PIP + non-default stim channel + log level info job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ env.PYTHON_VERSION }} + name: 'py3.8' runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/macos_conda.yml b/.github/workflows/macos_conda.yml index 9ecb1cbe605..1006d1ee3f6 100644 --- a/.github/workflows/macos_conda.yml +++ b/.github/workflows/macos_conda.yml @@ -10,7 +10,7 @@ on: jobs: job: if: "github.repository == 'mne-tools/mne-python' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" - name: ${{ env.PYTHON_VERSION }} + name: 'py3.8' runs-on: macos-latest defaults: run: