Skip to content

Commit b058b29

Browse files
authored
Merge pull request #24 from UDST/support-travis
Support travis
2 parents 350bfaf + 041b6c5 commit b058b29

File tree

8 files changed

+90
-87
lines changed

8 files changed

+90
-87
lines changed

.gitignore

Lines changed: 59 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,64 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
1+
# Folders with large amounts of data #
2+
######################################
3+
# the .gitignore file in /data ignores everything except the .gitignore file itself,
4+
# so that the repo comes with the /data folder but not the data files.
5+
6+
/build
7+
/dist
8+
/urbanaccess.egg-info
9+
/logs
10+
/data
11+
/configs
12+
/docs/build
13+
/demo/logs
14+
/demo/data
15+
/tests/logs
16+
/tests/integration/data
17+
/tests/integration/logs
18+
19+
# Test cache
20+
.cache
521

6-
# C extensions
22+
# Compiled source #
23+
###################
24+
*.com
25+
*.class
26+
*.dll
27+
*.exe
28+
*.o
729
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
14-
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
*.egg-info/
24-
.installed.cfg
25-
*.egg
26-
27-
# PyInstaller
28-
# Usually these files are written by a python script from a template
29-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30-
*.manifest
31-
*.spec
32-
33-
# Installer logs
34-
pip-log.txt
35-
pip-delete-this-directory.txt
36-
37-
# Unit test / coverage reports
38-
htmlcov/
39-
.tox/
30+
*.pyc
4031
.coverage
41-
.coverage.*
42-
.cache
43-
nosetests.xml
44-
coverage.xml
45-
*,cover
46-
.hypothesis/
47-
48-
# Translations
49-
*.mo
50-
*.pot
5132

52-
# Django stuff:
33+
# Packages #
34+
############
35+
# it's better to unpack these files and commit the raw source
36+
# git has its own built in compression methods
37+
*.7z
38+
*.dmg
39+
*.gz
40+
*.iso
41+
*.rar
42+
*.tar
43+
*.zip
44+
45+
# Logs and databases #
46+
######################
5347
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
62-
63-
# Sphinx documentation
64-
docs/_build/
65-
66-
# PyBuilder
67-
target/
68-
69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
74-
75-
# celery beat schedule file
76-
celerybeat-schedule
77-
78-
# dotenv
79-
.env
80-
81-
# virtualenv
82-
venv/
83-
ENV/
84-
85-
# Spyder project settings
86-
.spyderproject
87-
88-
# Rope project settings
89-
.ropeproject
48+
*.sqlite
49+
50+
# OS generated files #
51+
######################
52+
.DS_Store
53+
ehthumbs.db
54+
Icon
55+
Thumbs.db
56+
.tmtags
57+
.idea
58+
tags
59+
vendor.tags
60+
tmtagsHistory
61+
*.sublime-project
62+
*.sublime-workspace
63+
.bundle
64+
.ipynb_checkpoints

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: python
2+
sudo: false
3+
python:
4+
- '2.7'
5+
- '3.5'
6+
7+
install:
8+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
9+
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
10+
-O miniconda.sh; fi
11+
- bash miniconda.sh -b -p $HOME/miniconda
12+
- export PATH="$HOME/miniconda/bin:$PATH"
13+
- hash -r
14+
- conda config --set always_yes yes --set changeps1 no
15+
- conda update -q conda
16+
- conda info -a
17+
- conda config --add channels udst
18+
- conda config --add channels conda-forge
19+
- |
20+
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy pandas orca
21+
- source activate test-environment
22+
- conda list
23+
- pip install git+https://github.com/UDST/orca_test.git
24+
- pip install .
25+
26+
script:
27+
- cd orca_test/tests/integration; python integration_orca_test.py

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Orca_test
22
=========
33

4+
[![Build Status](https://travis-ci.org/UDST/orca_test.svg?branch=master)](https://travis-ci.org/UDST/orca_test)
5+
46
This is a library of assertions about the characteristics of tables, columns, and injectables that are registered in [Orca](https://github.com/udst/orca).
57

68
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.
@@ -115,7 +117,6 @@ For example, asserting that a column with values `[2, 3, 3, -1]` has `min = 0` w
115117
## Development wish list
116118
- Add support for specs expressed in YAML
117119
- Write unit tests and set up in Travis
118-
- Make compatible with python 3
119120

120121

121122
## Sample YAML syntax (not yet implemented)

orca_test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
from .orca_test import *
66

7-
version = __version__ = '0.1dev'
7+
version = __version__ = '0.1'

orca_test/tests/__init__.py

Whitespace-only changes.

orca_test/tests/integration/__init__.py

Whitespace-only changes.

development_tests.py renamed to orca_test/tests/integration/integration_orca_test.py

File renamed without changes.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
install_requires=[
1919
'numpy >= 1.0',
2020
'pandas >= 0.12',
21-
'orca >= 1.3.0',
21+
'orca >= 1.3.0'
2222
]
2323
)

0 commit comments

Comments
 (0)