diff --git a/circle.yml b/circle.yml index 88f6a7228d2..28a4fdf374b 100644 --- a/circle.yml +++ b/circle.yml @@ -50,11 +50,43 @@ dependencies: - pip install sphinx_bootstrap_theme PySurfer nilearn neo numpydoc; override: + # Figure out if we should run a full, pattern, or noplot version - cd /home/ubuntu/mne-python && python setup.py develop; - - if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "maint/0.12" ] || [[ `git log -1 --pretty=%B` == *"[circle full]"* ]]; then - mkdir -p ~/mne_data; + - python -c "import mne; print(mne.get_config('MNE_DATA'))" + - git branch -a + - PATTERN=""; NEED_SAMPLE=0; + if [ "$CIRCLE_BRANCH" == "master" ] || [[ `git log -1 --pretty=%B` == *"[circle full]"* ]]; then + echo html_dev > build.txt; + elif [ "$CIRCLE_BRANCH" == "maint/0.12" ]; then + echo html_stable > build.txt; + else + FNAMES=$(git diff --name-only $CIRCLE_BRANCH $(git merge-base $CIRCLE_BRANCH origin/master)); + echo FNAMES="$FNAMES"; + for FNAME in $FNAMES; do + if [[ `expr match $FNAME "\(tutorials\|examples\)/.*plot_.*\.py"` ]] ; then + PATTERN=`basename $FNAME`"\\|"$PATTERN; + NEED_SAMPLE=$(($NEED_SAMPLE + $(cat $FNAME | grep -x ".*datasets.*sample.*" | wc -l))); + fi; + done; + echo PATTERN="$PATTERN"; + echo NEED_SAMPLE="$NEED_SAMPLE"; + if [[ $PATTERN ]]; then + PATTERN="\(${PATTERN::-2}\)"; + echo html_dev-pattern > build.txt; + else + echo html_dev-noplot > build.txt; + fi; + fi; + echo "$PATTERN" > pattern.txt; + echo "$NEED_SAMPLE" > need_sample.txt + - echo BUILD="$(cat build.txt)" + - mkdir -p ~/mne_data; + - ls -al ~/mne_data; + - if [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then python -c "import mne; mne.datasets._download_all_example_data()"; - fi + elif [[ $(cat need_sample.txt) -gt 0 ]]; then + python -c "import mne; print(mne.datasets.sample.data_path())"; + fi; - python -c "import mne; mne.sys_info()"; - > if [ ! -d "/home/ubuntu/mne-tools.github.io" ]; then @@ -64,14 +96,7 @@ dependencies: test: override: - - if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "maint/0.12" ] || [[ `git log -1 --pretty=%B` == *"[circle full]"* ]]; then - make test-doc; - else - cd doc && make html_dev-noplot; - fi - - if [ "$CIRCLE_BRANCH" == "master" ] || [[ `git log -1 --pretty=%B` == *"[circle full]"* ]]; then cd doc && make html_dev; fi: - timeout: 1500 - - if [ "$CIRCLE_BRANCH" == "maint/0.12" ]; then cd doc && make html_stable; fi: + - if [[ $(cat build.txt) == "html_dev-noplot" ]]; then cd doc && make html_dev-noplot; elif [[ $(cat build.txt) == "html_dev-pattern" ]]; then cd doc && PATTERN=$(cat ../pattern.txt) make html_dev-pattern; else make test-doc; cd doc; make $(cat ../build.txt); fi: timeout: 1500 general: diff --git a/mne/surface.py b/mne/surface.py index 82dc966995c..32564ada446 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -417,6 +417,7 @@ def read_surface(fname, read_metadata=False, verbose=None): read_metadata : bool Read metadata as key-value pairs. Valid keys: + * 'head' : array of int * 'valid' : str * 'filename' : str @@ -441,6 +442,7 @@ def read_surface(fname, read_metadata=False, verbose=None): together form a face). volume_info : dict-like If read_metadata is true, key-value pairs found in the geometry file. + See Also -------- write_surface @@ -728,6 +730,7 @@ def write_surface(fname, coords, faces, create_stamp='', volume_info=None): volume_info : dict-like or None Key-value pairs to encode at the end of the file. Valid keys: + * 'head' : array of int * 'valid' : str * 'filename' : str diff --git a/mne/tests/test_bem.py b/mne/tests/test_bem.py index 3bf1e0dd7d8..dce68f02195 100644 --- a/mne/tests/test_bem.py +++ b/mne/tests/test_bem.py @@ -73,8 +73,7 @@ def _compare_bem_solutions(sol_a, sol_b): @testing.requires_testing_data def test_io_bem(): - """Test reading and writing of bem surfaces and solutions - """ + """Test reading and writing of bem surfaces and solutions""" tempdir = _TempDir() temp_bem = op.join(tempdir, 'temp-bem.fif') assert_raises(ValueError, read_bem_surfaces, fname_raw) diff --git a/tutorials/plot_background_filtering.py b/tutorials/plot_background_filtering.py index ba3f7c252b7..063d9186108 100644 --- a/tutorials/plot_background_filtering.py +++ b/tutorials/plot_background_filtering.py @@ -462,7 +462,7 @@ def plot_signal(x, offset): # Applying IIR filters # -------------------- # Now let's look at how our shallow and steep Butterworth IIR filters -# perform on our morlet signal from before: +# perform on our Morlet signal from before: axs = plt.subplots(2)[1] yticks = np.arange(4) / -30. diff --git a/tutorials/plot_visualize_raw.py b/tutorials/plot_visualize_raw.py index d721e3e43be..19c5bba93ea 100644 --- a/tutorials/plot_visualize_raw.py +++ b/tutorials/plot_visualize_raw.py @@ -100,7 +100,7 @@ raw.plot_psd() ############################################################################### -# Plotting channel wise power spectra is just as easy. The layout is inferred +# Plotting channel-wise power spectra is just as easy. The layout is inferred # from the data by default when plotting topo plots. This works for most data, # but it is also possible to define the layouts by hand. Here we select a # layout with only magnetometer channels and plot it. Then we plot the channel