Skip to content

Commit 423943e

Browse files
authored
FIX: AppVeyor (#244)
* FIX: AppVeyor * FIX: pillow * FIX: Dont use git * FIX: 2.7 * FIX: Try pip * FIX: AppVeyor * FIX: nose * FIX? * FIX: Version * FIX: Version * FIX: Version? * FIX: Version?? * FIX: Version??? * ffmpeg * FIX: quotes * FIX: Travis * FIX: Travis again * FIX: More nose
1 parent 65a22bf commit 423943e

File tree

6 files changed

+82
-104
lines changed

6 files changed

+82
-104
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ matrix:
1717

1818
# Full (Linux, 2.7)
1919
- os: linux
20-
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov nose coverage"
20+
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov coverage"
2121
PIP_DEPENDENCIES="codecov nibabel imageio"
2222
addons:
2323
apt:
@@ -26,12 +26,12 @@ matrix:
2626

2727
# Minimal (no mencoder)
2828
- os: linux
29-
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov nose coverage"
29+
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov coverage"
3030
PIP_DEPENDENCIES="codecov nibabel"
3131

3232
# OSX
3333
- os: osx
34-
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov nose coverage"
34+
env: CONDA_DEPENDENCIES="numpy scipy matplotlib mayavi flake8 pytest pytest-cov coverage"
3535
PIP_DEPENDENCIES="codecov nibabel imageio"
3636

3737
# Setup anaconda
@@ -68,7 +68,7 @@ before_script:
6868

6969
script:
7070
- cd ${SRC_DIR}
71-
- pytest surfer
71+
- pytest surfer --cov=surfer
7272
- make flake
7373

7474
after_success:

appveyor.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,24 @@
11
environment:
2-
global:
3-
PYTHON: "C:\\conda"
4-
MINICONDA_VERSION: "latest"
5-
CONDA_DEPENDENCIES: "numpy scipy mayavi matplotlib nose imaging sphinx pytest pytest-cov coverage"
6-
PIP_DEPENDENCIES: "nibabel imageio git+git://github.com/sphinx-gallery/sphinx-gallery.git numpydoc codecov"
72
matrix:
8-
- PYTHON_VERSION: "2.7"
9-
PYTHON_ARCH: "64"
10-
3+
- PYTHON: "C:\\Python36-x64"
4+
PYTHON_VERSION: "3.6"
5+
PYTHON_ARCH: "64"
116
install:
12-
- "git clone git://github.com/astropy/ci-helpers.git"
13-
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
14-
- "powershell make/get_fsaverage.ps1"
157
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
16-
- "activate test"
8+
- "python --version"
9+
- "pip install numpy scipy matplotlib nose pillow pytest pytest-cov coverage imageio codecov pyqt5==5.9"
10+
- "pip install traits traitsui pyface vtk mayavi nibabel"
11+
- "python -c \"import imageio; imageio.plugins.ffmpeg.download()\""
12+
- "powershell make/get_fsaverage.ps1"
1713
- "python setup.py develop"
18-
- "conda install ffmpeg -c conda-forge"
1914
- "SET SUBJECTS_DIR=%CD%\\subjects"
2015
- "ls %CD%\\subjects"
21-
- "pip install --upgrade git+https://github.com/enthought/mayavi.git"
2216

2317
build: false # Not a C# project, build stuff at the test step instead.
2418

2519
test_script:
2620
# Run the project tests
27-
- "pytest surfer"
28-
- cd doc
29-
# The Makefile doesn't work directly on Windows PowerShell because of
30-
# slashes (but will work e.g. in Msys-git), so for now do these manually
31-
# make html-noplot
32-
- sphinx-build -D plot_gallery=0 -b html -d _build\doctrees . _build\html
33-
- cd ..
34-
21+
- "pytest surfer --cov=surfer"
3522

3623
on_success:
3724
- "codecov"
38-
39-
artifacts:
40-
- path: doc\_build\html

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ dependencies:
1010
- matplotlib
1111
- pyqt>=5.9
1212
- vtk>=8
13-
- nose
1413
- coverage
1514
- pytest
1615
- pytest-cov

surfer/tests/test_utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22
import matplotlib as mpl
3-
import nose.tools as nt
43
from numpy.testing import assert_array_almost_equal, assert_array_equal
54

65
from surfer import utils
@@ -30,7 +29,7 @@ def _slow_compute_normals(rr, tris):
3029
return nn
3130

3231

33-
@utils.requires_fsaverage
32+
@utils.requires_fsaverage()
3433
def test_surface():
3534
"""Test IO for Surface class"""
3635
subj_dir = utils._get_subjects_dir()
@@ -82,11 +81,11 @@ def test_create_color_lut():
8281

8382
# Test named matplotlib lut
8483
cmap_out = utils.create_color_lut("BuGn_r")
85-
nt.assert_equal(cmap_out.shape, (256, 4))
84+
assert cmap_out.shape == (256, 4)
8685

8786
# Test named pysurfer lut
8887
cmap_out = utils.create_color_lut("icefire_r")
89-
nt.assert_equal(cmap_out.shape, (256, 4))
88+
assert cmap_out.shape == (256, 4)
9089

9190
# Test matplotlib object lut
9291
cmap_in = mpl.colors.ListedColormap(["blue", "white", "red"])
@@ -95,8 +94,8 @@ def test_create_color_lut():
9594

9695
# Test list of colors lut
9796
cmap_out = utils.create_color_lut(["purple", "pink", "white"])
98-
nt.assert_equal(cmap_out.shape, (256, 4))
97+
assert cmap_out.shape == (256, 4)
9998

10099
# Test that we can ask for a specific number of colors
101100
cmap_out = utils.create_color_lut("Reds", 12)
102-
nt.assert_equal(cmap_out.shape, (12, 4))
101+
assert cmap_out.shape == (12, 4)

0 commit comments

Comments
 (0)