-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from UDST/tests-ci
Consolidate tests, clean up requirements, add CI and coveralls
- Loading branch information
Showing
15 changed files
with
82 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language: python | ||
|
||
python: | ||
- "2.7" | ||
|
||
before_install: | ||
- pip install --upgrade pip | ||
- pip install --upgrade wheel | ||
- wget http://bit.ly/miniconda -O miniconda.sh | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- hash -r | ||
- conda config --set always_yes yes --set show_channel_urls true | ||
- conda update conda | ||
- conda config --add channels udst --force | ||
- conda config --add channels conda-forge --force | ||
- conda create --quiet --name TESTENV python=$TRAVIS_PYTHON_VERSION future numpy pandas patsy scipy statsmodels urbansim coverage coveralls pytest | ||
- source activate TESTENV | ||
- pip install pylogit | ||
- conda info --all | ||
- conda list | ||
|
||
install: | ||
- pip install . | ||
- pip show choicemodels | ||
|
||
script: | ||
- coverage run --source choicemodels -m pytest --verbose | ||
|
||
after_success: | ||
- coverage report -m | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage | ||
coveralls | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
future >= 0.16.0 | ||
numpy >= 1.8.0 | ||
pandas >= 0.17.0 | ||
patsy >= 0.3.0 | ||
pylogit >= 0.1.2 | ||
scipy >= 0.13.3 | ||
statsmodels >= 0.8.0 | ||
urbansim >= 3.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def test_import(): | ||
import choicemodels | ||
|
||
def test_simple_estimation(): | ||
import choicemodels | ||
import numpy as np | ||
import pandas as pd | ||
from collections import OrderedDict | ||
endog = np.random.randint(2, size=50) | ||
exog = np.random.rand(50, 5) | ||
m = choicemodels.Logit(endog, exog) | ||
results = m.fit() | ||
results.summary() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters