Skip to content

Commit

Permalink
Merge branch 'master' into LID-USAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
asselapathirana authored May 4, 2023
2 parents f8d836e + adffe65 commit 1fb5553
Show file tree
Hide file tree
Showing 60 changed files with 4,357 additions and 570 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: CI Tests

on:
push:
branches: [ "master" ]
tags:
- v*
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
ci_matrix:
name: Unit Tests
strategy:
matrix:
python_version: [3.7, 3.8, 3.9, "3.10"]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not uses_geopandas"
python -m doctest swmmio/core.py
release:
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
needs: [ci_matrix]
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build package
run: |
echo ${{ github.ref }}
echo ${{ github.ref_type }}
pip install wheel
python setup.py bdist_wheel
- name: Publish distribution 📦 to Test PyPI
if: ${{ github.ref_type == 'tag'}}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: ${{ github.ref_type == 'tag'}}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 5 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Abhiram Mullapudi <abhiramm@umich.edu> <pluto@Abhirams-MacBook-Pro.local>
Adam Erispaha <aerispaha@gmail.com> <Adam.Erispaha@water.gov>
Adam Erispaha <aerispaha@gmail.com> <arispaha@gmail.com>
Adam Erispaha <aerispaha@gmail.com> aerispaha <aerispaha@gmail.com>
Jackie Fortin-Flefil <jackieff@umich.edu>
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing authors listed in alphabetical order:

Abhiram Mullapudi <abhiramm@umich.edu>
Adam Erispaha <aerispaha@gmail.com>
Bryant E. McDonnell <bemcdonnell@gmail.com>
Jackie Fortin-Flefil <jackieff@umich.edu>
Jenn Wu <jwu@emnet.net>
Stijn Van Hoey <stijn@fluves.com>
algchyhao <35864573+algchyhao@users.noreply.github.com>
139 changes: 138 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,145 @@
## Version 0.6.5 (2023/05/02)

