From fc26c66b6c9100dd5ecd311e480e0b513f8e4315 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 7 Oct 2019 13:29:51 -0700 Subject: [PATCH 01/13] Removing size-specific int dtype --- baus/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/baus/models.py b/baus/models.py index 1bf6a7e38..a908c6a8f 100644 --- a/baus/models.py +++ b/baus/models.py @@ -337,8 +337,7 @@ def household_relocation(households, household_relocation_rates, # set households that are moving to a building_id of -1 (means unplaced) households.update_col_from_series("building_id", - pd.Series(-1, - index=index).astype('int32')) + pd.Series(-1, index=index)) # this deviates from the step in urbansim_defaults only in how it deals with From 511c01dd5b40bbfa2de1edde238433c29c850e87 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 8 Oct 2019 12:37:17 -0700 Subject: [PATCH 02/13] Bug fix for slr summaries --- baus/summaries.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/baus/summaries.py b/baus/summaries.py index fac3cb7e3..af5f6d070 100644 --- a/baus/summaries.py +++ b/baus/summaries.py @@ -91,8 +91,9 @@ def write(s): else: write("There is no sea level rise in this scenario") # mitigation - slr_mitigation = orca.get_injectable("slr_mitigation") - write("Sea level rise mitigation is %s" % slr_mitigation) + if scenario in settings["slr_scenarios"]["enable_in"]: + slr_mitigation = orca.get_injectable("slr_mitigation") + write("Sea level rise mitigation is %s" % slr_mitigation) write("") # earthquake From ac2855b97249e55693eb376fd888fe5ae3decf2b Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 8 Oct 2019 15:17:40 -0700 Subject: [PATCH 03/13] Better stringio fix --- baus/subsidies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baus/subsidies.py b/baus/subsidies.py index 3f36ac828..4b03f3f2c 100644 --- a/baus/subsidies.py +++ b/baus/subsidies.py @@ -8,7 +8,7 @@ from functools import reduce from urbansim import accounts from urbansim_defaults import utils -from io import StringIO +from six import StringIO from urbansim.utils import misc from baus.utils import add_buildings from urbansim.developer import sqftproforma From 438ce15ce83aa4aa3bf037cfd5055da35e567b50 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Wed, 9 Oct 2019 09:16:33 -0700 Subject: [PATCH 04/13] Cleaner subsidy filters --- configs/settings.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/settings.yaml b/configs/settings.yaml index cc55748d6..881912aab 100644 --- a/configs/settings.yaml +++ b/configs/settings.yaml @@ -1085,8 +1085,8 @@ acct_settings: name: "OBAG" sending_buildings_subaccount_def: regional total_amount: 40000000 - receiving_buildings_filter: pda_id > 0 - alternate_buildings_filter: trich_id > 0 | cat_id > 0 + receiving_buildings_filter: pda_id != '' + alternate_buildings_filter: trich_id != '' | cat_id != '' subsidize_affordable: False enable_in_scenarios: ["1", "2", "3", "4", "5", "6", "7", "10", "11", "12", "15"] alternate_geography_scenarios: ["11", "12", "15"] @@ -1173,7 +1173,7 @@ acct_settings: name: "Parcel Tax" sending_buildings_subaccount_def: regional total_amount: 500000000 - receiving_buildings_filter: pda_id > 0 + receiving_buildings_filter: pda_id != '' subsidize_affordable: True enable_in_scenarios: [] @@ -1183,7 +1183,7 @@ acct_settings: name: "Capital Gains Tax" sending_buildings_subaccount_def: regional total_amount: 42000000 - receiving_buildings_filter: pda_id > 0 + receiving_buildings_filter: pda_id != '' subsidize_affordable: True enable_in_scenarios: [] @@ -1196,9 +1196,9 @@ acct_settings: name: "CEQA" enable_in_scenarios: ["1", "2", "3", "4", "5", "6", "7", "10", "11", "12", "15"] # any parcel in a tpa - profitability_adjustment_formula: "(tpp_id > 0) * .01" + profitability_adjustment_formula: "(tpp_id != '') * .01" alternate_geography_scenarios: ["11", "12", "15"] - alternate_adjustment_formula: "(trich_id > 0 | cat_id > 0) * .01" + alternate_adjustment_formula: "(trich_id != '' | cat_id != '') * .01" # reduce parking requirements in TPPs - would be nice to have better data # on how this impacts price as well, but we don't have it @@ -1206,15 +1206,15 @@ acct_settings: name: "Reduce Parking Requirements in TPPs" enable_in_scenarios: ["3"] # any parcel in a tpa - profitability_adjustment_formula: "(tpp_id > 0) * .01" + profitability_adjustment_formula: "(tpp_id != '') * .01" parking_requirements_pdas: name: "Reduce Parking Requirements in PDAs" enable_in_scenarios: ["1", "2", "4", "5", "6", "7", "10", "11", "12", "15"] # any parcel in a tpa - profitability_adjustment_formula: "(pda_id > 0) * .01" + profitability_adjustment_formula: "(pda_id != '') * .01" alternate_geography_scenarios: ["11", "12", "15"] - alternate_adjustment_formula: "(trich_id > 0 | cat_id > 0) * .01" + alternate_adjustment_formula: "(trich_id != '' | cat_id != '') * .01" parking_requirements_AVs_s1: # cag name: "Reduce Parking Requirements due to AVs- CAG" @@ -1246,8 +1246,8 @@ acct_settings: # com for com or com for res. vmt_settings: sending_buildings_subaccount_def: regional - receiving_buildings_filter: pda_id>0 - alternate_buildings_filter: trich_id > 0 | cat_id > 0 + receiving_buildings_filter: pda_id != '' + alternate_buildings_filter: trich_id != '' | cat_id != '' alternate_geography_scenarios: ["11", "12", "15"] res_for_res_scenarios: - "3" From 49d77f72bcb80c3fe51770e0e869403ad6f7a563 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 14 Oct 2019 10:25:53 -0700 Subject: [PATCH 05/13] Updating setup requirements --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 13b53f883..2fd25e651 100644 --- a/setup.py +++ b/setup.py @@ -9,10 +9,17 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: BSD License' ], packages=find_packages(exclude=['*.tests']), install_requires=[ - 'boto' + 'numpy', + 'orca', + 'pandana', + 'pandas', + 'urbansim', + 'urbansim_defaults' ] ) From 71d37ef39502d19c0470c8500b2563993c65de2f Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 14 Oct 2019 10:59:25 -0700 Subject: [PATCH 06/13] Archiving and updating requirements --- requirements.txt => requirements-2017.txt | 2 ++ requirements-2019.txt | 11 +++++++++++ 2 files changed, 13 insertions(+) rename requirements.txt => requirements-2017.txt (95%) create mode 100644 requirements-2019.txt diff --git a/requirements.txt b/requirements-2017.txt similarity index 95% rename from requirements.txt rename to requirements-2017.txt index 8bd415fe3..922ab5249 100644 --- a/requirements.txt +++ b/requirements-2017.txt @@ -1,3 +1,5 @@ +# Archived environment from 2017 + -e git+https://github.com/synthicity/urbansim.git@286e61049ac1e67c7e7a9eec8acecea704b1a332#egg=urbansim -e git+https://github.com/synthicity/urbansim_defaults.git@8c95c2a10c5d0bcd1a470a3b636b47d8824e1254#egg=urbansim_defaults -e git+https://github.com/UDST/orca.git@f49398e2a363f8869e14b5218640d8d9c13863a4#egg=orca diff --git a/requirements-2019.txt b/requirements-2019.txt new file mode 100644 index 000000000..c80fb0c32 --- /dev/null +++ b/requirements-2019.txt @@ -0,0 +1,11 @@ +# This environment pins requirements at their latest release as of 10-14-2019 + +# Install with: pip install -r requirements-2019.txt + +numpy=1.17.2 +pandas=0.25.1 + +orca=1.5.1 +pandana=0.4.4 +urbansim=3.1.1 +urbansim_defaults=0.2 \ No newline at end of file From 0b5c0061c8d2f55aaa9d0f2f5e4dd66d0bea6fba Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 14 Oct 2019 11:39:24 -0700 Subject: [PATCH 07/13] Pycodestyle fixes --- baus/datasources.py | 4 ++-- baus/output_csv_utils.py | 24 ++++++++++++------------ baus/summaries.py | 22 +++++++++++----------- baus/utils.py | 2 +- scripts/average_runs.py | 1 + scripts/filter_large_projects.py | 1 + scripts/fix_zoning_missing_id.py | 1 + scripts/match_city_totals.py | 7 ++++--- 8 files changed, 33 insertions(+), 29 deletions(-) diff --git a/baus/datasources.py b/baus/datasources.py index 8e76fc528..055efabf6 100644 --- a/baus/datasources.py +++ b/baus/datasources.py @@ -21,7 +21,7 @@ def year(): try: return orca.get_injectable("iter_var") - except: + except Exception as e: pass # if we're not running simulation, return base year return 2014 @@ -531,7 +531,7 @@ def get_logsum_file(type='mandatory'): else: return orca.get_injectable('previous_{}_logsum_file' .format(type)) - except: + except Exception as e: if 'logsum' in logsums: ls = logsums['logsum'] ls_type = 'generic' diff --git a/baus/output_csv_utils.py b/baus/output_csv_utils.py index 84a36e79b..d0ca8ba06 100644 --- a/baus/output_csv_utils.py +++ b/baus/output_csv_utils.py @@ -223,15 +223,15 @@ def compare_outcome_for(variable, runs, set_geography): def subtract_base_year_urban_footprint(run_number): - base_year_filename = \ - 'runs/run{}_urban_footprint_summary_summaries_{}.csv'.\ - format(run_number, 2010) - bdf = pd.read_csv(base_year_filename, index_col=0) - outcome_year_filename = \ - 'runs/run{}_urban_footprint_summary_summaries_{}.csv'.\ - format(run_number, 2040) - odf = pd.read_csv(outcome_year_filename, index_col=0) - sdf = odf - bdf - sdf.to_csv( - 'runs/run{}_urban_footprint_subtracted_summaries_{}.csv' - .format(run_number, 2040)) + base_year_filename = \ + 'runs/run{}_urban_footprint_summary_summaries_{}.csv'.\ + format(run_number, 2010) + bdf = pd.read_csv(base_year_filename, index_col=0) + outcome_year_filename = \ + 'runs/run{}_urban_footprint_summary_summaries_{}.csv'.\ + format(run_number, 2040) + odf = pd.read_csv(outcome_year_filename, index_col=0) + sdf = odf - bdf + sdf.to_csv( + 'runs/run{}_urban_footprint_subtracted_summaries_{}.csv' + .format(run_number, 2040)) diff --git a/baus/summaries.py b/baus/summaries.py index af5f6d070..94d7ba1e3 100644 --- a/baus/summaries.py +++ b/baus/summaries.py @@ -252,10 +252,10 @@ def policy_activated(policy_loc, policy, scenario): counties = ["alameda", "contra_costa", "marin", "napa", "san_mateo", "san_francisco", "santa_clara", "solano", "sonoma"] for county in counties: - policy_loc = (settings["acct_settings"]["lump_sum_accounts"] - [county+"_bond_settings"]["enable_in_scenarios"]) - if scenario in policy_loc: - counter += 1 + policy_loc = (settings["acct_settings"]["lump_sum_accounts"] + [county+"_bond_settings"]["enable_in_scenarios"]) + if scenario in policy_loc: + counter += 1 write("Affordable housing bonds are activated for %d counties" % counter) # workplace preferences are in the development projects list @@ -325,7 +325,7 @@ def topsheet(households, jobs, buildings, parcels, zones, year, try: base_year_measures = orca.get_injectable("base_year_measures") - except: + except Exception as e: # the base year measures don't exist - we didn't run year 2010 # this can happen when we skip the first year, usually because # we don't want to waste time doing so @@ -513,7 +513,7 @@ def compare_to_targets(parcels, buildings, jobs, households, abag_targets, # compute correlection for pda and juris, for households and for jobs - l = [] + li = [] df = pd.DataFrame() @@ -537,7 +537,7 @@ def compare_to_targets(parcels, buildings, jobs, households, abag_targets, assert len(abag_distribution) == len(baus_distribution) - l.append((geo, typ, abag_distribution.corr(baus_distribution))) + li.append((geo, typ, abag_distribution.corr(baus_distribution))) if write_comparison_dfs: @@ -547,7 +547,7 @@ def compare_to_targets(parcels, buildings, jobs, households, abag_targets, df.to_csv(os.path.join("runs", "run%d_targets_comparison_%d.csv" % (run_number, year))) - return l + return li @orca.step() @@ -1751,7 +1751,7 @@ def write(s): try: slr_demolish_cum = orca.get_table("slr_demolish_cum").to_frame() - except: + except Exception as e: slr_demolish_cum = pd.DataFrame() slr_demolish = orca.get_table("slr_demolish").to_frame() slr_demolish_cum = slr_demolish.append(slr_demolish_cum) @@ -1766,7 +1766,7 @@ def write(s): try: hh_unplaced_slr_cum = \ orca.get_table("hh_unplaced_slr_cum").to_frame() - except: + except Exception as e: hh_unplaced_slr_cum = pd.DataFrame() hh_unplaced_slr = orca.get_injectable("hh_unplaced_slr") hh_unplaced_slr_cum = hh_unplaced_slr.append(hh_unplaced_slr_cum) @@ -1790,7 +1790,7 @@ def write(s): try: jobs_unplaced_slr_cum = \ orca.get_table("jobs_unplaced_slr_cum").to_frame() - except: + except Exception as e: jobs_unplaced_slr_cum = pd.DataFrame() jobs_unplaced_slr = orca.get_injectable("jobs_unplaced_slr") jobs_unplaced_slr_cum = jobs_unplaced_slr.append(jobs_unplaced_slr_cum) diff --git a/baus/utils.py b/baus/utils.py index aa592757d..750ba5bf1 100644 --- a/baus/utils.py +++ b/baus/utils.py @@ -48,7 +48,7 @@ def save_and_restore_state(in_d, outhdf="save_state.h5"): for table_name, table in in_d.items(): try: table = table.local - except: + except Exception as e: # not a dataframe wrapper continue print("Saving", table_name) diff --git a/scripts/average_runs.py b/scripts/average_runs.py index 3f0596f28..480d8fbfc 100644 --- a/scripts/average_runs.py +++ b/scripts/average_runs.py @@ -48,6 +48,7 @@ def variability_measure(dfs, N, M): average_dfs.mean() * 100 return pct_diff.unstack().fillna(0).quantile(.95) + dfs = get_2040_taz_summaries(run_nums) print "Total sims = {}".format(len(dfs)) diff --git a/scripts/filter_large_projects.py b/scripts/filter_large_projects.py index 530525668..dcdf6cd6f 100644 --- a/scripts/filter_large_projects.py +++ b/scripts/filter_large_projects.py @@ -9,6 +9,7 @@ def readfile(year): return pd.read_csv(fname, low_memory=False) \ if os.path.isfile(fname) else pd.DataFrame() + df = pd.concat([ readfile(runnum) for runnum in range(1338, 1344) diff --git a/scripts/fix_zoning_missing_id.py b/scripts/fix_zoning_missing_id.py index f9c060b0f..872edc811 100644 --- a/scripts/fix_zoning_missing_id.py +++ b/scripts/fix_zoning_missing_id.py @@ -14,6 +14,7 @@ def zcsv(): index_col="geom_id") return df + zb = orca.get_table("zoning_baseline") zl = orca.get_table("zoning_lookup") z = orca.get_table("zcsv") diff --git a/scripts/match_city_totals.py b/scripts/match_city_totals.py index 360881861..5fb3ee9b0 100644 --- a/scripts/match_city_totals.py +++ b/scripts/match_city_totals.py @@ -55,7 +55,7 @@ size=value, replace=False) for juris, value in overfull.iteritems()]) -print (diff - households_df.loc[hh_ids].juris.value_counts()).describe() +print(diff - households_df.loc[hh_ids].juris.value_counts()).describe() # unplaced movers = households_df[households_df.building_id == -1].index @@ -74,6 +74,7 @@ def make_city_list(overfull): move_hhs = move_hhs.sample(len(move_hhs)) # random reorder return move_hhs + juris_destinations = make_city_list(underfull) building_destinations = [ np.random.choice(buildings_ids_by_juris.loc[d]) @@ -109,5 +110,5 @@ def make_city_list(overfull): print diff[diff > 0].sum() print diff[diff < 0].sum() -print (households_df.zone_id.value_counts() - - orig_zone_id_counts).describe() +print(households_df.zone_id.value_counts() - + orig_zone_id_counts).describe() From 697d1d940a27d6182417d0bdf3516635518b50af Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 14 Oct 2019 11:39:52 -0700 Subject: [PATCH 08/13] Travis script cleanup --- .travis.yml | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa88ef42d..1379c5927 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,18 @@ language: python -sudo: false + python: -- '2.7' + - '2.7' + - '3.6' + 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 -# Useful for debugging any issues with conda -- conda info -a -# don't think we need all these packages, but copying from urbansim -- > - conda create -q -c synthicity -n test-environment - python=$TRAVIS_PYTHON_VERSION - cytoolz ipython-notebook jinja2 matplotlib numpy pandas patsy pip scipy - statsmodels pytables pytest pyyaml pandana -- source activate test-environment -- pip install pep8 -- pip install -r requirements.txt + - pip install . # baus and requirements + - pip install coverage pycodestyle pytest # testing tools + - pip list + script: -- pep8 baus -- pep8 scripts -- py.test baus + - pycodestyle baus + - pycodestyle scripts + - coverage run --source baus --module pytest --verbose + +after_success: + - coverage report From e7f7876ae875dde569dd171f8adda3e2e26c2c4c Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 21 Oct 2019 11:05:54 -0700 Subject: [PATCH 09/13] Updating to pda_id > '' --- configs/settings.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/settings.yaml b/configs/settings.yaml index 881912aab..317329c1a 100644 --- a/configs/settings.yaml +++ b/configs/settings.yaml @@ -1085,8 +1085,8 @@ acct_settings: name: "OBAG" sending_buildings_subaccount_def: regional total_amount: 40000000 - receiving_buildings_filter: pda_id != '' - alternate_buildings_filter: trich_id != '' | cat_id != '' + receiving_buildings_filter: pda_id > '' + alternate_buildings_filter: trich_id > '' | cat_id > '' subsidize_affordable: False enable_in_scenarios: ["1", "2", "3", "4", "5", "6", "7", "10", "11", "12", "15"] alternate_geography_scenarios: ["11", "12", "15"] @@ -1173,7 +1173,7 @@ acct_settings: name: "Parcel Tax" sending_buildings_subaccount_def: regional total_amount: 500000000 - receiving_buildings_filter: pda_id != '' + receiving_buildings_filter: pda_id > '' subsidize_affordable: True enable_in_scenarios: [] @@ -1183,7 +1183,7 @@ acct_settings: name: "Capital Gains Tax" sending_buildings_subaccount_def: regional total_amount: 42000000 - receiving_buildings_filter: pda_id != '' + receiving_buildings_filter: pda_id > '' subsidize_affordable: True enable_in_scenarios: [] @@ -1196,9 +1196,9 @@ acct_settings: name: "CEQA" enable_in_scenarios: ["1", "2", "3", "4", "5", "6", "7", "10", "11", "12", "15"] # any parcel in a tpa - profitability_adjustment_formula: "(tpp_id != '') * .01" + profitability_adjustment_formula: "(tpp_id > '') * .01" alternate_geography_scenarios: ["11", "12", "15"] - alternate_adjustment_formula: "(trich_id != '' | cat_id != '') * .01" + alternate_adjustment_formula: "(trich_id > '' | cat_id > '') * .01" # reduce parking requirements in TPPs - would be nice to have better data # on how this impacts price as well, but we don't have it @@ -1206,15 +1206,15 @@ acct_settings: name: "Reduce Parking Requirements in TPPs" enable_in_scenarios: ["3"] # any parcel in a tpa - profitability_adjustment_formula: "(tpp_id != '') * .01" + profitability_adjustment_formula: "(tpp_id > '') * .01" parking_requirements_pdas: name: "Reduce Parking Requirements in PDAs" enable_in_scenarios: ["1", "2", "4", "5", "6", "7", "10", "11", "12", "15"] # any parcel in a tpa - profitability_adjustment_formula: "(pda_id != '') * .01" + profitability_adjustment_formula: "(pda_id > '') * .01" alternate_geography_scenarios: ["11", "12", "15"] - alternate_adjustment_formula: "(trich_id != '' | cat_id != '') * .01" + alternate_adjustment_formula: "(trich_id > '' | cat_id > '') * .01" parking_requirements_AVs_s1: # cag name: "Reduce Parking Requirements due to AVs- CAG" @@ -1246,8 +1246,8 @@ acct_settings: # com for com or com for res. vmt_settings: sending_buildings_subaccount_def: regional - receiving_buildings_filter: pda_id != '' - alternate_buildings_filter: trich_id != '' | cat_id != '' + receiving_buildings_filter: pda_id > '' + alternate_buildings_filter: trich_id > '' | cat_id > '' alternate_geography_scenarios: ["11", "12", "15"] res_for_res_scenarios: - "3" From 9fcf8297e218ec460c48a107fd3dadd059b61761 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 22 Oct 2019 10:06:42 -0700 Subject: [PATCH 10/13] Random seed off by default --- baus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baus.py b/baus.py index 4bdb732f8..a86c95461 100644 --- a/baus.py +++ b/baus.py @@ -24,7 +24,7 @@ SLACK = MAPS = "URBANSIM_SLACK" in os.environ LOGS = True -RANDOM_SEED = True +RANDOM_SEED = False INTERACT = False SCENARIO = None MODE = "simulation" From 8264298e150329020d11cf6c276ff771d14b11c1 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Wed, 23 Oct 2019 11:11:11 -0700 Subject: [PATCH 11/13] Clearer requirements file --- requirements-2019.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements-2019.txt b/requirements-2019.txt index c80fb0c32..d319089f7 100644 --- a/requirements-2019.txt +++ b/requirements-2019.txt @@ -1,11 +1,11 @@ -# This environment pins requirements at their latest release as of 10-14-2019 +# This environment pins requirements at their versions as of 10-2019 # Install with: pip install -r requirements-2019.txt -numpy=1.17.2 -pandas=0.25.1 +numpy == 1.17.* +pandas == 0.25.* -orca=1.5.1 -pandana=0.4.4 -urbansim=3.1.1 -urbansim_defaults=0.2 \ No newline at end of file +orca == 1.5.* +pandana == 0.4.* +urbansim == 3.1.* +urbansim_defaults == 0.2.* From 2285f01b079842f4ae0d35c362519e2d3a1df83b Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Wed, 23 Oct 2019 12:22:29 -0700 Subject: [PATCH 12/13] Older pandana --- requirements-2019.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-2019.txt b/requirements-2019.txt index d319089f7..055b820a9 100644 --- a/requirements-2019.txt +++ b/requirements-2019.txt @@ -6,6 +6,7 @@ numpy == 1.17.* pandas == 0.25.* orca == 1.5.* -pandana == 0.4.* +orca_test == 0.1.* +pandana == 0.3.* urbansim == 3.1.* urbansim_defaults == 0.2.* From 7336acff86a2702bbf319380b582ac2925402506 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Sun, 23 Feb 2020 21:50:53 -0800 Subject: [PATCH 13/13] Fixing statsmodels problem in travis script --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1379c5927..db2439fb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,14 @@ python: - '2.7' - '3.6' +# The Statsmodels line is to resolve a hopefully temporary problem -- +# Statsmodels 0.11 dropped support for Python 2.7, but as of 2020-02-23 is +# being installed anyway by PyPI in Python 2.7 environments. If this isn't +# fixed upstream, the best place to address it is in UrbanSim itself, where we +# can make the Statsmodels version conditional on the Python version. + install: + - pip install statsmodels==0.10.* # see comment above - pip install . # baus and requirements - pip install coverage pycodestyle pytest # testing tools - pip list