Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting #2450 (test job updates) to yt-4.0 #2513

Merged
merged 15 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 21 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: python
dist: xenial
sudo: required
dist: xenial
cache:
pip: true
directories:
Expand Down Expand Up @@ -51,11 +49,17 @@ install:
$PIP install --upgrade pip
$PIP install --upgrade wheel
$PIP install --upgrade setuptools
echo "Travis build stage: $TRAVIS_BUILD_STAGE_NAME"
# install dependencies yt
if [[ $TRAVIS_BUILD_STAGE_NAME != "Lint" ]]; then
if [[ ${TRAVIS_BUILD_STAGE_NAME} == "lint" ]]; then
export TRAVIS_BUILD_STAGE_NAME="Lint"
fi
if [[ ${TRAVIS_BUILD_STAGE_NAME} != "Lint" ]]; then
if [[ $MINIMAL == 1 ]]; then
# Ensure numpy and cython are installed so dependencies that need to be built
# don't error out
# The first numpy to support py3.6 is 1.12, but numpy 1.13 matches
# unyt so we'll match it here.
$PIP install numpy==1.13.3 cython==0.26.1
$PIP install -r tests/test_minimal_requirements.txt
else
Expand All @@ -64,8 +68,8 @@ install:
# pyproject.toml in cartopy.
# These versions are pinned, so we will need to update/remove them when
# the hack is no longer necessary.
$PIP install numpy==1.16.2 cython==0.29
$PIP install -r tests/test_requirements.txt
$PIP install numpy==1.18.1 cython==0.29.6
CFLAGS="$CFLAGS -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" $PIP install -r tests/test_requirements.txt
fi
$PIP install -e .
else
Expand All @@ -74,40 +78,29 @@ install:

jobs:
include:
- stage: lint
python: 3.7
- stage: Lint
python: 3.6
matthewturk marked this conversation as resolved.
Show resolved Hide resolved
script: flake8 yt/

- stage: tests
name: "Minimal Dependency Version Unit Tests"
python: 3.5
name: "Python: 3.6 Minimal Dependency Unit Tests"
python: 3.6
env: MINIMAL=1
script: coverage run $(which nosetests) -c nose_unit.cfg

- stage: tests
name: "Python: 3.5 Unit Tests"
python: 3.5
script: coverage run $(which nosetests) -c nose_unit.cfg

- stage: tests
name: "Python: 3.6 Unit Tests"
python: 3.6
script: coverage run $(which nosetests) -c nose_unit.cfg

- stage: tests
name: "Python: 3.7 Unit Tests"
python: 3.7
name: "Python: 3.8 Unit Tests"
python: 3.8
script: coverage run $(which nosetests) -c nose_unit.cfg

- name: "Minimal Dependency Version Answer Tests"
python: 3.5
env: MINIMAL=1
script: coverage run $(which nosetests) -c nose_answer.cfg
after_failure: python tests/report_failed_answers.py -f -m --xunit-file "answer_nosetests.xml"

- stage: tests
name: "Python: 3.7 Answer Tests"
python: 3.7
name: "Python: 3.6 Answer Tests"
python: 3.6
script: coverage run $(which nosetests) -c nose_answer.cfg
after_failure: python tests/report_failed_answers.py -f -m --xunit-file "answer_nosetests.xml"

Expand All @@ -127,6 +120,9 @@ jobs:

after_success:
- |
if [[ $TRAVIS_BUILD_STAGE_NAME != "Lint" ]]; then
if [[ ${TRAVIS_BUILD_STAGE_NAME} == "lint" ]]; then
export TRAVIS_BUILD_STAGE_NAME="Lint"
fi
if [[ ${TRAVIS_BUILD_STAGE_NAME} != "Lint" ]]; then
codecov
fi
10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ environment:
matrix:
- PYTHON_VERSION: "3.6"
NUMPY_VERSION: "1.16"
- PYTHON_VERSION: "3.8"
NUMPY_VERSION: "1.16"
matthewturk marked this conversation as resolved.
Show resolved Hide resolved

platform:
-x64
Expand All @@ -30,16 +32,16 @@ install:
- "python --version"

# Install specified version of numpy and dependencies
- "conda install --yes -c conda-forge numpy==%NUMPY_VERSION% scipy nose setuptools ipython
Cython sympy fastcache h5py matplotlib mock pandas cartopy conda-build unyt pooch"
- "conda install --yes -c conda-forge numpy==%NUMPY_VERSION% scipy nose pytest setuptools ipython
Cython sympy fastcache h5py matplotlib=3.1.3 mock pandas cartopy conda-build unyt pooch pyyaml"
# install yt
- "conda develop -b ."
- "pip install -e ."

# Not a .NET project
build: false

test_script:
- "nosetests --nologcapture -sv yt"
- "nosetests --nologcapture -sv --traverse-namespace yt"

# Enable this to be able to login to the build worker. You can use the
# `remmina` program in Ubuntu, use the login information that the line below
Expand Down
14 changes: 9 additions & 5 deletions tests/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ fastcache==1.0.2
glueviz==0.13.3
h5py==2.8.0
ipython==7.1.1
matplotlib==3.0.1
matplotlib==3.1.3
nose-timer==0.7.3
nose==1.3.7
pandas==0.23.4
pytest~=5.2
requests==2.20.0
scipy==1.1.0
sympy==1.3
scipy==1.3.3
sympy==1.5
pyqt5==5.11.3
pint==0.8.1
netCDF4==1.4.2
netCDF4==1.5.3
libconf==1.0.1
cartopy==0.17.0
pyaml==17.10.0
mpi4py==3.0.0
mpi4py==3.0.3
unyt==2.2.2
pyyaml>=4.2b1
xarray==0.12.3
firefly_api>=0.0.2
f90nml>=1.1.2
MiniballCpp>=0.2.1
pooch>=0.7.0
1 change: 0 additions & 1 deletion yt/visualization/tests/test_geo_projections.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def setUp(self):

def tearDown(self):
del self.ds
del self.slc

def test_geo_projection_setup(self):

Expand Down