Skip to content
Commits on Source (2)
This diff is collapsed.
......@@ -7,3 +7,9 @@ omit =
*/bin/*
*/setup.py
*/mne/fixes*
*/mne/utils/linalg.py
[report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
......@@ -10,4 +10,4 @@ This project and everyone participating in it is governed by the [MNE-Python's C
## How to contribute
Before contributing make sure you are familiar with [our contributing guide](https://martinos.org/mne/contributing.html).
Before contributing make sure you are familiar with [our contributing guide](https://mne.tools/dev/install/contributing.html).
......@@ -4,7 +4,7 @@ about: Create a report to help us improve.
---
Detailed instructions on how to file a bug can be found in our [FAQ](https://martinos.org/mne/stable/faq.html#i-think-i-found-a-bug-what-do-i-do).
Detailed instructions on how to file a bug can be found in our [FAQ](https://mne.tools/dev/overview/faq.html#i-think-i-found-a-bug-what-do-i-do).
If your issue is a usage question, please consider asking on our [Gitter channel](https://gitter.im/mne-tools/mne-python) or on our [mailing list](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis) instead of opening an issue.
......
---
name: Missing glossary entry
about: Suggest a term to be added to our glossary
---
#### Suggested term
(insert here)
#### Suggested definition
(insert here)
Thanks for contributing a pull request! Please make sure you have read the
[contribution guidelines](https://martinos.org/mne/stable/contributing.html)
[contribution guidelines](https://mne.tools/dev/install/contributing.html)
before submitting.
Please be aware that we are a loose team of volunteers so patience is
......
junit-results.xml
*.pyc
*.pyo
*.sh
......@@ -37,11 +38,14 @@ MNE-somato-data*
MNE-spm-face*
MNE-testing-data*
MNE-brainstorm-data*
physionet-sleep-data*
MEGSIM*
build
coverage
.cache/
.pytest_cache/
__pycache__/
prof/
dist/
doc/_build/
......@@ -51,12 +55,12 @@ doc/auto_tutorials/
doc/modules/generated/
doc/sphinxext/cachedir
pip-log.txt
.coverage
.coverage*
tags
doc/coverages
doc/samples
cover
examples/visualization/foobar.html
*.html
*.orig
......@@ -73,3 +77,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
......@@ -25,7 +25,6 @@ Denis A. Engemann <denis.engemann@gmail.com> Denis Engemann <dengemann@pool-186-
Denis A. Engemann <denis.engemann@gmail.com> Denis A. Engemann <denisaengemann@Denis-A-Engemanns-MacBook-Air.local>
Daniel Strohmeier <daniel.strohmeier@googlemail.com> joewalter <daniel.strohmeier@googlemail.com>
Daniel Strohmeier <daniel.strohmeier@googlemail.com> Daniel Strohmeier <daniel.strohmeier@googlemail.com>
Dan G. Wakeman <dgwakeman@gmail.com>
Dan G. Wakeman <dgwakeman@gmail.com> dgwakeman <dgwakeman@users.noreply.github.com>
Teon Brooks <teon.brooks@gmail.com>
Teon Brooks <teon.brooks@gmail.com> Teon <teon@nyu.edu>
......@@ -101,6 +100,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 +110,22 @@ 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>
Thomas Radman <radman.thomas@gmail.com>
Joshua J Bear <joshbear@users.noreply.github.com>
Paul Roujansky <paul@roujansky.eu>
language: c
dist: trusty
sudo: false
dist: xenial
cache:
apt: true
pip: true
......@@ -8,9 +7,8 @@ env:
# TRAVIS_PYTHON_VERSION is only needed for neo's setup.py
# 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=""
TRAVIS_PYTHON_VERSION=3.6 CONDA_VERSION=">=4.3.27"
global: PYTHON_VERSION=3.7 DISPLAY=:99.0 MNE_LOGGING_LEVEL=warning TEST_LOCATION=src
TRAVIS_PYTHON_VERSION=3.7 CONDA_VERSION=">=4.3.27"
OPENBLAS_NUM_THREADS=1
matrix:
......@@ -18,53 +16,67 @@ 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"
PIP_DEPENDENCIES="codecov flake8 numpydoc codespell pydocstyle codecov check-manifest twine"
# Linux
# As of 2019/09/19 there is a mysterious joblib bug, so temporarily work around it with MNE_FORCE_SERIAL
- os: linux
env: CONDA_ENVIRONMENT="environment.yml"
env: CONDA_ENV="environment.yml"
MNE_FORCE_SERIAL=true
# OSX conda
- os: osx
env: CONDA_ENVIRONMENT="environment.yml"
env: CONDA_ENV="environment.yml"
# PIP + non-default stim channel
- os: linux
env: MNE_STIM_CHANNEL=STI101
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.12 scipy=0.18 matplotlib=2.0 pandas=0.19 scikit-learn=0.18"
PIP_DEPENDENCIES="codecov nitime"
CONDA_CHANNELS="conda-forge"
# Minimal
- os: linux
env: DEPS=minimial
CONDA_DEPENDENCIES="numpy scipy matplotlib pytest pytest-cov"
CONDA_DEPENDENCIES="numpy scipy matplotlib"
PIP_DEPENDENCIES="codecov"
# Setup anaconda
before_install:
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
/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;
fi;
- if [ -z "$CONDA_ENVIRONMENT" ] && [ -z "$CONDA_DEPENDENCIES" ]; then
pip uninstall -y numpy;
pip install numpy scipy vtk;
pip install -r requirements.txt;
- if [ -z "$CONDA_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then
pip uninstall -yq numpy;
pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" --pre numpy scipy;
pip install vtk;
pip install $PIP_DEPENDENCIES;
pip install --upgrade -r requirements.txt;
else
git clone https://github.com/astropy/ci-helpers.git;
source ci-helpers/travis/setup_conda.sh;
if [ ! -z "$CONDA_ENVIRONMENT" ]; then
pip uninstall --yes mne;
fi;
if [ ! -z "$CONDA_ENV" ]; then
conda activate base;
conda env update --file $CONDA_ENV;
pip uninstall -yq mne;
pip install codecov nitime;
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
pip install --upgrade pyqt5>=5.10;
pip install "pyqt5>=5.10";
fi;
fi;
fi
# Always install these via pip so we get the latest possible versions (testing bugfixes)
- pip install --upgrade pytest pytest-sugar pytest-cov pytest-mock pytest-timeout
# Don't source mne_setup_sh here because changing PATH etc. can't be done in a script
- if [ "${DEPS}" == "" ]; then
export MNE_ROOT="${PWD}/minimal_cmds";
......@@ -97,17 +109,13 @@ install:
# files to act as a FREESURFER_HOME for the coreg tests
- if [ "${DEPS}" != "nodata" ]; then
python -c 'import mne; mne.datasets.testing.data_path(verbose=True)';
ls -al $HOME/mne_data/;
ls -al $HOME/mne_data/MNE-testing-data/;
ls -al $HOME/mne_data/MNE-testing-data/MEG/;
ls -al $HOME/mne_data/MNE-testing-data/MEG/sample/;
if [ "${DEPS}" == "" ] && [ "${TRAVIS_OS_NAME}" == "linux" ]; then
export FREESURFER_HOME=$(python -c 'import mne; print(mne.datasets.testing.data_path())');
export MNE_SKIP_FS_FLASH_CALL=1;
fi;
else
export MNE_SKIP_TESTING_DATASET_TESTS=true;
fi;
- if [ "${DEPS}" == "" ] && [ "${TRAVIS_OS_NAME}" == "linux" ]; then
export FREESURFER_HOME=$(python -c 'import mne; print(mne.datasets.testing.data_path())');
export MNE_SKIP_FS_FLASH_CALL=1;
fi;
- MNE_DIR=$(python -c 'import mne;print(mne.__path__[0])')
# We run two versions: one out of the source directory (that makes
# coveralls coverage work), and one out of the install directory (that
......@@ -124,10 +132,8 @@ install:
ln -s ${SRC_DIR}/setup.cfg ${MNE_DIR}/../setup.cfg;
ln -s ${SRC_DIR}/.coveragerc ${MNE_DIR}/../.coveragerc;
cd ${MNE_DIR}/../;
COVERAGE=;
else
cd ${SRC_DIR};
COVERAGE=--with-coverage;
fi;
......@@ -165,8 +171,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}" --cov=mne ${USE_DIRS}
- pytest -m "${CONDITION}" --cov=mne ${USE_DIRS}
- 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/install/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
......@@ -8,7 +8,7 @@ modification, are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the names of MNE-Python authors nor the names of any
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
......
......@@ -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,*.svg"
CODESPELL_DIRS ?= mne/ doc/ tutorials/ examples/
all: clean inplace test test-doc
......@@ -17,7 +17,7 @@ clean-so:
find . -name "*.pyd" | xargs rm -f
clean-build:
rm -rf _build
rm -rf build dist
clean-ctags:
rm -f tags
......@@ -31,6 +31,12 @@ in: inplace # just a shortcut
inplace:
$(PYTHON) setup.py build_ext -i
wheel:
$(PYTHON) setup.py sdist bdist_wheel
wheel_quiet:
$(PYTHON) setup.py -q sdist bdist_wheel
sample_data:
@python -c "import mne; mne.datasets.sample.data_path(verbose=True);"
......@@ -67,7 +73,7 @@ test-no-sample-with-coverage: in testing_data
$(PYTESTS) --cov=mne --cov-report html:coverage
test-doc: sample_data testing_data
$(PYTESTS) --doctest-modules --doctest-ignore-import-errors --doctest-glob='*.rst' ./doc/
$(PYTESTS) --doctest-modules --doctest-ignore-import-errors --doctest-glob='*.rst' ./doc/ --ignore=./doc/auto_examples --ignore=./doc/auto_tutorials --ignore=./doc/_build --fulltrace
test-coverage: testing_data
rm -rf coverage .coverage
......@@ -115,8 +121,8 @@ docstring:
check-manifest:
check-manifest --ignore .circleci*,doc,logo,mne/io/*/tests/data*,mne/io/tests/data,mne/preprocessing/tests/data,.DS_Store
check-readme:
python setup.py check --restructuredtext --strict
check-readme: clean wheel_quiet
twine check dist/*
nesting:
@echo "Running import nesting tests"
......
.. -*- 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
......@@ -20,8 +20,8 @@
.. |Zenodo| image:: https://zenodo.org/badge/5822/mne-tools/mne-python.svg
.. _Zenodo: https://zenodo.org/badge/latestdoi/5822/mne-tools/mne-python
.. |MNE| image:: https://martinos.org/mne/stable/_static/mne_logo.png
.. _MNE: https://martinos.org/mne
.. |MNE| image:: https://mne.tools/stable/_static/mne_logo.png
.. _MNE: https://mne.tools/dev/
MNE-Python
==========
......@@ -48,10 +48,12 @@ To install the latest stable version of MNE-Python, you can use pip_ in a termin
pip install -U mne
**Note** that MNE-Python 0.17 will be the last release to support Python 2. From MNE-Python 0.18, only Python 3 will be supported.
**Note** that MNE-Python 0.17 was the last release to support Python 2.
MNE-Python 0.18 only works under Python 3, and MNE-Python 0.19 requires
Python 3.5 or higher.
For more complete instructions and more advanced installation methods (e.g. for
the latest development version), see the `getting started page`_.
the latest development version), see the `installation guide`_.
Get the latest code
......@@ -78,28 +80,30 @@ Dependencies
The minimum required dependencies to run MNE-Python are:
- Python >= 2.7
- NumPy >= 1.8
- SciPy >= 0.12
- Python >= 3.5
- NumPy >= 1.12.1
- SciPy >= 0.18.1
For full functionality, some functions require:
- Matplotlib >= 1.3
- Matplotlib >= 2.0.2
- Mayavi >= 4.6
- PySurfer >= 0.8
- Scikit-learn >= 0.15 (>= 0.18 recommended)
- Scikit-learn >= 0.18.2
- Numba >= 0.40
- NiBabel >= 2.1.0
- Pandas >= 0.13
- Pandas >= 0.19.2
- Picard >= 0.3
- CuPy >= 4.0 (for NVIDIA CUDA acceleration)
- DIPY >= 0.10.1
- PyVista >= 0.20.1
Contributing to MNE-Python
^^^^^^^^^^^^^^^^^^^^^^^^^^
Please see the documentation on the MNE-Python homepage:
https://martinos.org/mne/contributing.html
https://mne.tools/dev/install/contributing.html
Mailing list
......@@ -116,7 +120,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
......@@ -147,8 +151,7 @@ MNE-Python is **BSD-licenced** (3 clause):
damage.**
.. _MNE-Python software: https://martinos.org/mne
.. _MNE documentation: http://martinos.org/mne/documentation.html
.. _getting started page: https://martinos.org/mne/getting_started.html
.. _MNE-Python software: https://mne.tools/dev/
.. _MNE documentation: https://mne.tools/dev/overview/index.html
.. _installation guide: https://mne.tools/dev/install/index.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'
OPENBLAS_NUM_THREADS: 1
AZURE_CI_WINDOWS: 'true'
PYTHON_VERSION: '3.7'
CONDA_VERSION: '>=4.3.27'
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.
Python37-64bit-full-conda:
PLATFORM: 'x86-64'
TEST_MODE: 'conda'
CONDA_ENV: 'environment.yml'
PIP_NO_UPGRADE: 'True'
Python37-64bit-full-pip:
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 codecov
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
powershell ci-helpers/appveyor/install-miniconda.ps1
$env:PATH = $env:PYTHON + ";" + $env:PYTHON + "\Scripts;" + $env:PYTHON + "\Library\bin;" + $env:PATH
conda env list
conda install numpy scipy matplotlib scikit-learn
conda env update --file $env:CONDA_ENV
pip uninstall -yq mne
pip install codecov
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" --cov=mne 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()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import glob
import subprocess
import os.path as op
import mne
mne_bin_dir = op.dirname(mne.__file__)
valid_commands = sorted(glob.glob(op.join(mne_bin_dir,
'commands', 'mne_*.py')))
valid_commands = [c.split(op.sep)[-1][4:-3] for c in valid_commands]
def print_help():
print("Usage : mne command options\n")
print("Accepted commands :\n")
for c in valid_commands:
print("\t- %s" % c)
print("\nExample : mne browse_raw --raw sample_audvis_raw.fif")
print("\nGetting help example : mne compute_proj_eog -h")
sys.exit(0)
if len(sys.argv) == 1:
print_help()
elif ("help" in sys.argv[1] or "-h" in sys.argv[1]):
print_help()
elif sys.argv[1] == "--version":
print("MNE %s" % mne.__version__)
elif sys.argv[1] not in valid_commands:
print('Invalid command: "%s"\n' % sys.argv[1])
print_help()
sys.exit(0)
else:
cmd = sys.argv[1]
cmd_path = op.join(mne_bin_dir, 'commands', 'mne_%s.py' % cmd)
sys.exit(subprocess.call([sys.executable, cmd_path] + sys.argv[2:]))
mne.commands.utils.main()