Skip to content

Commit

Permalink
Merge pull request #86 from yonran/fetch_data
Browse files Browse the repository at this point in the history
Fetch data
  • Loading branch information
fscottfoti authored Apr 10, 2017
2 parents 59d8fea + 6de20aa commit bf2a015
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion all.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# run a full package of scenarios

for num in [0, 1, 3, 4, 5]:
os.system('python run.py -s %d' % num)
os.system('python baus.py -s %d' % num)

with open('RUNNUM', 'r') as f:
runnum = f.readline()
Expand Down
1 change: 0 additions & 1 deletion baus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import argparse
import warnings
from baus.utils import compare_summary
from scripts.check_feedback import check_feedback

warnings.filterwarnings("ignore")

Expand Down
6 changes: 3 additions & 3 deletions baus/datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ def fetch_from_s3(settings):
s3_settings = settings["s3_settings"]

conn = boto.connect_s3()
bucket = conn.get_bucket(s3_settings["bucket"])
bucket = conn.get_bucket(s3_settings["bucket"], validate=False)

for file in s3_settings["files"]:
file = os.path.join("data", file)
if os.path.exists(file):
continue
print "Downloading " + file
key = bucket.get_key(file)
key = bucket.get_key(file, validate=False)
key.get_contents_to_filename(file)


Expand Down Expand Up @@ -362,7 +362,7 @@ def print_error_if_not_available(store, table):
if table not in store:
raise Exception(
"%s not found in store - you need to preprocess" % table +
" the data with:\n python run.py --mode preprocessing -c")
" the data with:\n python baus.py --mode preprocessing -c")
return store[table]


Expand Down
2 changes: 1 addition & 1 deletion features.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Run management

* Ability to run different model sets, output to Slack and web maps (in run.py)
* Ability to run different model sets, output to Slack and web maps (in baus.py)

## Standard (or extensions to) UrbanSim features

Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
-e git+https://github.com/synthicity/urbansim.git@151bfbf4272545fa0e20a458f1d552d3bfdf00fa#egg=urbansim
-e git+https://github.com/synthicity/urbansim_defaults.git@f7d9b8dcf7fde27314dcf80956b3470f3d88f5c6#egg=urbansim_defaults
-e git+https://github.com/UDST/orca.git@73f80f6345f282d8c836e8fcd11b22264cad0ac8#egg=orca
pandana
#-e git+https://github.com/UDST/pandana.git@8f24b8a1b7539c95b51153e9954f755a7116089b#egg=pandana
# using this version of anaconda http://repo.continuum.io/archive/Anaconda2-4.0.0-Linux-x86_64.sh
# to install:
# 1) get that anaconda and install
# 2) clone master (or release) of bayarea_urbansim
# 3) pip install -r requirements.txt
# run by calling `python run.py &`
# run by calling `python baus.py &`
boto

0 comments on commit bf2a015

Please sign in to comment.