From 8f45f0f2f99986e3ff102a1296acc3998adb86d3 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 1 May 2020 16:31:44 -0700 Subject: [PATCH 01/20] Updating license --- LICENSE => LICENSE.txt | 2 +- MANIFEST.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename LICENSE => LICENSE.txt (96%) diff --git a/LICENSE b/LICENSE.txt similarity index 96% rename from LICENSE rename to LICENSE.txt index da52c471..c6b9d706 100644 --- a/LICENSE +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2016, UrbanSim, Inc. All rights reserved. +Copyright (c) 2020, UrbanSim, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/MANIFEST.in b/MANIFEST.in index cafbd94a..97e2ad3d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include ez_setup.py +include LICENSE.txt include README.rst From 54e1c6e3a570d4084c1c46324cced19f632508c2 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 21:58:03 -0700 Subject: [PATCH 02/20] Draft changes to readme --- README.rst | 104 +++++++++-------------------------------------------- 1 file changed, 16 insertions(+), 88 deletions(-) diff --git a/README.rst b/README.rst index 975d1123..91da0275 100644 --- a/README.rst +++ b/README.rst @@ -1,105 +1,33 @@ UrbanSim ======== +.. image:: https://img.shields.io/pypi/v/urbansim.svg + :target: https://pypi.python.org/pypi/urbansim/ + :alt: Latest Version + .. image:: https://travis-ci.org/UDST/urbansim.svg?branch=master - :alt: Build Status (Linux) + :alt: Build Status :target: https://travis-ci.org/UDST/urbansim - -.. image:: https://ci.appveyor.com/api/projects/status/0ygo756020jpcrg3?svg=true - :alt: Build Status (Windows) - :target: https://ci.appveyor.com/project/pksohn/urbansim - - -.. image:: https://coveralls.io/repos/UDST/urbansim/badge.png?branch=master +.. image:: https://coveralls.io/repos/UDST/urbansim/badge.svg?branch=master :alt: Test Coverage :target: https://coveralls.io/r/UDST/urbansim?branch=master -New version of UrbanSim, a tool for modeling metropolitan real estate -markets - -.. image:: http://i.imgur.com/4YyN8ob.jpg - :alt: UrbanSim - -`Detailed documentation `__ for -UrbanSim is now available. - -`Click -here `__ -for installation instructions. - -Let us know what you are working on or if you think you have a great use case -by tweeting us at ``@urbansim`` or post on the UrbanSim `forum`_. - -UrbanSim History ----------------- - -UrbanSim (http://www.urbansim.com) is a model system for analyzing -urban development. It is an open source platform that has been -continuously refined and distributed for planning applications around -the world for over 15 years. Part of the evolution of the platform is -the necessary process of re-engineering the code to take advantage of -new developments in computational libraries and infrastructure. We -implemented UrbanSim initially in Java in the late 1990's, and by 2005 -determined that it was time to re-implement it in Python, and created -the Open Platform for Urban Simulation (OPUS) software implementation at -that time. Now, almost a decade later, it is time again to revisit the -implementation to take advantage of an amazing amount of innovation in -the scientific computing community. The new implementation is hosted on -this GitHub site, and maintained by UrbanSim Inc. and a growing -community of contributors. - -New UrbanSim Implementation ---------------------------- - -This new code base is a streamlined complete re-implementation of the -longstanding UrbanSim project aimed at *reducing the complexity* of -using the UrbanSim methodology. Redesigned from the ground up, the new -library is trivial to install, the development process is made -transparent via this GitHub site, and exhaustive documentation has been -created in the hopes of making modeling much more widely accessible to -planners and new modelers. - -We lean heavily on the `PyData `__ community to make -our work easier - Pandas, `IPython `__, and -`statsmodels `__ are ubiquitous in -this work. These Python libraries essentially replace the UrbanSim -Dataset class, tools to read and write from other storage, and some of -the statistical estimation previously implemented by UrbanSim. - -This makes our task easier as we can focus on urban modeling and leave -the infrastructure to the wider Python community. The -`Pandas `__ library is the core of the new -UrbanSim, which is an extremely popular data manipulation library with a -large community providing support and a very helpful -`book `__. - -We have now converted a full set of UrbanSim models to the new -framework, and have running applications for the Paris, Albuquerque, -Denver, Bay Area, and Detroit regions. We have implemented a complete -set of hedonic price models, location choice models, relocation and -transition models, as well as a new real estate development model using -proforma analysis. +UrbanSim is a platform for building statistical models of cities and regions. These models help forecast long-range patterns in real estate development, demographics, and related outcomes, under various policy scenarios. -We do strongly recommend that you contact the team at www.urbansim.com about your -project to make sure you can get support when you need it, -and know what you are getting into. For major applied projects, -professional support is highly recommended. +This UrbanSim *Python library* is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. -Reporting bugs and contributing to UrbanSim --------------------------------------------- +Operational UrbanSim models begin with detailed data about a particular region, and then estimate and validate a system of interconnected model components. Full models draw on a number of libraries: not just ``urbansim``, but also Orca for task orchestration, Synthpop for population synthesis, Pandana for network analysis, Developer for real estate logic, and so on. Collectively, these make up the `Urban Data Science Toolkit `__ (UDST). -Please report any bugs you encounter via `GitHub Issues `__. +UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by UrbanSim Inc. -If you have improvements or new features you would like to see in UrbanSim: +Learn More +---------- -1. Open a feature request via `GitHub Issues `__. -2. See our code contribution instructions `here `__. -3. Contribute your code from a fork or branch by using a Pull Request and request a review so it can be considered as an addition to the codebase. +* `An Introduction to UrbanSim `__ -Academic literature -------------------- +* `Documentation `__ for the ``urbansim`` Python library -A selection of academic literature on UrbanSim can be found `here `_. +* `UrbanSim for San Francisco: An example implementation `__ -.. _forum: http://discussion.urbansim.com/ \ No newline at end of file +* `UrbanSim Inc. `__ From 712bbb99c4a0efabeb4d01ab23dcc5adc8558935 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 22:10:37 -0700 Subject: [PATCH 03/20] Updates to readme --- README.rst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 91da0275..1910df59 100644 --- a/README.rst +++ b/README.rst @@ -15,9 +15,12 @@ UrbanSim UrbanSim is a platform for building statistical models of cities and regions. These models help forecast long-range patterns in real estate development, demographics, and related outcomes, under various policy scenarios. -This UrbanSim *Python library* is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. +This ``urbansim``` Python library is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. -Operational UrbanSim models begin with detailed data about a particular region, and then estimate and validate a system of interconnected model components. Full models draw on a number of libraries: not just ``urbansim``, but also Orca for task orchestration, Synthpop for population synthesis, Pandana for network analysis, Developer for real estate logic, and so on. Collectively, these make up the `Urban Data Science Toolkit `__ (UDST). +How it works +------------ + +Operational UrbanSim models begin with detailed data about a particular region, and then estimate and validate a system of interconnected model components. Full models draw on a number of libraries: not just ``urbansim``, but also `Orca `__ for task orchestration, `Synthpop `__ for population synthesis, `Pandana `__ for network analysis, and so on. Collectively, these make up the `Urban Data Science Toolkit `__ (UDST). UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by UrbanSim Inc. @@ -26,8 +29,15 @@ Learn More * `An Introduction to UrbanSim `__ -* `Documentation `__ for the ``urbansim`` Python library - * `UrbanSim for San Francisco: An example implementation `__ * `UrbanSim Inc. `__ + +Technical documentation +----------------------- + +* `Documentation `__ for the ``urbansim`` library + +* `Urban Data Science Toolkit `__ + +* Documentation for the `UrbanSim Cloud Platform `__ From 7347d37f31c016786005a68074b5dfce13547e5c Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 22:13:54 -0700 Subject: [PATCH 04/20] Fixing a typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1910df59..49d63cfc 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ UrbanSim UrbanSim is a platform for building statistical models of cities and regions. These models help forecast long-range patterns in real estate development, demographics, and related outcomes, under various policy scenarios. -This ``urbansim``` Python library is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. +This ``urbansim`` Python library is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. How it works ------------ From 3dbf2974968bed503d8f3f86c75016431475becb Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 22:40:17 -0700 Subject: [PATCH 05/20] Adding installation instructions --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 49d63cfc..d16edf34 100644 --- a/README.rst +++ b/README.rst @@ -33,6 +33,13 @@ Learn More * `UrbanSim Inc. `__ +Installation +------------ + +* ``pip install urbansim`` + +* ``conda install urbansim --channel conda-forge`` + Technical documentation ----------------------- From 12fdb3201a7a784346adfa0a0f5fbb59fa7d5610 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 22:47:39 -0700 Subject: [PATCH 06/20] Reformatting --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d16edf34..da8f91b1 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ Operational UrbanSim models begin with detailed data about a particular region, UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by UrbanSim Inc. Learn More ----------- +~~~~~~~~~~ * `An Introduction to UrbanSim `__ From fe07b22506cca04443dab5bb30740878b4579478 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 4 May 2020 22:49:05 -0700 Subject: [PATCH 07/20] Reformatting --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index da8f91b1..d16edf34 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ Operational UrbanSim models begin with detailed data about a particular region, UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by UrbanSim Inc. Learn More -~~~~~~~~~~ +---------- * `An Introduction to UrbanSim `__ From 4d562355a3af32e92ba5543864785ced33d0e2be Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 09:45:17 -0700 Subject: [PATCH 08/20] Removing development scripts --- scripts/cache_to_hdf5.py | 155 --------------------------------------- scripts/view_hdf5.py | 18 ----- 2 files changed, 173 deletions(-) delete mode 100755 scripts/cache_to_hdf5.py delete mode 100644 scripts/view_hdf5.py diff --git a/scripts/cache_to_hdf5.py b/scripts/cache_to_hdf5.py deleted file mode 100755 index d9cdece9..00000000 --- a/scripts/cache_to_hdf5.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -import argparse -import glob -import os -import sys - -import numpy as np -import pandas as pd - - -def cache_to_df(dir_path): - """ - Convert a directory of binary array data files to a Pandas DataFrame. - - Parameters - ---------- - dir_path : str - - - """ - table = {} - for attrib in glob.glob(os.path.join(dir_path, '*')): - attrib_name, attrib_ext = os.path.splitext(os.path.basename(attrib)) - if attrib_ext == '.lf8': - attrib_data = np.fromfile(attrib, np.float64) - table[attrib_name] = attrib_data - - elif attrib_ext == '.lf4': - attrib_data = np.fromfile(attrib, np.float32) - table[attrib_name] = attrib_data - - elif attrib_ext == '.li2': - attrib_data = np.fromfile(attrib, np.int16) - table[attrib_name] = attrib_data - - elif attrib_ext == '.li4': - attrib_data = np.fromfile(attrib, np.int32) - table[attrib_name] = attrib_data - - elif attrib_ext == '.li8': - attrib_data = np.fromfile(attrib, np.int64) - table[attrib_name] = attrib_data - - elif attrib_ext == '.ib1': - attrib_data = np.fromfile(attrib, np.bool_) - table[attrib_name] = attrib_data - - elif attrib_ext.startswith('.iS'): - length_string = int(attrib_ext[3:]) - attrib_data = np.fromfile(attrib, ('a' + str(length_string))) - table[attrib_name] = attrib_data - - else: - print('Array {} is not a recognized data type'.format(attrib)) - - df = pd.DataFrame(table) - return df - - -DIRECTORIES = { - 'parcels', 'buildings', 'households', 'jobs', 'zones', 'travel_data', - 'annual_employment_control_totals', 'annual_household_control_totals', - 'annual_household_relocation_rates', 'annual_job_relocation_rates', - 'building_sqft_per_job', 'building_types', 'counties', 'target_vacancies', - 'development_event_history' -} - - -def convert_dirs(base_dir, hdf_name, complib=None, complevel=0): - """ - Convert nested set of directories to - - """ - print('Converting directories in {}'.format(base_dir)) - - dirs = glob.glob(os.path.join(base_dir, '*')) - dirs = {d for d in dirs if os.path.basename(d) in DIRECTORIES} - if not dirs: - raise RuntimeError('No direcotries found matching known data.') - - store = pd.HDFStore( - hdf_name, mode='w', complevel=complevel, complib=complib) - - for dirpath in dirs: - dirname = os.path.basename(dirpath) - - print(dirname) - df = cache_to_df(dirpath) - - if dirname == 'travel_data': - keys = ['from_zone_id', 'to_zone_id'] - elif dirname == 'annual_employment_control_totals': - keys = ['sector_id', 'year', 'home_based_status'] - elif dirname == 'annual_job_relocation_rates': - keys = ['sector_id'] - elif dirname == 'annual_household_control_totals': - keys = ['year'] - elif dirname == 'annual_household_relocation_rates': - keys = ['age_of_head_max', 'age_of_head_min', - 'income_min', 'income_max'] - elif dirname == 'building_sqft_per_job': - keys = ['zone_id', 'building_type_id'] - elif dirname == 'counties': - keys = ['county_id'] - elif dirname == 'development_event_history': - keys = ['building_id'] - elif dirname == 'target_vacancies': - keys = ['building_type_id', 'year'] - else: - keys = [dirname[:-1] + '_id'] - - if dirname != 'annual_household_relocation_rates': - df = df.set_index(keys) - - for colname in df.columns: - if df[colname].dtype == np.float64: - df[colname] = df[colname].astype(np.float32) - elif df[colname].dtype == np.int64: - df[colname] = df[colname].astype(np.int32) - else: - df[colname] = df[colname] - - df.info() - print(os.linesep) - store.put(dirname, df) - - store.close() - - -def parse_args(args=None): - parser = argparse.ArgumentParser( - description=( - 'Convert nested set of directories containing binary ' - 'array data to an HDF5 file made from Pandas DataFrames.')) - parser.add_argument('base_dir', help='Base data directory for conversion.') - parser.add_argument('hdf_name', help='Name of output HDF5 file.') - parser.add_argument('-c', '--complib', - help=('Compression library to use, if any. ' - "Can be one of " - "'zlib', 'bzip2', 'lzo', 'blosc'.")) - parser.add_argument('-l', '--complevel', type=int, default=0, - help='Compression level to use.') - return parser.parse_args(args) - - -def main(args=None): - args = parse_args(args) - convert_dirs(args.base_dir, args.hdf_name, args.complib, args.complevel) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/scripts/view_hdf5.py b/scripts/view_hdf5.py deleted file mode 100644 index 47e9f0f4..00000000 --- a/scripts/view_hdf5.py +++ /dev/null @@ -1,18 +0,0 @@ -import json -import sys - -import pandas as pd - -args = sys.argv[1:] - -assert len(args) == 1 - -store = pd.HDFStore(args[0], "r") - -print store - -for key in store.keys(): - print "\n\nTABLENAME", key - print store[key] - print store[key].dtypes - print store[key].describe() From 81e985709b9cfb2b60f6b8fa563d17b0972173f1 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 09:50:14 -0700 Subject: [PATCH 09/20] Removing scripts from CI tests --- .travis.yml | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b40a0d80..06a06609 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_script: - cd .. script: - - pycodestyle urbansim scripts + - pycodestyle urbansim - py.test --cov urbansim --cov-report term-missing - cd sanfran_urbansim; python Simulation.py - cd .. diff --git a/appveyor.yml b/appveyor.yml index 1819f802..57e6c36b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,6 @@ before_test: - cd.. test_script: - - pycodestyle urbansim scripts + - pycodestyle urbansim - pytest urbansim - cd sanfran_urbansim & python Simulation.py \ No newline at end of file From a765416320b03f711bbbedfc82c75c739311f1fd Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 09:55:00 -0700 Subject: [PATCH 10/20] Removing special coverage settings --- .coveragerc | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index d3d73d75..00000000 --- a/.coveragerc +++ /dev/null @@ -1,4 +0,0 @@ -[run] -omit = - urbansim/urbanchoice/pmat.py - urbansim/**/tests/* From ffb677a18c1be572f1163acb59f81f26ad6c60e9 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 09:59:52 -0700 Subject: [PATCH 11/20] Removing special pycodestyle settings --- .travis.yml | 2 +- appveyor.yml | 2 +- setup.cfg | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 setup.cfg diff --git a/.travis.yml b/.travis.yml index 06a06609..cca4d5e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_script: - cd .. script: - - pycodestyle urbansim + - pycodestyle --max-line-length=100 urbansim - py.test --cov urbansim --cov-report term-missing - cd sanfran_urbansim; python Simulation.py - cd .. diff --git a/appveyor.yml b/appveyor.yml index 57e6c36b..174546d5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,6 @@ before_test: - cd.. test_script: - - pycodestyle urbansim + - pycodestyle --max-line-length=100 urbansim - pytest urbansim - cd sanfran_urbansim & python Simulation.py \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 14fa2f04..00000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[pycodestyle] -exclude = texttable.py -max-line-length = 100 From 1f188043170e155f8abb9620c876ff81d0bcaa2b Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 10:08:11 -0700 Subject: [PATCH 12/20] Renaming HISTORY -> CHANGELOG --- HISTORY.rst => CHANGELOG.rst | 0 MANIFEST.in | 2 ++ 2 files changed, 2 insertions(+) rename HISTORY.rst => CHANGELOG.rst (100%) diff --git a/HISTORY.rst b/CHANGELOG.rst similarity index 100% rename from HISTORY.rst rename to CHANGELOG.rst diff --git a/MANIFEST.in b/MANIFEST.in index 97e2ad3d..ef85ef0c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ +include CHANGELOG.rst include LICENSE.txt include README.rst +include requirements-dev.txt \ No newline at end of file From 92a72507ca123fad759be43628a651bca86b7fc0 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 13:40:53 -0700 Subject: [PATCH 13/20] Updating and documenting doc build process --- .travis.yml | 5 -- bin/build_docs.sh | 61 ------------------ docs/README.md | 24 +++++++ docs/build/.gitignore | 1 + docs/{ => source}/Makefile | 0 docs/{ => source}/_static/.placeholder | 0 docs/{ => source}/_templates/.placeholder | 0 docs/{ => source}/conf.py | 0 docs/{ => source}/developer/index.rst | 0 docs/{ => source}/examples.rst | 0 docs/{ => source}/gettingstarted.rst | 0 docs/{ => source}/index.rst | 0 docs/{ => source}/make.bat | 0 docs/{ => source}/maps/index.rst | 0 docs/{ => source}/models/index.rst | 0 docs/{ => source}/models/statistical.rst | 0 docs/{ => source}/models/supplydemand.rst | 0 docs/{ => source}/models/transrelo.rst | 0 docs/{ => source}/models/urbanchoice.rst | 0 docs/{ => source}/models/util.rst | 0 .../dframe_explorer_screenshot.png | Bin docs/{ => source}/utils/index.rst | 0 docs/{ => source}/utils/misc.rst | 0 docs/{ => source}/utils/testing.rst | 0 docs/{ => source}/utils/yamlio.rst | 0 25 files changed, 25 insertions(+), 66 deletions(-) delete mode 100755 bin/build_docs.sh create mode 100644 docs/README.md create mode 100644 docs/build/.gitignore rename docs/{ => source}/Makefile (100%) rename docs/{ => source}/_static/.placeholder (100%) rename docs/{ => source}/_templates/.placeholder (100%) rename docs/{ => source}/conf.py (100%) rename docs/{ => source}/developer/index.rst (100%) rename docs/{ => source}/examples.rst (100%) rename docs/{ => source}/gettingstarted.rst (100%) rename docs/{ => source}/index.rst (100%) rename docs/{ => source}/make.bat (100%) rename docs/{ => source}/maps/index.rst (100%) rename docs/{ => source}/models/index.rst (100%) rename docs/{ => source}/models/statistical.rst (100%) rename docs/{ => source}/models/supplydemand.rst (100%) rename docs/{ => source}/models/transrelo.rst (100%) rename docs/{ => source}/models/urbanchoice.rst (100%) rename docs/{ => source}/models/util.rst (100%) rename docs/{ => source}/screenshots/dframe_explorer_screenshot.png (100%) rename docs/{ => source}/utils/index.rst (100%) rename docs/{ => source}/utils/misc.rst (100%) rename docs/{ => source}/utils/testing.rst (100%) rename docs/{ => source}/utils/yamlio.rst (100%) diff --git a/.travis.yml b/.travis.yml index cca4d5e3..e94498cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,3 @@ script: after_success: - coveralls - - bin/build_docs.sh - -env: - global: - - secure: c2olC+qzN1VHJZlznPy7mUtRvAyU7I2C7N3sYkv71Ds+dx5WN8InF6mpwNs/ZKfERbbA9slSVmYjB4j2c+VT8S1J33o6aI4F4hWNr6l7DgBKoPmozvaDx0GQ45hMOeSHSG5OF+DZCSTEXtxQK82uj61sCvZ6dIlDOqRvAHCjQDI= diff --git a/bin/build_docs.sh b/bin/build_docs.sh deleted file mode 100755 index 9360bb40..00000000 --- a/bin/build_docs.sh +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/bin/env bash - -# Copied from github.com/sympy/sympy -# -# This file automatically deploys changes to http://udst.github.io/urbansim/. -# This will only happen when building a non-pull request build on the master -# branch of UrbanSim. -# It requires an access token which should be present in .travis.yml file. -# -# Following is the procedure to get the access token: -# -# $ curl -X POST -u -H "Content-Type: application/json" -d\ -# "{\"scopes\":[\"public_repo\"],\"note\":\"token for pushing from travis\"}"\ -# https://api.github.com/authorizations -# -# It'll give you a JSON response having a key called "token". -# -# $ gem install travis -# $ travis encrypt -r sympy/sympy GH_TOKEN= env.global -# -# This will give you an access token("secure"). This helps in creating an -# environment variable named GH_TOKEN while building. -# -# Add this secure code to .travis.yml as described here http://docs.travis-ci.com/user/encryption-keys/ - -# Exit on error -set -e - -ACTUAL_TRAVIS_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER| cut -d'.' -f 2` - -if [ "$TRAVIS_REPO_SLUG" == "UDST/urbansim" ] && \ - [ "$TRAVIS_BRANCH" == "master" ] && \ - [ "$TRAVIS_PULL_REQUEST" == "false" ] && \ - [ "$ACTUAL_TRAVIS_JOB_NUMBER" == "1" ]; then - - echo "Installing dependencies" - conda install --yes --quiet sphinx numpydoc - pip install sphinx_rtd_theme - - echo "Building docs" - cd docs - make clean - make html - - cd ../../ - echo "Setting git attributes" - git config --global user.email "jiffyclub@gmail.com" - git config --global user.name "Matt Davis" - - echo "Cloning repository" - git clone --quiet --single-branch --branch=gh-pages https://${GH_TOKEN}@github.com/UDST/urbansim.git gh-pages > /dev/null 2>&1 - - cd gh-pages - rm -rf * - cp -R ../urbansim/docs/_build/html/* ./ - git add -A . - - git commit -am "Update dev doc after building $TRAVIS_BUILD_NUMBER" - echo "Pushing commit" - git push -fq origin gh-pages > /dev/null 2>&1 -fi diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..714b86c8 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,24 @@ +This folder generates the UrbanSim online documentation, hosted at https://udst.github.io/urbansim/. + +### How it works + +Documentation is generated using [Sphinx](http://sphinx-doc.org) and hosted with Github Pages from the `gh-pages` branch of the repository. The online documentation is updated **manually**. + +### Editing the documentation + +The files in `docs/source`, along with docstrings in the source code, determine what appears in the rendered documentation. Here's a [good tutorial](https://pythonhosted.org/an_example_pypi_project/sphinx.html) for the Sphinx documentation generator. + +### Previewing changes locally + +Install the copy of UrbanSim that the documentation is meant to reflect. Install the documentation tools. + +``` +pip install . +pip install sphinx sphinx_rtd_theme numpydoc +``` + +From the `docs` directory, run `sphinx-build -b html source build`. The HTML files will show up in `docs/build/`. + +### Uploading changes + +Clone a second copy of the repository and check out the `gh-pages` branch. Copy over the updated HTML files, commit them, and push the changes to Github. diff --git a/docs/build/.gitignore b/docs/build/.gitignore new file mode 100644 index 00000000..150f68c8 --- /dev/null +++ b/docs/build/.gitignore @@ -0,0 +1 @@ +*/* diff --git a/docs/Makefile b/docs/source/Makefile similarity index 100% rename from docs/Makefile rename to docs/source/Makefile diff --git a/docs/_static/.placeholder b/docs/source/_static/.placeholder similarity index 100% rename from docs/_static/.placeholder rename to docs/source/_static/.placeholder diff --git a/docs/_templates/.placeholder b/docs/source/_templates/.placeholder similarity index 100% rename from docs/_templates/.placeholder rename to docs/source/_templates/.placeholder diff --git a/docs/conf.py b/docs/source/conf.py similarity index 100% rename from docs/conf.py rename to docs/source/conf.py diff --git a/docs/developer/index.rst b/docs/source/developer/index.rst similarity index 100% rename from docs/developer/index.rst rename to docs/source/developer/index.rst diff --git a/docs/examples.rst b/docs/source/examples.rst similarity index 100% rename from docs/examples.rst rename to docs/source/examples.rst diff --git a/docs/gettingstarted.rst b/docs/source/gettingstarted.rst similarity index 100% rename from docs/gettingstarted.rst rename to docs/source/gettingstarted.rst diff --git a/docs/index.rst b/docs/source/index.rst similarity index 100% rename from docs/index.rst rename to docs/source/index.rst diff --git a/docs/make.bat b/docs/source/make.bat similarity index 100% rename from docs/make.bat rename to docs/source/make.bat diff --git a/docs/maps/index.rst b/docs/source/maps/index.rst similarity index 100% rename from docs/maps/index.rst rename to docs/source/maps/index.rst diff --git a/docs/models/index.rst b/docs/source/models/index.rst similarity index 100% rename from docs/models/index.rst rename to docs/source/models/index.rst diff --git a/docs/models/statistical.rst b/docs/source/models/statistical.rst similarity index 100% rename from docs/models/statistical.rst rename to docs/source/models/statistical.rst diff --git a/docs/models/supplydemand.rst b/docs/source/models/supplydemand.rst similarity index 100% rename from docs/models/supplydemand.rst rename to docs/source/models/supplydemand.rst diff --git a/docs/models/transrelo.rst b/docs/source/models/transrelo.rst similarity index 100% rename from docs/models/transrelo.rst rename to docs/source/models/transrelo.rst diff --git a/docs/models/urbanchoice.rst b/docs/source/models/urbanchoice.rst similarity index 100% rename from docs/models/urbanchoice.rst rename to docs/source/models/urbanchoice.rst diff --git a/docs/models/util.rst b/docs/source/models/util.rst similarity index 100% rename from docs/models/util.rst rename to docs/source/models/util.rst diff --git a/docs/screenshots/dframe_explorer_screenshot.png b/docs/source/screenshots/dframe_explorer_screenshot.png similarity index 100% rename from docs/screenshots/dframe_explorer_screenshot.png rename to docs/source/screenshots/dframe_explorer_screenshot.png diff --git a/docs/utils/index.rst b/docs/source/utils/index.rst similarity index 100% rename from docs/utils/index.rst rename to docs/source/utils/index.rst diff --git a/docs/utils/misc.rst b/docs/source/utils/misc.rst similarity index 100% rename from docs/utils/misc.rst rename to docs/source/utils/misc.rst diff --git a/docs/utils/testing.rst b/docs/source/utils/testing.rst similarity index 100% rename from docs/utils/testing.rst rename to docs/source/utils/testing.rst diff --git a/docs/utils/yamlio.rst b/docs/source/utils/yamlio.rst similarity index 100% rename from docs/utils/yamlio.rst rename to docs/source/utils/yamlio.rst From 59f4635e452bb1cbcc06dde4b214110397dc82be Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 14:52:12 -0700 Subject: [PATCH 14/20] Updating documentation --- docs/README.md | 13 +++- docs/source/conf.py | 6 +- docs/source/gettingstarted.rst | 117 ++++++--------------------------- docs/source/index.rst | 9 +-- setup.py | 2 +- 5 files changed, 40 insertions(+), 107 deletions(-) diff --git a/docs/README.md b/docs/README.md index 714b86c8..1021b80b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,11 +2,11 @@ This folder generates the UrbanSim online documentation, hosted at https://udst. ### How it works -Documentation is generated using [Sphinx](http://sphinx-doc.org) and hosted with Github Pages from the `gh-pages` branch of the repository. The online documentation is updated **manually**. +HTML files are generated using [Sphinx](http://sphinx-doc.org) and hosted with Github Pages from the `gh-pages` branch of the repository. The online documentation is rendered and updated **manually**. ### Editing the documentation -The files in `docs/source`, along with docstrings in the source code, determine what appears in the rendered documentation. Here's a [good tutorial](https://pythonhosted.org/an_example_pypi_project/sphinx.html) for the Sphinx documentation generator. +The files in `docs/source`, along with docstrings in the source code, determine what appears in the rendered documentation. Here's a [good tutorial](https://pythonhosted.org/an_example_pypi_project/sphinx.html) for Sphinx. ### Previewing changes locally @@ -17,7 +17,14 @@ pip install . pip install sphinx sphinx_rtd_theme numpydoc ``` -From the `docs` directory, run `sphinx-build -b html source build`. The HTML files will show up in `docs/build/`. +Build the documentation. There should be status messages and warnings, but no errors. + +``` +cd docs +sphinx-build -b html source build +``` + +The HTML files will show up in `docs/build/`. ### Uploading changes diff --git a/docs/source/conf.py b/docs/source/conf.py index 6d442eef..ef1a8656 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,16 +50,16 @@ # General information about the project. project = u'urbansim' -copyright = u'2017, UrbanSim Inc' +copyright = u'2020, UrbanSim Inc.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '3.1' +version = '3.2' # The full version, including alpha/beta/rc tags. -release = '3.1.1' +release = '3.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/gettingstarted.rst b/docs/source/gettingstarted.rst index 0e7ad269..1c368a89 100644 --- a/docs/source/gettingstarted.rst +++ b/docs/source/gettingstarted.rst @@ -2,119 +2,47 @@ Getting Started =============== Let us know what you are working on or if you think you have a great use case -by tweeting us at ``@urbansim`` or post on the UrbanSim `forum`_. +by tweeting us at `@urbansim `__, posting on the UrbanSim `forum `__, or contacting us at info@urbansim.com. Installation ------------ -.. note:: - In the instructions below we will direct you to run various commands. - On Mac and Linux these should go in your standard terminal. - On Windows you may use the standard command prompt, the Anaconda - command prompt, or even Git Bash (if you have that installed). +The UrbanSim library is currently tested with Python versions 2.7, 3.5, 3.6, 3.7, and 3.8. -Anaconda -~~~~~~~~ +UrbanSim is distributed on the `Python Package Index `__ (for pip) and on `Conda Forge `__. The official source code is hosted on `GitHub `__. -UrbanSim is a Python library that uses a number of packages from the -scientific Python ecosystem. -The easiest way to get your own scientific Python installation is to -install `Anaconda `__, -which contains most of the libraries upon which UrbanSim depends. +You can install UrbanSim with either the pip or conda package manager: -UrbanSim -~~~~~~~~ +.. code-block:: python -Dependencies -^^^^^^^^^^^^ - -UrbanSim depends on the following libraries, most of which are in Anaconda: - -* `bottle `__ >= 0.12 -* `matplotlib `__ >= 1.3.1 -* `numpy `__ >= 1.8.0 -* `orca `__ >= 1.1 -* `pandas `__ >= 0.17.0 -* `patsy `__ >= 0.3.0 -* `prettytable `__ >= 0.7.2 -* `pyyaml `__ >= 3.10 -* `scipy `__ >= 0.13.3 -* `simplejson `__ >= 3.3 -* `statsmodels `__ >= 0.8.0 -* `tables `__ >= 3.1.0 -* `toolz `__ >= 0.7 -* `zbox `__ >= 1.2 - -Extras require: - -* `pandana `__ >= 0.1 - -Latest Release -^^^^^^^^^^^^^^ - -conda -##### - -`conda `__, which comes with Anaconda, is the -easiest way to install UrbanSim because it has binary installers for -all of UrbanSim's hard-to-install dependencies. -First, add the `udst channel `__ -to your conda configuration:: - - conda config --add channels udst - -Then use conda to install UrbanSim:: - - conda install urbansim - -To update to a new UrbanSim version use the ``conda update`` command:: - - conda update urbansim - -pip -### + pip install urbansim -UrbanSim can also be installed from -`PyPI `__ -via `pip `__:: +.. code-block:: python - pip install urbansim + conda install urbansim --channel conda-forge -When using this method it's best to already have most of the dependencies -installed, otherwise pip will try to download and install things like -NumPy, SciPy, and matplotlib. -If you're using Anaconda you will already have all of the hard-to-install -libraries. +Dependencies include `NumPy `__, `Pandas `__, and `Statsmodels `__, plus another UDST library: `Orca `__ for task orchestration. These will be installed automatically if needed. -To update to a new release of UrbanSim use the ``-U`` option with -``pip install``:: +When new releases of UrbanSim come out, you can upgrade like this: - pip install -U urbansim +.. code-block:: python -Development Version -^^^^^^^^^^^^^^^^^^^ + pip install urbansim --upgrade -UrbanSim can be installed from our -`development repository `__ -using `pip `__, a Python package manager. -pip is included with Anaconda so you should now be able to open a terminal -and run the following command to install UrbanSim:: +.. code-block:: python - pip install -U https://github.com/udst/urbansim/archive/master.zip + conda update urbansim --channel conda-forge -This will download urbansim and install the remaining dependencies not -included in Anaconda. +Installing from GitHub +~~~~~~~~~~~~~~~~~~~~~~ -If you need to update UrbanSim run the above command again. +You can also install UrbanSim directly from source code on GitHub, for example to use pre-release features or to modify the code yourself. The UrbanSim library is written entirely in Python; no compilation is needed. -Developer Install -^^^^^^^^^^^^^^^^^ +.. code-block:: python -If you are going to be developing on UrbanSim you will want to fork our -`GitHub repository `_ and clone -your fork to your computer. Then run ``python setup.py develop`` to install -UrbanSim in developer mode. In this mode you won't have to reinstall -UrbanSim every time you make changes. + git clone -b branch-name https://github.com/udst/urbansim.git + cd urbansim + pip install . Reporting bugs and contributing to UrbanSim ------------------------------------------- @@ -429,6 +357,3 @@ can be added to the same file so that a piece of functionality can be separated be kept together, columns together, and tables together - the organization is up to you. We hope that this flexibility inspires innovation for specific use cases, but what follows is a set of tutorials that we consider best practices. - - -.. _forum: http://discussion.urbansim.com/ \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 986d03ef..49663e49 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,10 +6,11 @@ UrbanSim ======== -`UrbanSim `_ is a model system for analyzing urban -development. -It is an open source platform that has been continuously refined and -distributed for planning applications around the world for over 15 years. +UrbanSim is a platform for building statistical models of cities and regions. These models help forecast long-range patterns in real estate development, demographics, and related outcomes, under various policy scenarios. + +This ``urbansim``` Python library is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model. + +v3.2, released May 5, 2020 Contents -------- diff --git a/setup.py b/setup.py index 821bccd9..b168f304 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='urbansim', version='3.1.1', - description='Tool for modeling metropolitan real estate markets', + description='Platform for building statistical models of cities and regions', long_description=long_description, author='UrbanSim Inc.', author_email='info@urbansim.com', From 9313d119a6ee8e34a533e35324372440f286312a Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 14:52:37 -0700 Subject: [PATCH 15/20] Updating version number --- setup.py | 2 +- urbansim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b168f304..fa4b5c74 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='urbansim', - version='3.1.1', + version='3.2', description='Platform for building statistical models of cities and regions', long_description=long_description, author='UrbanSim Inc.', diff --git a/urbansim/__init__.py b/urbansim/__init__.py index abd22615..59cbdc33 100644 --- a/urbansim/__init__.py +++ b/urbansim/__init__.py @@ -1 +1 @@ -__version__ = version = '3.1.1' +__version__ = version = '3.2' From 04c8f53fb3a285421a7b7e5456277e80e7053233 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 15:03:39 -0700 Subject: [PATCH 16/20] Changelog and docs --- CHANGELOG.rst | 10 ++++++++++ docs/README.md | 4 ++-- docs/source/gettingstarted.rst | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c374db45..5935ff95 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,13 @@ +v3.2 +==== + +2020/05/05 + +* Improved installation and compatibility +* Support for Pandas 1.0 +* Various improvements and bug fixes +* Note that active development of certain UrbanSim components has moved to stand-alone libraries in UDST: Developer, Choicemodels, UrbanSim Templates + v3.1.1 ====== diff --git a/docs/README.md b/docs/README.md index 1021b80b..3f4a308e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ This folder generates the UrbanSim online documentation, hosted at https://udst. ### How it works -HTML files are generated using [Sphinx](http://sphinx-doc.org) and hosted with Github Pages from the `gh-pages` branch of the repository. The online documentation is rendered and updated **manually**. +HTML files are generated using [Sphinx](http://sphinx-doc.org) and hosted with GitHub Pages from the `gh-pages` branch of the repository. The online documentation is rendered and updated **manually**. ### Editing the documentation @@ -28,4 +28,4 @@ The HTML files will show up in `docs/build/`. ### Uploading changes -Clone a second copy of the repository and check out the `gh-pages` branch. Copy over the updated HTML files, commit them, and push the changes to Github. +Clone a second copy of the repository and check out the `gh-pages` branch. Copy over the updated HTML files, commit them, and push the changes to GitHub. diff --git a/docs/source/gettingstarted.rst b/docs/source/gettingstarted.rst index 1c368a89..770b65cd 100644 --- a/docs/source/gettingstarted.rst +++ b/docs/source/gettingstarted.rst @@ -1,7 +1,7 @@ Getting Started =============== -Let us know what you are working on or if you think you have a great use case +Let us know what you are working on, or if you think you have a great use case, by tweeting us at `@urbansim `__, posting on the UrbanSim `forum `__, or contacting us at info@urbansim.com. Installation @@ -9,9 +9,9 @@ Installation The UrbanSim library is currently tested with Python versions 2.7, 3.5, 3.6, 3.7, and 3.8. -UrbanSim is distributed on the `Python Package Index `__ (for pip) and on `Conda Forge `__. The official source code is hosted on `GitHub `__. +UrbanSim is distributed on the `Python Package Index `__ (for Pip) and on `Conda Forge `__. The official source code is hosted on `GitHub `__. (UrbanSim versions before 3.2 are on the UDST Conda channel rather than Conda Forge.) -You can install UrbanSim with either the pip or conda package manager: +You can install UrbanSim with either the Pip or Conda package manager: .. code-block:: python From be859096690d9b15c494efe3b08efa1d8bc1a908 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 15:17:31 -0700 Subject: [PATCH 17/20] Updated contribution guide --- CONTRIBUTING.md | 97 ++++++++++++++++++++++++++++++++++--------------- MANIFEST.in | 1 + 2 files changed, 69 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a2f93a4..a580cea6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,41 +1,80 @@ -Contributing to UrbanSim -======================== +Thanks for using UrbanSim! -Style ------ +This is an open source project that's part of the Urban Data Science Toolkit. Development and maintenance is a collaboration between UrbanSim Inc, U.C. Berkeley's Urban Analytics Lab, and other contributors. -- Python code should follow the [PEP 8 Style Guide][pep8]. -- Python docstrings should follow the [NumPy documentation format][numpydoc]. +You can contact Sam Maurer, the lead maintainer, at `maurer@urbansim.com`. -### Imports -Imports should be one per line. -Imports should be grouped into standard library, third-party, -and intra-library imports. `from` import should follow "regular" `imports`. -Within each group the imports should be alphabetized. -Here's an example: +## If you have a problem: -```python -import sys -from glob import glob +- Take a look at the [open issues](https://github.com/UDST/urbansim/issues) and [closed issues](https://github.com/UDST/urbansim/issues?q=is%3Aissue+is%3Aclosed) to see if there's already a related discussion -import numpy as np +- Open a new issue describing the problem -- if possible, include any error messages, the operating system and version of python you're using, and versions of any libraries that may be relevant -import urbansim.urbansim.modelcompile as modelcompile -from urbansim.util import misc -``` -Imports of scientific Python libraries should follow these conventions: +## Feature proposals: -```python -import matplotlib.pyplot as plt -import numpy as np -import pandas as pd -import scipy as sp -``` +- Take a look at the [open issues](https://github.com/UDST/urbansim/issues) and [closed issues](https://github.com/UDST/urbansim/issues?q=is%3Aissue+is%3Aclosed) to see if there's already a related discussion +- Post your proposal as a new issue, so we can discuss it (some proposals may not be a good fit for the project) -Thanks! +- Please note that active development of certain UrbanSim components has moved to stand-alone libraries in UDST: Developer, Choicemodels, UrbanSim Templates -[pep8]: http://legacy.python.org/dev/peps/pep-0008/ -[numpydoc]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt + +## Contributing code: + +- Create a new branch of `UDST/urbansim`, or fork the repository to your own account + +- Make your changes, following the existing styles for code and inline documentation + +- Add [tests](https://github.com/UDST/urbansim/tree/master/urbansim/tests) if possible! + +- Open a pull request to the `UDST/urbansim` dev branch, including a writeup of your changes -- take a look at some of the closed PR's for examples + +- Current maintainers will review the code, suggest changes, and hopefully merge it! + + +## Updating the documentation: + +- See instructions in `docs/README.md` + + +## Preparing a release: + +- Make a new branch for release prep + +- Update the version number and changelog + - `CHANGELOG.md` + - `setup.py` + - `urbansim/__init__.py` + - `docs/source/index.rst` + +- Make sure all the tests are passing, and check if updates are needed to `README.md` or to the documentation + +- Open a pull request to the master branch to finalize it + +- After merging, tag the release on GitHub and follow the distribution procedures below + + +## Distributing a release on PyPI (for pip installation): + +- Register an account at https://pypi.org, ask one of the current maintainers to add you to the project, and `pip install twine` + +- Check out the copy of the code you'd like to release + +- Run `python setup.py sdist bdist_wheel --universal` + +- This should create a `dist` directory containing two package files -- delete any old ones before the next step + +- Run `twine upload dist/*` -- this will prompt you for your pypi.org credentials + +- Check https://pypi.org/project/urbansim/ for the new version + + +## Distributing a release on Conda Forge (for conda installation): + +- The [conda-forge/urbansim-feedstock](https://github.com/conda-forge/urbansim-feedstock) repository controls the Conda Forge release + +- Conda Forge bots usually detect new releases on PyPI and set in motion the appropriate feedstock updates, which a current maintainer will need to approve and merge + +- Check https://anaconda.org/conda-forge/urbansim for the new version (may take a few minutes for it to appear) diff --git a/MANIFEST.in b/MANIFEST.in index ef85ef0c..9696a5cd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include CHANGELOG.rst +include CONTRIBUTING.md include LICENSE.txt include README.rst include requirements-dev.txt \ No newline at end of file From 5d934c6ff7662dee909cb1c5c80b83d385bae1e7 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 15:21:14 -0700 Subject: [PATCH 18/20] Fixing a numpy deprecation --- urbansim/utils/yamlio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urbansim/utils/yamlio.py b/urbansim/utils/yamlio.py index 476e29f8..2a7ff78a 100644 --- a/urbansim/utils/yamlio.py +++ b/urbansim/utils/yamlio.py @@ -84,7 +84,7 @@ def to_scalar_safe(obj): Convert a numpy data type to a standard python scalar. """ try: - return np.asscalar(obj) + return obj.item() except Exception: return obj From 4131eb37bf812f63693b14002a232801649d52bf Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 15:40:43 -0700 Subject: [PATCH 19/20] Updating readme --- README.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index d16edf34..212871a2 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ How it works Operational UrbanSim models begin with detailed data about a particular region, and then estimate and validate a system of interconnected model components. Full models draw on a number of libraries: not just ``urbansim``, but also `Orca `__ for task orchestration, `Synthpop `__ for population synthesis, `Pandana `__ for network analysis, and so on. Collectively, these make up the `Urban Data Science Toolkit `__ (UDST). -UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by UrbanSim Inc. +UrbanSim models are used by public agencies, consultancies, and researchers in dozens of cities around the U.S. and world. The core platform is open source, but many operational models make use of additional cloud-hosted model building and visualization tools provided by `UrbanSim Inc. `__ Learn More ---------- @@ -43,8 +43,10 @@ Installation Technical documentation ----------------------- -* `Documentation `__ for the ``urbansim`` library +* `Getting started `__ -* `Urban Data Science Toolkit `__ +* `Full documentation `__ -* Documentation for the `UrbanSim Cloud Platform `__ +* Other `UDST `__ libraries + +* Documentation for `UrbanCanvas `__, the UrbanSim cloud platform From 80225d4f41126fe1e5292360b58f3e5e8343fa87 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Tue, 5 May 2020 15:42:51 -0700 Subject: [PATCH 20/20] Updating udst link --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 212871a2..dd50259c 100644 --- a/README.rst +++ b/README.rst @@ -47,6 +47,6 @@ Technical documentation * `Full documentation `__ -* Other `UDST `__ libraries +* Other `UDST `__ libraries * Documentation for `UrbanCanvas `__, the UrbanSim cloud platform