Skip to content
Commits on Source (7)
......@@ -2,21 +2,41 @@
# Tagging a commit with [circle full] will build everything.
version: 2
jobs:
build:
build_docs:
docker:
# 3.6-jessie is too new for conda
- image: circleci/python:3.6-jessie
- image: circleci/python:3.7-stretch
steps:
# Get our data and merge with upstream
- checkout
- run: echo $(git log -1 --pretty=%B) | tee gitlog.txt
- run: echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
- run:
name: Set BASH_ENV
command: |
echo "set -e" >> $BASH_ENV
echo "export SUBJECTS_DIR=~/mne_data/MNE-sample-data/subjects" >> $BASH_ENV
echo "export DISPLAY=:99" >> $BASH_ENV
echo "export OPENBLAS_NUM_THREADS=4" >> $BASH_ENV
export MNE_ROOT=${PWD}/minimal_cmds
echo "export MNE_ROOT=${PWD}/minimal_cmds" >> $BASH_ENV
echo "export PATH=~/.local/bin/:${MNE_ROOT}/bin:$PATH" >> $BASH_ENV
curl https://staff.washington.edu/larsoner/minimal_cmds.tar.gz | tar xz
echo "export LD_LIBRARY_PATH=${MNE_ROOT}/lib:$LD_LIBRARY_PATH" >> $BASH_ENV
echo "export NEUROMAG2FT_ROOT=${PWD}/minimal_cmds/bin" >> $BASH_ENV
echo "BASH_ENV:"
cat $BASH_ENV
- run:
name: check neuromag2ft
command: |
neuromag2ft --version
- run:
name: Merge with upstream
command: |
echo $(git log -1 --pretty=%B) | tee gitlog.txt
echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
if [[ $(cat merge.txt) != "" ]]; then
echo "Merging $(cat merge.txt)";
git remote add upstream git://github.com/mne-tools/mne-python.git
git remote add upstream git://github.com/mne-tools/mne-python.git;
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
git fetch upstream master;
fi
# Load our data
......@@ -33,64 +53,59 @@ jobs:
- data-cache-8
- pip-cache
# Spin up Xvfb
- run: /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;
- run: echo "export DISPLAY=:99" >> $BASH_ENV;
- run: echo "export OPENBLAS_NUM_THREADS=4" >> $BASH_ENV;
# Fix libgcc_s.so.1 pthread_cancel bug:
- run:
name: Spin up Xvfb
command: |
/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;
# https://github.com/ContinuumIO/anaconda-issues/issues/9190#issuecomment-386508136
# https://github.com/golemfactory/golem/issues/1019
- run: sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 qt5-default
# Get latest Anaconda running
- run:
name: Fix libgcc_s.so.1 pthread_cancel bug
command: |
wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
chmod +x ~/miniconda.sh;
~/miniconda.sh -b -p ~/miniconda;
echo "export PATH=~/miniconda/bin:$PATH" >> $BASH_ENV;
sudo apt-get install qt5-default
- run:
name: Get Python running
# pip install --user --upgrade --progress-bar off https://api.github.com/repos/larsoner/numpydoc/zipball/xref-param-type
command: |
conda update --yes --quiet conda;
conda env create --quiet -f environment.yml;
source activate mne;
conda install sphinx;
pip install sphinx_fontawesome sphinx_bootstrap_theme "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
pip uninstall --yes mne;
echo "source activate mne" >> $BASH_ENV;
pip install --user --upgrade --progress-bar off pip numpy vtk
pip install --user --upgrade --progress-bar off -r requirements.txt
pip install --user --upgrade --progress-bar off ipython sphinx_fontawesome sphinx_bootstrap_theme "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler "https://api.github.com/repos/nipy/PySurfer/zipball/master"
- save_cache:
key: pip-cache
paths:
- ~/.cache/pip
# The conda-provided PyQt5 does not work on CircleCI for some reason,
# possibly because the libGL expects a sufficiently modern libgcc
# and conda rolls their own (libgcc-ng package).
- run: conda remove --yes qt pyqt matplotlib sip libxcb icu vtk
- run: pip uninstall --yes mayavi vtk
- run: pip install vtk mayavi PyQt5 PyQt5-sip sip matplotlib
- run: echo "export LD_PRELOAD=~/miniconda/envs/mne/lib/libgobject-2.0.so.0" >> $BASH_ENV
- run: pip install --upgrade "https://api.github.com/repos/nipy/PySurfer/zipball/master"
# Look at what we have and fail early if there is some library conflict
- run: which python
- run: python -c "import mne; mne.sys_info()"
- run: LIBGL_DEBUG=verbose python -c "from mayavi import mlab; import matplotlib.pyplot as plt; mlab.figure(); plt.figure()"
- run: python -c "import mne; mne.set_config('MNE_LOGGING_LEVEL', 'info')"
- run: python -c "import mne; level = mne.get_config('MNE_LOGGING_LEVEL'); assert level.lower() == 'info', repr(level)"
- run:
name: Check installation
command: |
which python
python -c "import mne; mne.sys_info()"
LIBGL_DEBUG=verbose python -c "from mayavi import mlab; import matplotlib.pyplot as plt; mlab.figure(); plt.figure()"
python -c "import mne; mne.set_config('MNE_LOGGING_LEVEL', 'info')"
python -c "import mne; level = mne.get_config('MNE_LOGGING_LEVEL'); assert level.lower() == 'info', repr(level)"
# Figure out if we should run a full, pattern, or noplot version
- run: python setup.py develop
- run: if ! git remote -v | grep upstream ; then git remote add upstream git://github.com/mne-tools/mne-python.git; fi
- run: git fetch upstream
- run: git branch -a
- run: mkdir -p ~/mne_data
- run:
name: Get data
command: |
python setup.py develop --user
if ! git remote -v | grep upstream ; then git remote add upstream git://github.com/mne-tools/mne-python.git; fi
git fetch upstream
git branch -a
mkdir -p ~/mne_data
touch pattern.txt;
if [ "$CIRCLE_BRANCH" == "master" ] || [[ $(cat gitlog.txt) == *"[circle full]"* ]]; then
echo html_dev > build.txt;
elif [ "$CIRCLE_BRANCH" == "maint/0.17" ]; then
python -c "import mne; mne.datasets._download_all_example_data()";
elif [ "$CIRCLE_BRANCH" == "maint/0.18" ]; then
echo html_stable > build.txt;
python -c "import mne; mne.datasets._download_all_example_data()";
else
FNAMES=$(git diff --name-only $CIRCLE_BRANCH $(git merge-base $CIRCLE_BRANCH upstream/master));
FNAMES=$(git diff --name-only $(git merge-base $CIRCLE_BRANCH upstream/master) $CIRCLE_BRANCH);
if [[ $(cat gitlog.txt) == *"[circle front]"* ]]; then
FNAMES="tutorials/plot_mne_dspm_source_localization.py tutorials/plot_receptive_field.py examples/connectivity/plot_mne_inverse_label_connectivity.py tutorials/plot_sensors_decoding.py tutorials/plot_stats_cluster_spatio_temporal.py tutorials/plot_visualize_evoked.py "${FNAMES};
python -c "import mne; print(mne.datasets.testing.data_path(update_path=True))";
......@@ -103,6 +118,9 @@ jobs:
if [[ $(cat $FNAME | grep -x ".*datasets.*sample.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.sample.data_path(update_path=True))";
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*fetch_fsaverage.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.fetch_fsaverage(verbose=True))";
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*spm_face.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.spm_face.data_path(update_path=True))";
fi;
......@@ -112,12 +130,18 @@ jobs:
if [[ $(cat $FNAME | grep -x ".*datasets.*eegbci.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.eegbci.load_data(1, [6, 10, 14], update_path=True))";
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*sleep_physionet.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.sleep_physionet.age.fetch_data([0, 1], recording=[1], update_path=True))";
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*hf_sef.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.hf_sef.data_path(update_path=True))";
fi;
if [[ $(cat $FNAME | grep -x ".*brainstorm.*bst_auditory.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.brainstorm.bst_auditory.data_path(update_path=True))" --accept-brainstorm-license;
fi;
if [[ $(cat $FNAME | grep -x ".*brainstorm.*bst_resting.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.brainstorm.bst_resting.data_path(update_path=True))" --accept-brainstorm-license;
fi;
if [[ $(cat $FNAME | grep -x ".*brainstorm.*bst_raw.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.brainstorm.bst_raw.data_path(update_path=True))" --accept-brainstorm-license;
fi;
......@@ -133,7 +157,7 @@ jobs:
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*hcp_mmp_parcellation.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.sample.data_path(update_path=True))";
SUBJECTS_DIR=~/mne_data/MNE-sample-data/subjects python -c "import mne; print(mne.datasets.fetch_hcp_mmp_parcellation())" --accept-hcpmmp-license;
python -c "import mne; print(mne.datasets.fetch_hcp_mmp_parcellation())" --accept-hcpmmp-license;
fi;
if [[ $(cat $FNAME | grep -x ".*datasets.*misc.*" | wc -l) -gt 0 ]]; then
python -c "import mne; print(mne.datasets.misc.data_path(update_path=True))";
......@@ -170,38 +194,58 @@ jobs:
fi;
fi;
echo "$PATTERN" > pattern.txt;
- run: echo "PATTERN=$(cat pattern.txt)"
- run: echo "BUILD=$(cat build.txt)"
- run: ls -al ~/mne_data;
- run:
name: Verify build type
command: |
if [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then
SUBJECTS_DIR=~/mne_data/MNE-sample-data/subjects python -c "import mne; mne.datasets._download_all_example_data()";
fi;
- run: if [ ! -d ~/mne-tools.github.io ]; then git clone https://github.com/mne-tools/mne-tools.github.io.git ~/mne-tools.github.io --depth=1; fi;
echo "PATTERN=$(cat pattern.txt)"
echo "BUILD=$(cat build.txt)"
ls -al ~/mne_data;
# Run doctest (if it's full or front) before building the docs
- run:
name: make test-doc
command: |
if [[ $(cat gitlog.txt) == *"[circle front]"* ]] || [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then
make test-doc;
mkdir -p doc/_build/test-results/test-doc;
cp junit-results.xml doc/_build/test-results/test-doc/junit.xml;
fi;
# Build docs
- run:
name: make html
command: |
cd doc;
PATTERN=$(cat ../pattern.txt) make $(cat ../build.txt);
- run: python -c "import mne; level = mne.get_config('MNE_LOGGING_LEVEL'); assert level.lower() == 'info', repr(level)"
- run:
name: Sanity check system state
command: |
python -c "import mne; level = mne.get_config('MNE_LOGGING_LEVEL'); assert level.lower() == 'info', repr(level)"
# Save the JUnit file
- store_test_results:
path: doc/_build/test-results
- store_artifacts:
path: doc/_build/test-results
destination: test-results
# Save the outputs
- store_artifacts:
path: doc/_build/html/
destination: html
destination: dev
- store_artifacts:
path: doc/_build/html_stable/
destination: stable
- persist_to_workspace:
root: doc/_build
paths:
- html
- html_stable
# Keep these separate, maybe better in terms of size limitations (?)
- save_cache:
key: data-cache-0
paths:
- ~/.mne
- ~/mne-tools.github.io
- ~/mne_data/mTRF_1.5
- save_cache:
key: data-cache-1
......@@ -243,23 +287,114 @@ jobs:
paths:
- ~/mne_data/MNE-visual_92_categories-data
- deploy:
name: Triage deployment
linkcheck:
# there are a few files excluded from this for expediency, see Makefile
docker:
- image: circleci/python:3.6-jessie
steps:
- checkout
- run:
name: pip install dependencies
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "Deploying dev docs.";
git config --global user.email "circle@mne.com";
git config --global user.name "Circle Ci";
pushd ~/mne-tools.github.io && git checkout master && git pull origin master && popd;
pushd doc/_build && rm -Rf ~/mne-tools.github.io/dev && cp -a html ~/mne-tools.github.io/dev && popd;
pushd ~/mne-tools.github.io && git add -A && git commit -m "CircleCI update of dev docs (${CIRCLE_BUILD_NUM})." && git push origin master && popd;
elif [ "${CIRCLE_BRANCH}" == "maint/0.17" ]; then
echo "Deploying stable docs.";
set -e;
pip install --user --progress-bar off numpy scipy matplotlib pillow
pip install --user --progress-bar off sphinx numpydoc sphinx_fontawesome sphinx_bootstrap_theme "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
pip install --user -e .
- run:
name: make linkcheck
command: |
set -e
cd doc
PATH=~/.local/bin:$PATH make linkcheck
- run:
name: make linkcheck-grep
when: always
command: |
cd doc
make linkcheck-grep
- store_artifacts:
path: doc/_build/linkcheck
destination: linkcheck
deploy:
docker:
- image: circleci/python:3.6-jessie
steps:
- attach_workspace:
at: /tmp/build
- restore_cache:
keys:
- website-cache
- run:
name: Fetch docs
command: |
set -e
mkdir -p ~/.ssh
echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
chmod og= ~/.ssh/config
if [ ! -d ~/mne-tools.github.io ]; then
git clone git@github.com:/mne-tools/mne-tools.github.io.git ~/mne-tools.github.io --depth=1
fi
- run:
name: Deploy docs
command: |
set -e;
if [ "${CIRCLE_BRANCH}" == "master" ] || [ "${CIRCLE_BRANCH}" == "maint/0.18" ]; then
git config --global user.email "circle@mne.com";
git config --global user.name "Circle Ci";
pushd ~/mne-tools.github.io && git checkout master && git pull origin master && popd;
pushd doc/_build && rm -Rf ~/mne-tools.github.io/stable cp -a html_stable ~/mne-tools.github.io/stable && popd;
pushd ~/mne-tools.github.io && git add -A && git commit -m "CircleCI update of stable docs (${CIRCLE_BUILD_NUM})." && git push origin master && popd;
git config --global user.name "Circle CI";
cd ~/mne-tools.github.io;
git checkout master
git remote -v
git fetch origin
git reset --hard origin/master
git clean -xdf
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
rm -Rf dev;
cp -a /tmp/build/html dev;
git add -A;
git commit -m "CircleCI update of dev docs (${CIRCLE_BUILD_NUM}).";
else
echo "Deploying stable docs for ${CIRCLE_BRANCH}.";
rm -Rf stable;
cp -a /tmp/build/html_stable stable;
git add -A;
git commit -m "CircleCI update of stable docs (${CIRCLE_BUILD_NUM}).";
fi;
git push origin master;
else
echo "No deployment (build: ${CIRCLE_BRANCH}).";
fi
- save_cache:
key: website-cache
paths:
- ~/mne_data/MNE-visual_92_categories-data
workflows:
version: 2
default:
jobs:
- build_docs
- deploy:
requires:
- build_docs
filters:
branches:
only:
- master
- maint/0.18
weekly:
jobs:
- linkcheck
triggers:
- schedule:
# "At 00:00 on Sunday" should be often enough
cron: "0 0 * * 0"
filters:
branches:
only:
- master
junit-results.xml
*.pyc
*.pyo
*.sh
......@@ -37,11 +38,13 @@ MNE-somato-data*
MNE-spm-face*
MNE-testing-data*
MNE-brainstorm-data*
physionet-sleep-data*
MEGSIM*
build
coverage
.cache/
.pytest_cache/
prof/
dist/
doc/_build/
......@@ -73,3 +76,5 @@ examples/visualization/foobar.html
*.py#
*.rst#
.venv/
venv/
extraction:
python:
index:
filters:
- exclude: "mne/externals/*.py"
- exclude: "mne/externals/*/*.py"
javascript:
index:
filters:
- exclude: "**/*.js"
queries:
- exclude: py/missing-equals
- exclude: py/import-and-import-from
......@@ -101,6 +101,7 @@ Lukáš Hejtmánek <hejtmy@gmail.com> hejtmy <hejtmy@gmail.com>
Ramonapariciog Apariciogarcia <moncho_apa@hotmail.com> ramonapariciog <moncho_apa@hotmail.com>
Mathurin Massias <mathurin.massias@gmail.com> mathurinm <mathurinm@users.noreply.github.com>
Simon Kern <simon.kern@online.de> skjerns <simon.kern@online.de>
Simon Kern <14980558+skjerns@users.noreply.github.com> skjerns
S. M. Gutstein <s.m.gutstein@gmail.com> smgutstein <s.m.gutstein@gmail.com>
Robin Tibor Schirrmeister <robintibor@gmail.com> robintibor <robintibor@gmail.com>
Anne-Sophie Dubarry <as_dub@hotmail.com> annesodub <as_dub@hotmail.com>
......@@ -110,11 +111,19 @@ Mathurin Massias <mathurin.massias@gmail.com> mathurinm <mathurin.massias@gmail.
Pierre Ablin <pierreablin@gmail.com> pierreablin <pierreablin@gmail.com>
Erik Hornberger <erik.hornberger@shi-g.com> er06645810 <erik.hornberger@shi-g.com>
Kostiantyn Maksymenko <makkostya@ukr.net> Maksymenko Kostiantyn <makkostya@ukr.net>
Nathalie Gayraud <nathalie.gayraud@inria.fr> Nathalie <nathalie.gayraud@inria.fr>
Kostiantyn Maksymenko <makkostya@ukr.net> kostiantyn maksymenko <kostiantyn.maksymenko@inria.fr>
Nathalie Gayraud <nathalie.gayraud@inria.fr> Nathalie <nat.gayraud@gmail.com>
Dominik Krzemiński <raymon92@gmail.com> dokato <raymon92@gmail.com>
Ezequiel Mikulan <39155887+ezemikulan@users.noreply.github.com> ezemikulan <39155887+ezemikulan@users.noreply.github.com>
Hubert Banville <hubert.jbanville@gmail.com> hubertjb <hubert.jbanville@gmail.com>
Sara Sommariva <sommariva@dima.unige.it> sarasommariva <sommariva@dima.unige.it>
Manu Sutela <manu.sutela@gmail.com> MJAS1 <manu.sutela@gmail.com>
Joan Massich <mailsik@gmail.com> Joan Massich <sik@visor.udg.edu>
Joan Massich <mailsik@gmail.com> massich <sik@visor.udg.edu>
David Sabbagh <dav.sabbagh@gmail.com> DavidSabbagh <33925146+DavidSabbagh@users.noreply.github.com>
Nikolas Chalas <nikos.ch01@gmail.com> Nichalas <nikos.ch01@gmail.com>
Katarina Slama <slama@berkeley.edu> katarinaslama <slama@berkeley.edu>
Evgenii Kalenkovich <e.kalenkovich@gmail.com> kalenkovich <e.kalenkovich@gmail.com>
Thomas Donoghue <tdonoghue.research@gmail.com> Tom <tdonoghue.research@gmail.com>
Steve Matindi <stevematindi@gmail.com> stevemats <stevematindi@gmail.com>
Legrand Nicolas <legrand@cyceron.fr> LegrandNico <legrand@cyceron.fr>
Johannes Kasper <jeythekey@tutanota.com> jeythekey <44215387+jeythekey@users.noreply.github.com>
language: c
dist: trusty
dist: xenial
sudo: false
cache:
apt: true
......@@ -9,7 +9,7 @@ env:
# OPENBLAS_NUM_THREADS=1 avoid slowdowns:
# https://github.com/xianyi/OpenBLAS/issues/731
global: PYTHON_VERSION=3.6 DISPLAY=:99.0 MNE_LOGGING_LEVEL=warning TEST_LOCATION=src
PIP_DEPENDENCIES="codecov pytest-faulthandler" OPTION=""
PIP_DEPENDENCIES="codecov nitime"
TRAVIS_PYTHON_VERSION=3.6 CONDA_VERSION=">=4.3.27"
OPENBLAS_NUM_THREADS=1
......@@ -18,9 +18,8 @@ matrix:
# No data + style testing
- os: linux
env: DEPS=nodata MNE_DONTWRITE_HOME=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TEST=1
CONDA_DEPENDENCIES="numpy scipy matplotlib sphinx pytest pytest-cov"
PIP_DEPENDENCIES="flake8 numpydoc codespell git+git://github.com/PyCQA/pydocstyle.git codecov check-manifest"
OPTION="--doctest-ignore-import-errors"
CONDA_DEPENDENCIES="numpy scipy matplotlib sphinx pytest pytest-timeout pytest-cov pytest-mock"
PIP_DEPENDENCIES="flake8 numpydoc codespell pydocstyle codecov check-manifest pytest-sugar pytest-faulthandler"
# Linux
- os: linux
......@@ -33,18 +32,23 @@ matrix:
# PIP + non-default stim channel
- os: linux
env: MNE_STIM_CHANNEL=STI101
PYTHON_VERSION=3.7
language: python
python: "3.6"
# 2.7 Old dependencies
python: "3.7"
addons:
apt:
packages:
- qt5-default # Qt 5.12 release needs this to avoid a missing library bug
# Old dependencies
- os: linux
env: PYTHON_VERSION=2.7
CONDA_DEPENDENCIES="numpy=1.8 scipy=0.12 matplotlib=1.3 pandas=0.13 scikit-learn=0.15 pytest pytest-cov"
env: PYTHON_VERSION=3.5
CONDA_DEPENDENCIES="numpy=1.11 scipy=0.17 matplotlib=1.5 pandas=0.18 scikit-learn=0.18 pytest pytest-cov pytest-mock pytest-timeout"
# Minimal
- os: linux
env: DEPS=minimial
CONDA_DEPENDENCIES="numpy scipy matplotlib pytest pytest-cov"
CONDA_DEPENDENCIES="numpy scipy matplotlib pytest pytest-cov pytest-mock pytest-timeout"
PIP_DEPENDENCIES="pytest-faulthandler pytest-sugar"
# Setup anaconda
before_install:
......@@ -53,8 +57,9 @@ before_install:
fi;
- if [ -z "$CONDA_ENVIRONMENT" ] && [ -z "$CONDA_DEPENDENCIES" ]; then
pip uninstall -y numpy;
pip install numpy scipy vtk;
pip install -r requirements.txt;
pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" --pre numpy scipy;
pip install vtk;
pip install --upgrade -r requirements.txt;
else
git clone https://github.com/astropy/ci-helpers.git;
source ci-helpers/travis/setup_conda.sh;
......@@ -62,7 +67,9 @@ before_install:
pip uninstall --yes mne;
fi;
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
pip install --upgrade pyqt5>=5.10;
pip install --upgrade pyqt5>=5.10 pylsl;
else
conda install -c tstenner pylsl;
fi;
fi
# Don't source mne_setup_sh here because changing PATH etc. can't be done in a script
......@@ -165,8 +172,14 @@ script:
fi;
done;
fi;
- echo py.test -m "${CONDITION}" ${OPTION} ${USE_DIRS} --cov=mne;
- py.test -m "${CONDITION}" ${OPTION} ${USE_DIRS} --cov=mne;
# Test run_tests_if_main
- if [ "${DEPS}" == "nodata" ]; then
pip uninstall -yq mne;
pip install -e .;
python mne/tests/test_evoked.py;
fi;
- echo pytest -m "${CONDITION}" ${USE_DIRS} --cov=mne;
- pytest -m "${CONDITION}" ${USE_DIRS} --cov=mne;
- if [ "${DEPS}" == "nodata" ]; then
make pep;
fi;
......
.. -*- mode: rst -*-
Authors
=======
* Alexandre Gramfort 2011-2013
* Matti Hamalainen 2011-2013
* Emily Ruzich 2011
* Martin Luessi 2011-2013
* Christian Brodbeck 2012-2013
* Louis Thibault 2012
* Eric Larson 2012-2013
* Denis A. Engemann 2012-2013
* Daniel Strohmeier 2012
* Brad Buran 2013
* Simon Kornblith 2013
* Mainak Jas 2013
* Roman Goj 2013
* Teon Brooks 2013
Contributing to MNE-Python
==========================
MNE-Python is maintained by a community of scientists and research labs, and
accepts contributions in the form of bug reports, fixes, feature additions, and
documentation improvements (even just typo corrections). The best way to start
contributing is by `opening an issue`_ on our GitHub page to tell us about
errors you are encountering or to discuss your ideas for changes. For general
troubleshooting, you can also write to the `MNE mailing list`_ or chat with
developers on the `MNE gitter channel`_.
Changes are typically made by `forking`_ the MNE-Python repository, making
changes to your fork (usually by `cloning`_ it to your personal computer,
making the changes, and then `pushing`_ the local changes up to your fork), and
finally creating a `pull request`_ to incorporate your changes back into the
shared "upstream" version of the codebase. The `contributing guide`_ has more
details on how best to configure your workflow for a smooth experience
contributing to MNE-Python.
Users and contributors to MNE-Python are expected to follow our `code of
conduct`_.
.. _`opening an issue`: https://github.com/mne-tools/mne-python/issues/new/choose
.. _`MNE mailing list`: http://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
.. _`MNE gitter channel`: https://gitter.im/mne-tools/mne-python
.. _`forking`: https://help.github.com/en/articles/fork-a-repo
.. _`cloning`: https://help.github.com/en/articles/cloning-a-repository
.. _`pushing`: https://help.github.com/en/articles/pushing-to-a-remote
.. _`pull request`: https://help.github.com/en/articles/creating-a-pull-request-from-a-fork
.. _`code of conduct`: https://github.com/mne-tools/mne-python/blob/master/CODE_OF_CONDUCT.md
.. _`contributing guide`: https://mne-tools.github.io/dev/contributing.html
Copyright © 2011-2016, authors of MNE-Python
Copyright © 2011-2019, authors of MNE-Python
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -13,6 +13,8 @@ recursive-include mne/data *
recursive-include mne/data/helmets *
recursive-include mne/data/image *
recursive-include mne/data/fsaverage *
include mne/datasets/_fsaverage/root.txt
include mne/datasets/_fsaverage/bem.txt
recursive-include mne/channels/data/layouts *
recursive-include mne/channels/data/montages *
......@@ -25,6 +27,9 @@ recursive-include mne/html *.css
recursive-include mne/io/artemis123/resources *
recursive-include mne mne/datasets *.csv
include mne/io/edf/gdf_encodes.txt
include mne/datasets/sleep_physionet/SHA1SUMS
### Exclude
......
......@@ -5,7 +5,7 @@
PYTHON ?= python
PYTESTS ?= py.test
CTAGS ?= ctags
CODESPELL_SKIPS ?= "*.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"
CODESPELL_SKIPS ?= "*.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"
CODESPELL_DIRS ?= mne/ doc/ tutorials/ examples/
all: clean inplace test test-doc
......
.. -*- mode: rst -*-
|Travis|_ |Appveyor|_ |Circle|_ |Codecov|_ |Zenodo|_
|Travis|_ |Azure|_ |Circle|_ |Codecov|_ |Zenodo|_
|MNE|_
.. |Travis| image:: https://api.travis-ci.org/mne-tools/mne-python.png?branch=master
.. _Travis: https://travis-ci.org/mne-tools/mne-python/branches
.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/jg8ncqql9wayo8mg/branch/master?svg=true
.. _Appveyor: https://ci.appveyor.com/project/mne-tools/mne-python/branch/master
.. |Azure| image:: https://dev.azure.com/mne-tools/mne-python/_apis/build/status/mne-tools.mne-python?branchName=master
.. _Azure: https://dev.azure.com/mne-tools/mne-python/_build/latest?definitionId=1&branchName=master
.. |Circle| image:: https://circleci.com/gh/mne-tools/mne-python.svg?style=svg
.. _Circle: https://circleci.com/gh/mne-tools/mne-python
......@@ -78,21 +78,23 @@ Dependencies
The minimum required dependencies to run MNE-Python are:
- Python >= 2.7
- NumPy >= 1.8
- SciPy >= 0.12
- Python >= 3.5
- NumPy >= 1.11.3
- SciPy >= 0.17.1
For full functionality, some functions require:
- Matplotlib >= 1.3
- Matplotlib >= 1.5
- Mayavi >= 4.6
- PySurfer >= 0.8
- Scikit-learn >= 0.15 (>= 0.18 recommended)
- Scikit-learn >= 0.18
- NiBabel >= 2.1.0
- Pandas >= 0.13
- Pandas >= 0.18
- Picard >= 0.3
- CuPy >= 4.0 (for NVIDIA CUDA acceleration)
- DIPY >= 0.10.1
- PyLSL >= 1.12
- PyVista >= 0.20.1
Contributing to MNE-Python
^^^^^^^^^^^^^^^^^^^^^^^^^^
......@@ -116,7 +118,7 @@ MNE-Python is **BSD-licenced** (3 clause):
This software is OSI Certified Open Source Software.
OSI Certified is a certification mark of the Open Source Initiative.
Copyright (c) 2011-2017, authors of MNE-Python.
Copyright (c) 2011-2019, authors of MNE-Python.
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -151,4 +153,3 @@ MNE-Python is **BSD-licenced** (3 clause):
.. _MNE documentation: http://martinos.org/mne/documentation.html
.. _getting started page: https://martinos.org/mne/getting_started.html
.. _pip: https://pip.pypa.io/en/stable/
environment:
global:
PYTHON: "C:\\conda"
CONDA_ENVIRONMENT: "environment.yml"
PIP_DEPENDENCIES: "codecov pytest-faulthandler"
matrix:
- PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
install:
- "git clone git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
- "pip uninstall -yq mne"
- "python setup.py develop"
- "python -c \"import mne; print(mne.sys_info())\""
- "SET MNE_FORCE_SERIAL=true" # otherwise joblib will bomb
- "SET MNE_LOGGING_LEVEL=warning"
- "python -c \"import mne; mne.datasets.testing.data_path()\""
build: false # Not a C# project, build stuff at the test step instead.
test_script:
# Run the project tests, but (sadly) exclude ones that take a long time
- "py.test -m \"not ultraslowtest\" mne --cov=mne"
on_success:
- "codecov"
trigger:
# start a new build for every push
batch: False
branches:
include:
- master
- maint/*
jobs:
- job: Windows
pool:
vmIMage: 'VS2017-Win2016'
variables:
MNE_LOGGING_LEVEL: 'warning'
MNE_FORCE_SERIAL: 'true'
PIP_DEPENDENCIES: 'codecov'
OPENBLAS_NUM_THREADS: 1
AZURE_CI_WINDOWS: 'true'
strategy:
maxParallel: 4
matrix:
# Eventually we should test x86 (32-bit), but it was a nightmare
# to get it to download 32-bit Anaconda properly, and VTK does not ship
# 32-bit Windows binaries via pip.
Python36-64bit-full-conda:
PYTHON_VERSION: '3.6'
PLATFORM: 'x86-64'
TEST_MODE: 'conda'
CONDA_ENVIRONMENT: 'environment.yml'
PIP_NO_UPGRADE: 'True'
Python37-64bit-full-pip:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
TEST_MODE: 'pip'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: $(PYTHON_ARCH)
addToPath: true
condition: eq(variables['TEST_MODE'], 'pip')
- powershell: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
displayName: Install OpenGL
- powershell: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
pip install --upgrade numpy scipy vtk
pip install --upgrade -r requirements.txt
pip install $env:PIP_DEPENDENCIES
pip install pylsl
condition: eq(variables['TEST_MODE'], 'pip')
displayName: 'Install dependencies with pip'
- powershell: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
$env:PYTHON = '$(System.DefaultWorkingDirectory)' + '\conda'
git clone git://github.com/astropy/ci-helpers.git
cd ci-helpers
git checkout nopip
cd ..
powershell ci-helpers/appveyor/install-miniconda.ps1
$env:PATH = $env:PYTHON + "\envs\test;" + $env:PYTHON + "\envs\test\Scripts;" + $env:PYTHON + ";" + $env:PYTHON + "\Scripts;" + $env:PATH
pip uninstall -yq mne
pip install pylsl
Write-Host ("##vso[task.setvariable variable=PATH]" + $env:PATH)
condition: eq(variables['TEST_MODE'], 'conda')
displayName: 'Install dependencies with conda'
- script: python setup.py develop
displayName: 'Install MNE-Python dev'
- script: python -c "import mne; print(mne.sys_info())"
displayName: 'Print config'
- script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
displayName: 'Get test data'
- script: pytest -m "not ultraslowtest" mne --cov=mne
displayName: 'Run tests'
- script: codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN%
displayName: 'Codecov'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
condition: always()
- task: PublishTestResults@2
inputs:
testResultsFiles: 'junit-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
condition: always()
python-mne (0.18.1+dfsg-0.1) unstable; urgency=medium
* Non-maintainer upload (with team approval).
* New upstream release.
* Switch to Python 3.
* Ran wrap-and-sort -bast.
* Rebased deb_paths and up_check_numpy patches.
-- Thomas Goirand <zigo@debian.org> Sun, 01 Sep 2019 14:38:58 +0200
python-mne (0.17+dfsg-1) unstable; urgency=medium
* Team upload.
......
Source: python-mne
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Yaroslav Halchenko <debian@onerussian.com>,
Michael Hanke <michael.hanke@gmail.com>
Uploaders:
Yaroslav Halchenko <debian@onerussian.com>,
Michael Hanke <michael.hanke@gmail.com>,
Section: python
Testsuite: autopkgtest-pkg-python
Priority: optional
Build-Depends: debhelper (>= 12~),
Build-Depends:
debhelper (>= 12~),
dh-python,
python-all,
python-nibabel,
python-numpy,
python-scipy,
python3-sphinx,
python-nose,
python-pytest,
python-pytest-cov,
python-setuptools,
python-matplotlib,
python-joblib,
python-sklearn,
mayavi2 (>= 4.4.3~) | python-vtk6 | python-vtk,
python-tk,
xvfb,
xauth,
libgl1-mesa-dri,
python-coverage,
libjs-jquery,
libjs-jquery-ui,
yui-compressor
mayavi2 (>= 4.4.3~) | python-vtk6 | python-vtk,
python3-all,
python3-coverage,
python3-joblib,
python3-matplotlib,
python3-nibabel,
python3-nose,
python3-numpy,
python3-pytest,
python3-pytest-cov,
python3-scipy,
python3-setuptools,
python3-sklearn,
python3-tk,
python3-sphinx,
xauth,
xvfb,
yui-compressor,
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/python-mne
Vcs-Git: https://salsa.debian.org/med-team/python-mne.git
Homepage: http://martinos.org/mne
Package: python-mne
Package: python3-mne
Architecture: all
Depends: ${misc:Depends},
${python:Depends},
python-numpy,
python-scipy,
python-sklearn,
python-matplotlib,
python-joblib,
xvfb,
xauth,
libgl1-mesa-dri,
Depends:
help2man,
libgl1-mesa-dri,
libjs-bootstrap,
libjs-d3,
libjs-jquery,
libjs-jquery-ui,
libjs-d3
Recommends: python-nose,
python-pytest,
python-nibabel,
mayavi2
Suggests: python-dap,
python-pycuda,
ipython
Provides: ${python:Provides}
python3-joblib,
python3-matplotlib,
python3-numpy,
python3-scipy,
python3-sklearn,
xauth,
xvfb,
${misc:Depends},
${python3:Depends},
Recommends:
mayavi2,
python3-nibabel,
python3-nose,
python3-pytest,
Suggests:
ipython,
python3-dap,
python3-pycuda,
Provides:
${python3:Provides},
Description: Python modules for MEG and EEG data analysis
This package is designed for sensor- and source-space analysis of MEG
and EEG data, including frequency-domain and time-frequency analyses
......
# FIXME: mpld3.v0.2.min.js - needs packaging of https://github.com/mpld3/mpld3
/usr/share/javascript/bootstrap/css/bootstrap.min.css /usr/lib/python2.7/dist-packages/mne/html/bootstrap.min.css
/usr/share/javascript/d3/d3.min.js /usr/lib/python2.7/dist-packages/mne/html/d3.v3.min.js
/usr/share/javascript/jquery/jquery.min.js /usr/lib/python2.7/dist-packages/mne/html/jquery-1.10.2.min.js
/usr/share/javascript/jquery-ui/jquery-ui.min.js /usr/lib/python2.7/dist-packages/mne/html/jquery-ui.min.js
/usr/share/javascript/jquery-ui/themes/base/jquery-ui.min.css /usr/lib/python2.7/dist-packages/mne/html/jquery-ui.min.css
# FIXME: mpld3.v0.2.min.js - needs packaging of https://github.com/mpld3/mpld3
/usr/share/javascript/jquery/jquery.min.js /usr/lib/python2.7/dist-packages/mne/html/jquery-1.10.2.min.js
......@@ -3,10 +3,11 @@ Author: Jaakko Leppakangas <jaeilepp@student.jyu.fi>
Origin: upstream
Forwarded: not-needed
Reviewed-By: Yaroslav O. Halchenko <debian@onerussian.com>
Last-Update: 2019-09-01
--- a/mne/report.py
+++ b/mne/report.py
@@ -1359,21 +1359,27 @@ class Report(object):
@@ -1359,16 +1359,21 @@
@verbose
def _init_render(self, verbose=None):
"""Initialize the renderer."""
......@@ -19,23 +20,16 @@ Reviewed-By: Yaroslav O. Halchenko <debian@onerussian.com>
include = list()
for inc_fname in inc_fnames:
logger.info('Embedding : %s' % inc_fname)
- f = open(op.join(op.dirname(__file__), 'html', inc_fname),
- 'r')
- fname = op.join(op.dirname(__file__), 'html', inc_fname)
- with open(fname, 'rb') as fid:
- file_content = fid.read().decode('utf-8')
+ if not os.path.isabs(inc_fname):
+ inc_fname = op.join(op.dirname(__file__), 'html', inc_fname)
+ f = open(inc_fname, 'r')
+ if PY3:
+ f_contents = f.read()
+ file_content = f.read()
+ else:
+ f_contents = f.read().decode('UTF-8')
+ file_content = f.read().decode('UTF-8')
if inc_fname.endswith('.js'):
include.append(u'<script type="text/javascript">' +
- f.read() + u'</script>')
+ f_contents + u'</script>')
elif inc_fname.endswith('.css'):
include.append(u'<style type="text/css">' +
- f.read() + u'</style>')
+ f_contents + u'</style>')
f.close()
self.include = ''.join(include)
file_content + u'</script>')
......@@ -2,19 +2,20 @@ Author: Yaroslav Halchenko
Last-Update: 2017-12-04 22:58:05 -0500
Description: Check for numpy version
FIXME: Is this patch needed any more in version 0.17?
Last-Update: 2019-09-01
--- a/mne/decoding/tests/test_receptive_field.py
+++ b/mne/decoding/tests/test_receptive_field.py
@@ -10,7 +10,7 @@ from numpy.testing import assert_array_e
@@ -10,7 +10,7 @@
from mne import io, pick_types
from mne.fixes import einsum
-from mne.utils import requires_version, run_tests_if_main
+from mne.utils import requires_version, run_tests_if_main, check_version
-from mne.utils import requires_version, requires_sklearn, run_tests_if_main
+from mne.utils import requires_version, requires_sklearn, run_tests_if_main, check_version
from mne.decoding import ReceptiveField, TimeDelayingRidge
from mne.decoding.receptive_field import (_delay_time_series, _SCORERS,
_times_to_delays, _delays_to_slice)
@@ -495,6 +495,9 @@ def test_inverse_coef():
@@ -521,6 +521,9 @@
rf = ReceptiveField(tmin, tmax, 1., estimator=estimator,
patterns=True)
rf.fit(X, y)
......
......@@ -12,7 +12,7 @@ export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
%:
dh $@ --with python2 --buildsystem pybuild
dh $@ --with python3 --buildsystem pybuild
override_dh_clean:
rm -rf *.egg-info
......
......@@ -2,7 +2,7 @@
#
# You can set these variables from the command line.
SPHINXOPTS = -n -W -T --keep-going
SPHINXOPTS = -nWT --keep-going
SPHINXBUILD = sphinx-build
PAPER =
......@@ -33,7 +33,7 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf _build/* auto_examples auto_tutorials generated *.stc *.fif *.nii.gz
-rm -rf _build auto_examples auto_tutorials generated *.stc *.fif *.nii.gz
html_stable:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html_stable
......@@ -106,10 +106,10 @@ changes:
@echo "The overview file is in _build/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in _build/linkcheck/output.txt."
@$(SPHINXBUILD) -b linkcheck -D nitpicky=0 -D plot_gallery=0 -D exclude_patterns="cited.rst,whats_new.rst,configure_git.rst" -d _build/doctrees . _build/linkcheck
linkcheck-grep:
@! grep -h "^.*:.*: \[\(\(local\)\|\(broken\)\)\]" _build/linkcheck/output.txt
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
......