Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,21 @@ before_install:
- conda create -y -q -n test-env python=$TRAVIS_PYTHON_VERSION
- source activate test-env
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]];
then 2to3 -nw gwr > /dev/null;
then 2to3 -nw mgwr > /dev/null;
fi

install:
- conda install --yes pip
- conda install --yes --file requirements.txt;
- conda install --yes nose
- pip install libpysal
- cd ../ && git clone https://github.com/TaylorOshan/spglm.git
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]];
then 2to3 -nw spglm/ > /dev/null;
fi
- pip install -e ./spglm
- cd ./gwr
- pip install spglm
- pip install spreg
- pip install -r requirements_dev.txt

script:
- python setup.py sdist >/dev/null
- nosetests --with-coverage --cover-package=gwr;
- nosetests --with-coverage --cover-package=mgwr;

notifications:
email:
Expand Down
94 changes: 0 additions & 94 deletions gwr/tests/FB.p

This file was deleted.

37 changes: 0 additions & 37 deletions gwr/tests/XB.p

This file was deleted.

37 changes: 0 additions & 37 deletions gwr/tests/err.p

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import pysal as ps\n",
"import numpy as np\n",
"import scipy as sp\n",
"from gwr.sel_bw import Sel_BW\n",
"from gwr.gwr import GWR, MGWR\n",
"from mgwr.sel_bw import Sel_BW\n",
"from mgwr.gwr import GWR, MGWR\n",
"import pandas as pd\n",
"import pysal\n",
"import libpysal as ps\n",
Expand All @@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -73,14 +73,14 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
" 4%|▍ | 9/200 [00:02<00:48, 3.93it/s]"
" 4%|▍ | 9/200 [00:02<00:49, 3.83it/s]"
]
},
{
Expand Down Expand Up @@ -156,41 +156,37 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"#pk.dump(mgwr_results, open('mgwr_example.p', 'wb'), protocol=2)\n",
"pk.dump(mgwr_results, open('mgwr_example.p', 'wb'), protocol=2)\n",
"#Used to produce pickled results for tests"
]
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"tracts = ps.open(os.path.join(os.getcwd(),'../tests/georgia/G_utm.shp'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [mgwr_dev3]",
"language": "python",
"name": "Python [mgwr_dev3]"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.5"
}
},
"nbformat": 4,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
2 changes: 1 addition & 1 deletion gwr/tests/test_gwr.py → mgwr/tests/test_gwr.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUp(self):
self.GS_F = libpysal.open(os.path.join(os.path.dirname(__file__),'georgia/georgia_GS_F_listwise.csv'))
self.GS_NN =libpysal.open(os.path.join(os.path.dirname(__file__),'georgia/georgia_GS_NN_listwise.csv'))
MGWR_path = os.path.join(os.path.dirname(__file__),'mgwr_example.p')
self.MGWR = pk.load(open(MGWR_path, 'r'))
self.MGWR = pk.load(open(MGWR_path, 'rb'))

def test_BS_F(self):
est_Int = self.BS_F.by_col(' est_Intercept')
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions gwr/tests/test_sel_bw.py → mgwr/tests/test_sel_bw.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def setUp(self):
black = np.array(data.by_col('PctBlack')).reshape((-1,1))
fb = np.array(data.by_col('PctFB')).reshape((-1,1))
self.X = np.hstack([rural, pov, black])
XB_path = os.path.join(os.path.dirname(__file__),'XB.p')
self.XB = pk.load(open(XB_path,'rb'))
err_path = os.path.join(os.path.dirname(__file__),'err.p')
self.err = pk.load(open(err_path,'rb'))
self.mgwr_X = np.hstack([fb, black, rural])

def test_golden_fixed_AICc(self):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
scipy>=0.11
numpy>=1.3
spreg>=1.0.3