Skip to content

Commit 350bfaf

Browse files
authored
Merge pull request #23 from UDST/prep-for-release
Prep for release v0.1
2 parents 3e3b3fc + c03c97d commit 350bfaf

File tree

5 files changed

+38
-436
lines changed

5 files changed

+38
-436
lines changed

LICENSE

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
Copyright (c) 2016, UrbanSim Inc. All rights reserved.
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2016, UrbanSim Inc.
4+
All rights reserved.
25

36
Redistribution and use in source and binary forms, with or without
47
modification, are permitted provided that the following conditions are met:
58

6-
1. Redistributions of source code must retain the above copyright notice, this
7-
list of conditions and the following disclaimer.
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
811

9-
2. Redistributions in binary form must reproduce the above copyright notice,
10-
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
1215

13-
3. Neither the name of the copyright holder nor the names of its contributors
14-
may be used to endorse or promote products derived from this software without
15-
specific prior written permission.
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
1619

17-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18-
ANY EXPRESS OR IMPLIED WARRANTIES, Inc.DING, BUT NOT LIMITED TO, THE IMPLIED
19-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2023
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21-
FOR ANY DIRECT, INDIRECT, Inc.ENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22-
DAMAGES (Inc.DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2326
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2427
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25-
OR TORT (Inc.DING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2629
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

development_tests.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
This is an informal set of tests for the various assertions.
77
88
"""
9+
10+
from __future__ import print_function
11+
912
import numpy as np
1013
import pandas as pd
1114

@@ -66,7 +69,7 @@ def bad_injectable():
6669

6770
TableSpec('buildings',
6871
ColumnSpec('building_id', primary_key=True),
69-
ColumnSpec('price1', numeric=True, missing_val=False, max=50),
72+
ColumnSpec('price1', numeric=True, missing=False, max=50),
7073
ColumnSpec('price2', missing_val_coding=np.nan, min=-5),
7174
ColumnSpec('price1', missing_val_coding=-1, max_portion_missing=0.5),
7275
ColumnSpec('fkey_good', foreign_key='zones.zone_id')),
@@ -93,25 +96,25 @@ def bad_injectable():
9396
# OrcaSpec('', TableSpec('buildings', ColumnSpec('badcol', can_be_generated=True))),
9497
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price1', primary_key=True))),
9598
# OrcaSpec('', TableSpec('buildings', ColumnSpec('strings', numeric=True))),
96-
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price2', missing_val=False))),
99+
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price2', missing=False))),
97100
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price1', max=25))),
98101
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price1', min=0))),
99102
# OrcaSpec('', TableSpec('buildings', ColumnSpec('price2', max_portion_missing=0.1))),
100-
OrcaSpec('', TableSpec('buildings', ColumnSpec('fkey_bad', foreign_key='zones.zone_id'))),
101-
OrcaSpec('', InjectableSpec('nonexistent', registered=True)),
102-
OrcaSpec('', InjectableSpec('rate', registered=False)),
103-
OrcaSpec('', InjectableSpec('bad_inj', can_be_generated=True)),
104-
OrcaSpec('', InjectableSpec('dict', numeric=True)),
105-
OrcaSpec('', InjectableSpec('rate', greater_than=5)),
106-
OrcaSpec('', InjectableSpec('rate', less_than=-5)),
107-
OrcaSpec('', InjectableSpec('rate', has_key='Berkeley')),
108-
OrcaSpec('', InjectableSpec('dict', has_key='Oakland')),
103+
# OrcaSpec('', TableSpec('buildings', ColumnSpec('fkey_bad', foreign_key='zones.zone_id'))),
104+
# OrcaSpec('', InjectableSpec('nonexistent', registered=True)),
105+
# OrcaSpec('', InjectableSpec('rate', registered=False)),
106+
# OrcaSpec('', InjectableSpec('bad_inj', can_be_generated=True)),
107+
# OrcaSpec('', InjectableSpec('dict', numeric=True)),
108+
# OrcaSpec('', InjectableSpec('rate', greater_than=5)),
109+
# OrcaSpec('', InjectableSpec('rate', less_than=-5)),
110+
# OrcaSpec('', InjectableSpec('rate', has_key='Berkeley')),
111+
# OrcaSpec('', InjectableSpec('dict', has_key='Oakland')),
109112
]
110113

111114
for bs in bad_specs:
112115
try:
113116
ot.assert_orca_spec(bs)
114117
except OrcaAssertionError as e:
115-
print "OrcaAssertionError: " + str(e)
118+
print("OrcaAssertionError: " + str(e))
116119
pass
117120

0 commit comments

Comments
 (0)