Skip to content

Commit 39fa39f

Browse files
committed
Merge pull request UW-Hydro#14 from jhamman/feature/fix_travis
use container based travis build, add build on python.3.4., and integ…
2 parents e102315 + fe99c24 commit 39fa39f

File tree

9 files changed

+53
-360
lines changed

9 files changed

+53
-360
lines changed

.travis.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
1+
sudo: false # travis container-based infrastructure
2+
13
language: python
24

35
python:
4-
- "2.6"
56
- "2.7"
6-
- "3.3"
7+
- "3.4"
8+
9+
# Setup anaconda
10+
before_install:
11+
- wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh
12+
- chmod +x miniconda.sh
13+
- ./miniconda.sh -b
14+
- export PATH=/home/travis/anaconda/bin:$PATH
15+
# Update conda itself
16+
- conda update --yes conda
717

818
install:
19+
- conda create --yes --name=tonic_test_env python=$TRAVIS_PYTHON_VERSION --file=ci/requirements-$TRAVIS_PYTHON_VERSION.txt
20+
- source activate tonic_test_env
921
- python setup.py install
1022

1123
# command to run tests
1224
script:
25+
- which python
26+
- python --version
27+
- conda list
28+
- pip freeze
29+
- echo $PATH
1330
- vic_utils -h
31+
- py.test
32+
33+
notifications:
34+
webhooks:
35+
urls:
36+
- https://webhooks.gitter.im/e/0b751ac59ea833728a02
37+
on_success: change # options: [always|never|change] default: always
38+
on_failure: always # options: [always|never|change] default: always
39+
on_start: false # default: false

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
TONIC
22
=====
33

4+
[![Build Status](https://travis-ci.org/UW-Hydro/tonic.svg?branch=develop)](https://travis-ci.org/UW-Hydro/tonic)
5+
46
`tonic` is a toolkit for working with distributed hydrologic models and their output.
57

68
This is truly a work in progress...
@@ -22,7 +24,7 @@ This is truly a work in progress...
2224

2325
## Install:
2426
Dependencies:
25-
- python 3
27+
- python 2.7 or greater
2628
- netCDF4
2729
- xray
2830
- matplotlib

ci/requirements-2.7.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
matplotlib
2+
netCDF4
3+
numpy
4+
scipy
5+
pandas
6+
pytest
7+
xray
8+
configobj
9+
basemap

ci/requirements-3.4.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
matplotlib
2+
netCDF4
3+
numpy
4+
scipy
5+
pandas
6+
pytest
7+
xray
8+
configobj
9+
basemap

forcing_tools/netcdf2vic.py

-202
This file was deleted.

tests/test_vic2netcdf.py

+3-16
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,12 @@
66
77
Usage: py.test (from RVIC or test directory)
88
"""
9-
import pytest
109
import numpy as np
11-
import sys
12-
sys.path.append("../")
10+
from tonic.tonic import calc_grid
1311

14-
# -------------------------------------------------------------------- #
15-
# Unit tests for vic2netcdf.py
16-
17-
18-
@pytest.fixture
19-
def lons():
20-
pass
2112

2213
def test_calc_grid_standard():
23-
from processing_tools.vic2netcdf import calc_grid
24-
lons = np.arange(0, 5, 0.5)
14+
lons = np.arange(0, 5, 0.25)
2515
lats = np.arange(0, 10, 0.5)
2616
target_grid = calc_grid(lons, lats, decimals=4)
27-
28-
# -------------------------------------------------------------------- #
29-
30-
17+
assert type(target_grid) == dict

tonic/data_tools/__init__.py

-3
This file was deleted.

0 commit comments

Comments
 (0)