### What's Changed
* Added inp coverage for DIVIDERS, LOSSES, AQUIFERS, and GROUNDWATER [PR192](https://github.com/aerispaha/swmmio/pull/192)
* Made progress on [#57](https://github.com/aerispaha/swmmio/issues/57), read/write interface to all INP sections

## Version 0.6.4 (2023/04/28)

### What's Changed
* Added coverage for STREETS, INLETS, and INLET_USAGE in [PR186](https://github.com/aerispaha/swmmio/pull/186)
* Made progress on [#57](https://github.com/aerispaha/swmmio/issues/57), read/write interface to all INP sections
* added AUTHORS, provided by @bemmcdonnel and @aerispaha in [PR183](https://github.com/aerispaha/swmmio/pull/183)

## Version 0.6.3 (2023/04/26)

### What's Changed
* Added coverage for TAGS, provided by @BuczynskiRafal in [PR186](https://github.com/aerispaha/swmmio/pull/186)
* Code simplification in Model.conduits [PR189](https://github.com/aerispaha/swmmio/pull/189)

## Version 0.6.2 (2023/02/02)

### What's Changed
* Profile wrapup by @bemcdonnell in https://github.com/aerispaha/swmmio/pull/173
* minor tweaks for pep8 code style enforcement by @aerispaha in https://github.com/aerispaha/swmmio/pull/178
* drop appveyor and release with GitHub Actions by @aerispaha in https://github.com/aerispaha/swmmio/pull/179
* write_inp_section changes - don't change the Polygons header by @BuczynskiRafal in https://github.com/aerispaha/swmmio/pull/182

## New Contributors
* @BuczynskiRafal made their first contribution in https://github.com/aerispaha/swmmio/pull/182

**Full Changelog**: https://github.com/aerispaha/swmmio/compare/v0.6.0...v0.6.2

## Version 0.6.1 (2023/01/05)

### Issues Closed

* [Issue 175](https://github.com/aerispaha/swmmio/issues/175) - Drop Appveyor, leverage GitHub Actions for deploy logic
* [Issue 172](https://github.com/aerispaha/swmmio/issues/172) - Improvements to Profile Plotter feature

In this release 2 issues were closed, 2 PRs were merged.

## Version 0.6.0 (2022/12/29)

### Issues Closed

* [Issue 75](https://github.com/aerispaha/swmmio/issues/75) - Update and unit test the run_models module
* [Issue 153](https://github.com/aerispaha/swmmio/issues/153) - Add Profile Plotter
* [PR 165](https://github.com/aerispaha/swmmio/pull/165) - Add profile plotter and pyswmm integration
* [PR 170](https://github.com/aerispaha/swmmio/pull/170) - Add INP sections to model.inp properties
* raingages
* evaporation
* pollutants
* rdii
* hydrographs
* buildup
* washoff
* coverages
* loadings
* landuses

In this release 2 issues were closed, 2 PRs were merged, and a lot of progress was
made on [Issue 57](https://github.com/aerispaha/swmmio/issues/57).


## Version 0.5.3 (2022/12/21)

### Issues Closed

* [Issue 162](https://github.com/aerispaha/swmmio/issues/162) - fix version number in readthedocs title

In this release 1 issues was closed.

## Version 0.5.2 (2022/12/20)

### Issues Closed

* [Issue 159](https://github.com/aerispaha/swmmio/issues/159) - Drop travis CI from the build pipeline
* [Issue 157](https://github.com/aerispaha/swmmio/issues/157) - Configure GitHub Actions test matrix
* [Issue 141](https://github.com/aerispaha/swmmio/issues/141) - model.inp.headers gives "UnboundLocalError: local variable 'h' referenced before assignment"
* Include core.py doctests in GitHub Actions and Appveyor build tests

In this release 3 issues were closed.

## Version 0.5.1 (2022/12/08)

### Issues Closed

* [Issue 151](https://github.com/aerispaha/swmmio/issues/151) - Model.nodes.geojson coordinates are improperly structured

In this release 1 issues were closed.

## Version 0.5.0 (2022/12/08)

### Issues Closed

* [Issue 150](https://github.com/aerispaha/swmmio/issues/150) - add DWF to inp module
* [Issue 148](https://github.com/aerispaha/swmmio/issues/148) - pyproj>=3.0.0 needed in setup.py
* Update test environment to Python 3.8

In this release 2 issues were closed.

## Version 0.4.13 (2022/12/07)

### Issues Closed

* [Issue 108](https://github.com/aerispaha/swmmio/issues/108) - rpt.node_flooding_summary fails when no nodes are flooded
* [Issue 146](https://github.com/aerispaha/swmmio/issues/146) - add optional custom basemap to create_map function

In this release 2 issues were closed.

## Version 0.4.12 (2022/12/05)

### Issues Closed

* [Issue 142](https://github.com/aerispaha/swmmio/issues/142) - fails to parse RPT when generated with Open Water Analytics SWMM

In this release 1 issues were closed.

## Version 0.4.11 (2022/12/04)

### Issues Closed

* [Issue 134](https://github.com/aerispaha/swmmio/issues/134) - update export_to_shapefile to handle changes to pyshp API

In this release 1 issues were closed.


## Version 0.4.10 (2022/09/22)

### Issues Closed

* [Issue 130](https://github.com/aerispaha/swmmio/issues/130) - model.inp.infiltration yielding IndexError: list index out of range
* [Issue 131](https://github.com/aerispaha/swmmio/issues/131) - KeyError 'Horton' while extracting data
* [Issue 132](https://github.com/aerispaha/swmmio/issue/132) - Weir Dataframe Problem

In this release 3 issues were closed.

## Version 0.4.9 (2022/02/22)

### Issues Closed

* [PR 128](https://github.com/aerispaha/swmmio/issues/128) - Docs build fails due to m2r dependency
* [Issue 128](https://github.com/aerispaha/swmmio/issues/128) - Docs build fails due to m2r dependency
* [PR 127](https://github.com/aerispaha/swmmio/pull/127) - Define max_columns option as a display option
* [PR 117](https://github.com/aerispaha/swmmio/pull/117) - Speeding up lookup of inp sections and bracketed words

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Adam Erispaha
Copyright (c) 2018-2023 Adam Erispaha, and swmmio developers (See AUTHORS)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# swmmio
*v0.4.9 (2022/02/22)*
*v0.6.5 (2023/05/02)*

[![Build status](https://ci.appveyor.com/api/projects/status/qywujm5w2wm0y2tv/branch/master?svg=true)](https://ci.appveyor.com/project/aerispaha/swmmio/branch/master)
[![Build Status](https://travis-ci.com/aerispaha/swmmio.svg?branch=master)](https://travis-ci.com/aerispaha/swmmio)
[![Documentation Status](https://readthedocs.org/projects/swmmio/badge/?version=v0.4.9)](https://swmmio.readthedocs.io/en/v0.4.9/?badge=v0.4.9)
![example workflow](https://github.com/aerispaha/swmmio/actions/workflows/python-app.yml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/swmmio/badge/?version=v0.4.10)](https://swmmio.readthedocs.io/en/v0.4.10/?badge=v0.4.10)

![Kool Picture](docs/img/impact_of_option.png?raw=true "Impact of Option")
`swmmio` is a set of python tools aiming to provide a means for version control and visualizing results from the EPA Stormwater Management Model (SWMM). Command line tools are also provided for running models individually and in parallel via Python's `multiprocessing` module. These tools are being developed specifically for the application of flood risk management, though most functionality is applicable to SWMM modeling in general.
Expand Down
37 changes: 0 additions & 37 deletions appveyor.yml

This file was deleted.

6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
from m2r import MdInclude
import os
import sys
import swmmio

sys.path.insert(0, os.path.abspath('../../swmmio'))

# -- Project information -----------------------------------------------------

project = 'swmmio'
copyright = '2020, Adam Erispaha'
copyright = '2022, Adam Erispaha'
author = 'Adam Erispaha'

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.4.6'
release = swmmio.__version__


# -- General configuration ---------------------------------------------------
Expand Down
Binary file removed lib/linux/swmm5
Binary file not shown.
Binary file removed lib/windows/swmm5_22.exe
Binary file not shown.
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ numpy>=1.16.4
pandas>=0.24.2
pyshp==2.1.0
geojson==2.5.0
networkx>=2.4
networkx>=2.3
pyyaml>=3.12
recommonmark
m2r
mistune==0.8.4
# Run dependencies
pyproj>=3.0.0
geopandas
matplotlib
pyswmm>=1.2
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ def get_description():
'pandas>=0.24.2',
'pyshp==2.1.0',
'geojson>=2.4.1',
'networkx>=2.4',
"networkx>=2.3,<2.8.1;python_version<'3.8'",
"networkx>=2.3,<3;python_version>='3.8'",
'pyyaml>=3.12',
'pyproj>=3.0.0'
]

tests_require = [
Expand Down Expand Up @@ -66,7 +68,9 @@ def get_description():
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
)
Loading

0 comments on commit 1fb5553

Please sign in to comment.