From 6f7f324a4055d527012e1b35331a8f1546c81ecc Mon Sep 17 00:00:00 2001 From: Adam Erispaha Date: Tue, 18 Jun 2019 18:54:56 -0400 Subject: [PATCH] add test data to package dist, update setup for new pypi settings --- MANIFEST.in | 3 ++ setup.py | 51 ++++++++++-------- swmmio/.DS_Store | Bin 6148 -> 0 bytes .../{RUNOFF46_SW5.INP => RUNOFF46_SW5.inp} | 0 swmmio/tests/data/__init__.py | 2 +- 5 files changed, 34 insertions(+), 22 deletions(-) delete mode 100644 swmmio/.DS_Store rename swmmio/tests/data/{RUNOFF46_SW5.INP => RUNOFF46_SW5.inp} (100%) diff --git a/MANIFEST.in b/MANIFEST.in index 791946a..6895dd4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,3 +4,6 @@ include lib/linux/swmm5 include swmmio/reporting/basemaps/*.html include swmmio/graphics/fonts/*.ttf include swmmio/defs/*.json +include swmmio/tests/data/*.inp +include swmmio/tests/data/*.rpt +include swmmio/tests/data/*.csv \ No newline at end of file diff --git a/setup.py b/setup.py index 2948f54..c507331 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ HERE = os.path.abspath(os.path.dirname(__file__)) + def get_version(module='swmmio'): """Get version.""" with open(os.path.join(HERE, module, '__init__.py'), 'r') as f: @@ -19,8 +20,12 @@ def get_version(module='swmmio'): break return version -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() + +def get_description(): + """Get long description.""" + with open(os.path.join(HERE, 'README.md'), 'r') as f: + data = f.read() + return data AUTHOR_NAME = 'Adam Erispaha' @@ -32,32 +37,36 @@ def read(fname): 'pandas', 'pyshp', 'geojson', - ] +] tests_require = [ 'pytest', ] -setup(name = 'swmmio', - version = get_version(), - description = 'Tools for reading, writing, visualizing, and versioning EPA SWMM5 models.', - author = AUTHOR_NAME, - url = 'https://github.com/aerispaha/swmmio', - author_email = AUTHOR_EMAIL, - packages = find_packages(exclude = ('tests')), - entry_points = { - "console_scripts": ['swmmio_run = swmmio.run_models.run:run_simple'] - }, - install_requires = install_requires, - tests_require = tests_require, - long_description = read('README.rst'), - include_package_data = True, - platforms = "OS Independent", - license = "MIT License", - classifiers = [ +setup(name='swmmio', + version=get_version(), + description='Tools for interacting with, editing, and visualizing EPA SWMM5 models', + author=AUTHOR_NAME, + url='https://github.com/aerispaha/swmmio', + author_email=AUTHOR_EMAIL, + packages=find_packages(exclude=('tests')), + entry_points={ + "console_scripts": ['swmmio_run = swmmio.run_models.run:run_simple'] + }, + install_requires=install_requires, + tests_require=tests_require, + long_description=get_description(), + long_description_content_type="text/markdown", + include_package_data=True, + platforms="OS Independent", + license="MIT License", + classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.6", ] -) + ) + + diff --git a/swmmio/.DS_Store b/swmmio/.DS_Store deleted file mode 100644 index 6bc1530b0b10f864cc48c789ab618e56e6f48027..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~%Wl&^6o${VZt4_4v#5aOY}jSd2tmrCl9jd#c1S_6fGV|PlUQ;+k?k~U(^P&7 zcq1Nx*WsTF(WEKr4xwm{H1m(onPY1{&Ba4RtT&B2L@grnQKWi%s2(sGmu1bijOQ7Y zsdtPhiOXRY36ZV!b`D3t5%}K-$hF&`m_oWlvDPmZGdoXV%8JWJTBFHK7`d6x#~lM*7Nzi`=-s`br)?ue|ywz^P|_D#lrVryy_gk zzqq`y6k>{%;gzUmiwCh`$FO1}>{1rSYWOeqbiw3C_$ zB?t*X)z%|!OVKp)|7591yPO~Ge?`6kr#%2rYCAS@BWy_pED0ov#+_dR3{y29kj z0SnX1PT5z1f=b{Lis?{k1;&ChyX$h^+YPfe{3o{4wH*ORz!3lexj%5Dfzev4+B#6F zD*)7kTN&E&E+KQd(ZFb}6%iQIsZgED%oT&_bojaH7Z|Oz>U3h}^1;lPnYp1b^>w_T ztM0@Ct*&+i9D!8=+xoF3&;PT(-~U&W+>;~V2y7Gq=AHIWdl-^ATh|6B&svUhfg(-z ntF@{WROUEV4S5v5L{WwqmknrOwAKm_%>4)`46bqn{waaq0*DUR diff --git a/swmmio/tests/data/RUNOFF46_SW5.INP b/swmmio/tests/data/RUNOFF46_SW5.inp similarity index 100% rename from swmmio/tests/data/RUNOFF46_SW5.INP rename to swmmio/tests/data/RUNOFF46_SW5.inp diff --git a/swmmio/tests/data/__init__.py b/swmmio/tests/data/__init__.py index 771fa37..c8550be 100644 --- a/swmmio/tests/data/__init__.py +++ b/swmmio/tests/data/__init__.py @@ -19,7 +19,7 @@ MODEL_FULL_FEATURES__NET_PATH = os.path.join( DATA_PATH, 'model_full_features_network.inp') MODEL_FULL_FEATURES_INVALID = os.path.join(DATA_PATH, 'invalid_model.inp') -MODEL_BROWARD_COUNTY_PATH = os.path.join(DATA_PATH, 'RUNOFF46_SW5.INP') +MODEL_BROWARD_COUNTY_PATH = os.path.join(DATA_PATH, 'RUNOFF46_SW5.inp') # version control test models MODEL_XSECTION_BASELINE = os.path.join(DATA_PATH, 'baseline_test.inp')