Skip to content

Commit

Permalink
Merge pull request #24 from jGaboardi/dual_testing
Browse files Browse the repository at this point in the history
addressing pysal/pysal#1145
  • Loading branch information
jGaboardi committed Dec 30, 2019
2 parents 90b072b + 4b63c1b commit b4d7a36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ matrix:
env: PYSAL_PYPI=false

before_install:
- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p ./miniconda
- export PATH=`pwd`/miniconda/bin:$PATH
Expand All @@ -31,21 +31,24 @@ before_install:

install:
- conda install --yes pip
- conda install --yes --file requirements.txt;
- pip install https://github.com/pysal/splot/archive/master.zip
- conda install --yes --file requirements.txt
- pip install -r requirements_tests.txt
- if "$PYSAL_PYPI"; then
echo 'testing pypi libpysal spreg spglm';
else
echo 'testing git libpysal spreg spglm';
pip install https://github.com/pysal/libpysal/archive/master.zip;
pip install https://github.com/pysal/spreg/archive/master.zip;
pip install https://github.com/pysal/spglm/archive/master.zip;
git clone https://github.com/pysal/libpysal.git;
cd libpysal; pip install .; cd ../;
git clone https://github.com/pysal/spreg.git;
cd spreg; pip install .; cd ../;
git clone https://github.com/pysal/spglm.git;
cd spglm; pip install .; cd ../;
fi;

script:
- python setup.py sdist >/dev/null
- python setup.py install
- python -c 'import libpysal; libpysal.examples.load_example("nyc_bikes")'
- nosetests --verbose --with-doctest --with-coverage --cover-package=spint;

notifications:
Expand Down
3 changes: 2 additions & 1 deletion spint/gravity.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,8 @@ class Attraction(BaseGravity):
>>> import numpy as np
>>> import libpysal
>>> from spint.gravity import Attraction
>>> db = libpysal.io.open(libpysal.examples.get_path('nyc_bikes_ct.csv'))
>>> nyc_bikes = libpysal.examples.load_example('nyc_bikes')
>>> db = libpysal.io.open(nyc_bikes.get_path('nyc_bikes_ct.csv'))
>>> cost = np.array(db.by_col('tripduration')).reshape((-1,1))
>>> flows = np.array(db.by_col('count')).reshape((-1,1))
>>> d = np.array(db.by_col('d_tract')).reshape((-1,1))
Expand Down

0 comments on commit b4d7a36

Please sign in to comment.