From 5a9dcda862710379ed7461b0ec35f93747823dd3 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 10 Aug 2020 15:56:36 -0700 Subject: [PATCH 1/3] Cleanup --- README.md | 2 +- setup.cfg | 2 +- setup.py | 32 ++++++++++++------------------- variable_generators/__init__.py | 2 +- variable_generators/generators.py | 2 +- 5 files changed, 16 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1177182..5107c93 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # variable_generators -Functions that facilitate bulk creation of orca column functions for use as explanatory variables in UrbanSim. +Functions that facilitate bulk creation of Orca column functions for use as explanatory variables in UrbanSim. diff --git a/setup.cfg b/setup.cfg index 69486b3..999cf45 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ -[pep8] +[pycodestyle] max-line-length = 100 \ No newline at end of file diff --git a/setup.py b/setup.py index d3b9408..5f5762c 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,12 @@ -# Install setuptools if not installed. -try: - import setuptools -except ImportError: - from ez_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages - -# read README as the long description -with open('README.md', 'r') as f: - long_description = f.read() - setup( name='variable_generators', - version='0.1dev', - description='Bulk definition of explanatory variables', - long_description=long_description, + version='0.1', + description='Bulk definition of explanatory variables for UrbanSim', + long_description= + 'Functions that facilitate bulk creation of Orca column functions for use as ' + 'explanatory variables in UrbanSim.', author='UrbanSim Inc.', author_email='info@urbansim.com', url='https://github.com/udst/variable_generators', @@ -24,14 +14,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], packages=find_packages(exclude=['*.tests']), install_requires=[ - 'numpy >= 1.1.0', - 'pandas >= 0.16.0', - 'orca >= 1.3.0', + 'numpy >= 1.1', + 'pandas >= 0.16', + 'orca >= 1.3', 'urbansim >= 0.1.1', ], extras_require={ diff --git a/variable_generators/__init__.py b/variable_generators/__init__.py index 538e75f..b25797c 100644 --- a/variable_generators/__init__.py +++ b/variable_generators/__init__.py @@ -1 +1 @@ -version = __version__ = '0.1dev' +version = __version__ = '0.1' diff --git a/variable_generators/generators.py b/variable_generators/generators.py index d5d123a..e5251bb 100644 --- a/variable_generators/generators.py +++ b/variable_generators/generators.py @@ -14,7 +14,7 @@ pass -def make_agg_var(agent, geog, geog_id, var_to_aggregate, agg_function, how_fillna = None): +def make_agg_var(agent, geog, geog_id, var_to_aggregate, agg_function, how_fillna=None): """ Generator function for aggregation variables. Registers with orca. """ From a43b49c71da69fd2bde2aa40668a6e6189f92959 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Mon, 10 Aug 2020 16:08:12 -0700 Subject: [PATCH 2/3] Adding license, manifest, changelog --- CHANGELOG.md | 6 ++++++ LICENSE.txt | 29 +++++++++++++++++++++++++++++ MANIFEST.in | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 LICENSE.txt create mode 100644 MANIFEST.in diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..78a8ec4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +v0.1 +==== + +2020/08/10 + +* Initial release diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..00376a1 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,29 @@ +BSD 3-Clause License + +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: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..6f5d56f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include CHANGELOG.md +include LICENSE.txt From e4e4b1592cb7e78d4d5955ebffa363d44ed1e648 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 14 Aug 2020 09:52:17 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 5107c93..346d04b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # variable_generators Functions that facilitate bulk creation of Orca column functions for use as explanatory variables in UrbanSim. + +``` +pip install variable_generators +``` + +``` +conda install variable_generators -c conda-forge +``` + +For API and documentation, see [generators.py](https://github.com/UDST/variable_generators/blob/master/variable_generators/generators.py).