Skip to content

Commit

Permalink
Merge pull request #27 from aerispaha/config_fix
Browse files Browse the repository at this point in the history
moved definitions.py to swmmio.def.config, added pytest
  • Loading branch information
aerispaha authored Oct 11, 2018
2 parents a06c239 + 589d175 commit fbf93c4
Show file tree
Hide file tree
Showing 24 changed files with 722 additions and 95 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ private/
/*.egg-info
notes/
.DS_Store
notebooks/
__pycache__/
.cache/
.pytest_cache/
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.7"
# - "3.6"
# - "3.7"
# command to install dependencies
install:
- pip install -r requirements.txt
# command to run tests
script:
- pytest
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Build dependencies
#python
pytest
pillow==3.0.0
numpy
pandas
pyshp
geojson
# Run dependencies
33 changes: 19 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()


VERSION = '0.2.0'
VERSION = '0.2.1'
AUTHOR_NAME = 'Adam Erispaha'
AUTHOR_EMAIL = '[email protected]'

Expand All @@ -18,22 +18,27 @@ def read(fname):
'geojson',
]

setup(name='swmmio',
version=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')),
tests_require = [
'pytest',
]

setup(name = 'swmmio',
version = 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,
long_description=read('README.rst'),
include_package_data=True,
platforms="OS Independent",
license="MIT License",
classifiers=[
install_requires = install_requires,
tests_require = tests_require,
long_description = read('README.rst'),
include_package_data = True,
platforms = "OS Independent",
license = "MIT License",
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion swmmio/graphics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from definitions import FONT_PATH
from swmmio.defs.config import FONT_PATH

class _dotdict(dict):
"""dot.notation access to dictionary attributes"""
Expand Down
2 changes: 1 addition & 1 deletion swmmio/graphics/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from definitions import PARCEL_FEATURES, GEODATABASE
from swmmio.defs.config import PARCEL_FEATURES, GEODATABASE
from constants import *

font_file = r"C:\Data\Code\Fonts\Raleway-Regular.ttf"
Expand Down
2 changes: 1 addition & 1 deletion swmmio/graphics/swmm_graphics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#graphical functions for SWMM files
from definitions import *
from swmmio.defs.config import *
from swmmio.damage import parcels as pdamage
from swmmio.graphics import config, options
from swmmio.graphics.constants import * #constants
Expand Down
2 changes: 1 addition & 1 deletion swmmio/reporting/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import shutil
import math
from itertools import chain
from definitions import *
from swmmio.defs.config import *
import pandas as pd


Expand Down
2 changes: 1 addition & 1 deletion swmmio/reporting/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import os
import math
import pandas as pd
from definitions import *
from swmmio.defs.config import *
import json, geojson
import shutil

Expand Down
2 changes: 1 addition & 1 deletion swmmio/reporting/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from swmmio.utils import spatial
from swmmio.graphics import swmm_graphics as sg
from swmmio.reporting.reporting import FloodReport
from definitions import *
from swmmio.defs.config import *
import geojson


Expand Down
2 changes: 1 addition & 1 deletion swmmio/reporting/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from definitions import *
from swmmio.defs.config import *
import shutil

#THIS STUFF IS INCOMPLETE/ MAYBE BROKEN
Expand Down
2 changes: 1 addition & 1 deletion swmmio/reporting/visualize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os, shutil
import pandas as pd
from swmmio.version_control.inp import INPDiff
from definitions import *
from swmmio.defs.config import *


def create_map(model1, model2=None, bbox=None, crs=None, filename=None,
Expand Down
2 changes: 1 addition & 1 deletion swmmio/run_models/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from swmmio.utils import dataframes
from swmmio.run_models import defs
from swmmio.swmmio import Model
from definitions import SWMM_ENGINE_PATH
from swmmio.defs.config import SWMM_ENGINE_PATH


#path to the SWMM5 Engine
Expand Down
2 changes: 1 addition & 1 deletion swmmio/swmmio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import geojson
from .utils import text as txt
from .utils.dataframes import create_dataframeINP, create_dataframeRPT, get_link_coords
from definitions import *
from .defs.config import *

class Model(object):

Expand Down
8 changes: 8 additions & 0 deletions swmmio/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2018 Adam Erispaha
#
# Licensed under the terms of the BSD2 License
# See LICENSE.txt for details
# -----------------------------------------------------------------------------
"""Main tests for the swmmio"""
Loading

0 comments on commit fbf93c4

Please sign in to comment.