Skip to content

Commit 1e5cf0a

Browse files
authored
Merge pull request #33 from landlab/barnhark/update_testing_proceedures
Update testing procedures
2 parents 9b0aef5 + 9af929f commit 1e5cf0a

21 files changed

Lines changed: 3049 additions & 2718 deletions

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33

44
*.out
55
*.pyc
6+
7+
\.pytest_cache/README\.md
8+
9+
\.pytest_cache/v/cache/lastfailed
10+
11+
\.pytest_cache/v/cache/nodeids

.travis.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ before_install:
1818
brew cleanup -s
1919
rm -rf $(brew --cache)
2020
fi
21+
- mkdir $MPLCONFIGDIR
22+
- touch $MPLCONFIGDIR/matplotlibrc
2123
install:
2224
- echo "Build on $TRAVIS_OS_NAME for Python $TRAVIS_PYTHON_VERSION"
2325
- |
@@ -33,12 +35,25 @@ install:
3335
- conda config --set always_yes yes --set changeps1 no
3436
- conda create -n _testing python=$TRAVIS_PYTHON_VERSION
3537
- source activate _testing
36-
- conda install scripting -c csdms-stack
37-
- conda install landlab jupyter -c landlab
38+
- |
39+
if [[ "$TRAVIS_BRANCH" == "release" ]]; then
40+
conda install landlab -c conda-forge
41+
else
42+
pushd ../..
43+
git clone --depth=50 https://github.com/landlab/landlab.git landlab/landlab
44+
pushd landlab/landlab
45+
git fetch origin master
46+
git checkout -qf master
47+
git submodule update --init --recursive
48+
conda install --file=requirements.txt
49+
python setup.py develop
50+
popd
51+
popd
52+
fi
53+
- conda install --file=requirements.txt
3854
- conda info -a && conda list
3955
script:
40-
- mkdir -p $MPLCONFIGDIR
41-
- "echo backend: Agg > $MPLCONFIGDIR/matplotlibrc"
42-
- ./run-all-tests.sh
56+
- mkdir -p $HOME/.config/matplotlib # For Python 3.5
57+
- travis_wait 50 pytest -vvv # the cellular atomata test takes over 10 minutes, and the entire process takes about 30 minutes, so we'll give it 50 min
4358
virtualenv:
4459
system_site_packages: false

ecohydrology/cellular_automaton_vegetation_DEM/Ecohyd_functions_DEM.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ def Plot_(grid, VegType, yrs, yr_step=10):
187187
pic += 1
188188
plt.figure(pic)
189189
plt.plot(years, grass_cov, '-g', label='Grass')
190-
plt.hold(True)
191190
plt.plot(years, shrub_cov, '-r', label='Shrub')
192-
plt.hold(True)
193191
plt.plot(years, tree_cov, '-k', label='Tree')
194192
plt.ylabel(' % Coverage ')
195193
plt.xlabel('Time in years')

ecohydrology/cellular_automaton_vegetation_flat_surface/Ecohyd_functions_flat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def Empty_arrays(n, grid, grid1):
111111
Time = np.empty(n) # To record time elapsed from the start of simulation
112112
# CumWaterStress = np.empty([n/55, grid1.number_of_cells])
113113
# Cum Water Stress
114-
VegType = np.empty([n/55, grid1.number_of_cells], dtype=int)
114+
VegType = np.empty([int(n/55), grid1.number_of_cells], dtype=int)
115115
PET_ = np.zeros([365, grid.number_of_cells])
116116
Rad_Factor = np.empty([365, grid.number_of_cells])
117117
EP30 = np.empty([365, grid.number_of_cells])
@@ -187,9 +187,7 @@ def Plot_(grid, VegType, yrs, yr_step=10):
187187
pic += 1
188188
plt.figure(pic)
189189
plt.plot(years, grass_cov, '-g', label='Grass')
190-
plt.hold(True)
191190
plt.plot(years, shrub_cov, '-r', label='Shrub')
192-
plt.hold(True)
193191
plt.plot(years, tree_cov, '-k', label='Tree')
194192
plt.ylabel(' % Coverage ')
195193
plt.xlabel('Time in years')

ecohydrology/cellular_automaton_vegetation_flat_surface/cellular_automaton_vegetation_flat_domain.ipynb

Lines changed: 94 additions & 81 deletions
Large diffs are not rendered by default.

flexure/lots_of_loads.ipynb

Lines changed: 193 additions & 92 deletions
Large diffs are not rendered by default.

flow__distance_utility/Application of flow__distance utility.ipynb renamed to flow__distance_utility/application_of_flow__distance_utility.ipynb

File renamed without changes.

flow_direction_and_accumulation/Comparison of FlowDirectors.ipynb

Lines changed: 0 additions & 865 deletions
This file was deleted.

flow_direction_and_accumulation/Introduction to FlowDirectors.ipynb

Lines changed: 0 additions & 532 deletions
This file was deleted.

flow_direction_and_accumulation/Introduction to the FlowAccumulator.ipynb

Lines changed: 0 additions & 674 deletions
This file was deleted.

0 commit comments

Comments
 (0)