Skip to content

Commit

Permalink
Merge pull request #24 from UDST/support-travis
Browse files Browse the repository at this point in the history
Support travis
  • Loading branch information
sablanchard authored Jul 30, 2018
2 parents 350bfaf + 041b6c5 commit b058b29
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 87 deletions.
143 changes: 59 additions & 84 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,89 +1,64 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Folders with large amounts of data #
######################################
# the .gitignore file in /data ignores everything except the .gitignore file itself,
# so that the repo comes with the /data folder but not the data files.

/build
/dist
/urbanaccess.egg-info
/logs
/data
/configs
/docs/build
/demo/logs
/demo/data
/tests/logs
/tests/integration/data
/tests/integration/logs

# Test cache
.cache

# C extensions
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
*.pyc
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
*.sqlite

# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon
Thumbs.db
.tmtags
.idea
tags
vendor.tags
tmtagsHistory
*.sublime-project
*.sublime-workspace
.bundle
.ipynb_checkpoints
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: python
sudo: false
python:
- '2.7'
- '3.5'

install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh; fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda config --add channels udst
- conda config --add channels conda-forge
- |
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy pandas orca
- source activate test-environment
- conda list
- pip install git+https://github.com/UDST/orca_test.git
- pip install .

script:
- cd orca_test/tests/integration; python integration_orca_test.py
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Orca_test
=========

[![Build Status](https://travis-ci.org/UDST/orca_test.svg?branch=master)](https://travis-ci.org/UDST/orca_test)

This is a library of assertions about the characteristics of tables, columns, and injectables that are registered in [Orca](https://github.com/udst/orca).

The motivation is that [UrbanSim](https://github.com/udst/urbansim) model code expects particular tables and columns to be in place, and can fail unpredictably when data is not as expected (missing columns, NaNs, negative prices, log-of-zero). These failures are rare, but hard to debug, and can happen at any time because data is modified as models run.
Expand Down Expand Up @@ -115,7 +117,6 @@ For example, asserting that a column with values `[2, 3, 3, -1]` has `min = 0` w
## Development wish list
- Add support for specs expressed in YAML
- Write unit tests and set up in Travis
- Make compatible with python 3


## Sample YAML syntax (not yet implemented)
Expand Down
2 changes: 1 addition & 1 deletion orca_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from .orca_test import *

version = __version__ = '0.1dev'
version = __version__ = '0.1'
Empty file added orca_test/tests/__init__.py
Empty file.
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
install_requires=[
'numpy >= 1.0',
'pandas >= 0.12',
'orca >= 1.3.0',
'orca >= 1.3.0'
]
)

0 comments on commit b058b29

Please sign in to comment.