Skip to content

Conversation

@alephcero
Copy link

Main changes for Python 3

  • Because of formulas evaluation on text columns like pda_id > 0 when pda_id was a text, the columns was change using notnull() method on that column.
  • print() statements
  • Change zip() to list(zip()) as zip behavior changes
  • Change iteritems() method for items() in dict types
  • Encoding latin1 because of utf8 errors in building names in development_projects.csv
  • Replacing StringIO to io`
  • Add sys.path.append('baus') in models.py as module baus was not loading
  • Adding reduce import from functools import reduce because import error was happening in this line

In urbansim_defaults :

  • Change iteritems() method for items() in dict types
  • Change sorting to sort_values(by=)

Installation and use

  • conda create --name mtc-env3 python=3 numpy scipy==1.2 pandas geopandas scikit-learn
  • conda activate mtc-env3
  • git clone https://github.com/urbansim/bayarea_urbansim.git
  • git checkout python3
  • Copy large data files to data/
  • conda config --add channels udst
  • conda config --add channels conda-forge
  • conda install pandana=0.3 --channel udst
  • pip install -r requirements.txt
  • Preprocess data before simulate: python baus.py -c --mode preprocessing
  • python baus.py -c

jessicacamacho and others added 21 commits May 29, 2019 17:55
change in requirements.txt to port to python3
change in print statements for python3 compliance
print statements for python3 compliance
change in print statements to python3 compliance
change in print statements for python3 compliance
change in urbansim_default repo in requirements.txt
add latin1 encoding because of utf8 error in pyhon 3
comments to subsidies code and momentarily skipping checks in validation
change iteritems() to items() for python3 compliance
change iteritems() for items() for python3 compliance
some print statements for testing in vm
test printing
printing test
test printing
test printing
test printing
change zip() to list(zip()) as zip behaviour changes in python3
validation checks enabled
remove of debug prints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants