Skip to content

Commit

Permalink
WIP: Fix Travis (mne-tools#7906)
Browse files Browse the repository at this point in the history
* MAINT: Fix Mayavi [skip circle]

* WIP: Unify

* WIP: Unify

* FIX: Fix libs

* FIX: Run more [circle front]

* FIX: Fix Circle [circle front]
  • Loading branch information
larsoner authored Jun 17, 2020
1 parent 64499b7 commit 59b0307
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
name: Install 3D rendering libraries \ PyQt5 dependencies \ graphviz \ optipng (for optimized images)
command: |
sudo apt-get install libosmesa6 libglx-mesa0 libopengl0 libglx0 libdbus-1-3 \
libxkbcommon-x11-0 \
libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 \
graphviz \
optipng
Expand All @@ -81,7 +81,6 @@ jobs:
command: |
python -m pip install --user --upgrade --progress-bar off pip numpy setuptools
python -m pip install --user --upgrade --progress-bar off -f "https://vtk.org/download" "vtk>=9"
python -m pip install --user --upgrade --progress-bar off https://github.com/enthought/mayavi/zipball/master
python -m pip install --user --upgrade --progress-bar off -r requirements.txt
python -m pip uninstall -yq pysurfer mayavi
python -m pip install --user --upgrade --progress-bar off --pre sphinx
Expand All @@ -94,6 +93,10 @@ jobs:
paths:
- ~/.cache/pip

- run:
name: Check PyQt5
command: LD_DEBUG=libs python -c "from PyQt5.QtWidgets import QApplication, QWidget; app = QApplication([])"

# Look at what we have and fail early if there is some library conflict
- run:
name: Check installation
Expand Down
28 changes: 14 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ addons:
apt:
packages:
- libxkbcommon-x11-0
- libxcb*
- libosmesa6
- libglx-mesa0
- libopengl0
Expand Down Expand Up @@ -52,22 +53,21 @@ 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_ENV" ] && [ -z "$CONDA_DEPENDENCIES" ]; then
pip uninstall -yq numpy;
pip install -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" --pre numpy;
pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow;
pip install -f "https://vtk.org/download" "vtk>=9";
pip install https://github.com/enthought/mayavi/zipball/master;
pip install $PIP_DEPENDENCIES;
pip install --upgrade -r requirements.txt;
- |
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
pip install -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" scipy pandas scikit-learn matplotlib h5py Pillow
pip install -f "https://vtk.org/download" "vtk>=9"
pip install --upgrade -r requirements.txt
else
git clone https://github.com/astropy/ci-helpers.git;
source ci-helpers/travis/setup_conda.sh;
git clone https://github.com/astropy/ci-helpers.git
source ci-helpers/travis/setup_conda.sh
if [ ! -z "$CONDA_ENV" ]; then
conda activate base;
conda env update --file $CONDA_ENV;
pip uninstall -yq mne;
fi;
conda activate base
conda env update --file $CONDA_ENV
pip uninstall -yq mne
fi
fi
# Always install these via pip so we get the latest possible versions (testing bugfixes)
- pip install --upgrade "pytest<5.4" pytest-sugar pytest-cov pytest-mock pytest-timeout pytest-xdist codecov
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
OPENBLAS_NUM_THREADS: '1'
steps:
- bash: |
sudo apt install libxkbcommon-x11-0 xvfb tcsh
sudo apt install libxkbcommon-x11-0 xvfb tcsh libxcb*
displayName: 'Install Ubuntu dependencies'
- bash: |
source tools/get_minimal_commands.sh
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- scipy
- matplotlib
- numba
- pyqt>=5.9
- pandas>=0.18
- xlrd
- scikit-learn
Expand Down Expand Up @@ -49,4 +48,4 @@ dependencies:
- codespell
- python-picard
- tqdm
- PyQt5>=5.10,<5.14; platform_system == "Darwin"
- PyQt5>=5.10
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy
scipy
matplotlib
pyqt5<5.14
pyqt5
pyqt5-sip
sip
scikit-learn
Expand Down
4 changes: 3 additions & 1 deletion tutorials/machine-learning/plot_sensors_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

data_path = sample.data_path()

subjects_dir = data_path + '/subjects'
raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif'
tmin, tmax = -0.200, 0.500
event_id = {'Auditory/Left': 1, 'Visual/Left': 3} # just use two
Expand Down Expand Up @@ -393,7 +394,8 @@
inv = mne.minimum_norm.make_inverse_operator(
evoked_time_gen.info, fwd, cov, loose=0.)
stc = mne.minimum_norm.apply_inverse(evoked_time_gen, inv, 1. / 9., 'dSPM')
brain = stc.plot(hemi='split', views=('lat', 'med'), initial_time=0.1)
brain = stc.plot(hemi='split', views=('lat', 'med'), initial_time=0.1,
subjects_dir=subjects_dir)

###############################################################################
# Source-space decoding
Expand Down

0 comments on commit 59b0307

Please sign in to comment.