Skip to content

Commit 34f504e

Browse files
authored
Merge pull request #94 from karosc/dev
Update swmm-python to latest OWA SWMM
2 parents 3a47f19 + 40c80d8 commit 34f504e

21 files changed

+515
-62
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ jobs:
7171
strategy:
7272
fail-fast: false
7373
matrix:
74-
os: [windows-2016, macos-10.15]
75-
py: [3.6, 3.7, 3.8, 3.9]
74+
os: [windows-2022, macos-10.15]
75+
py: ["3.7", "3.8", "3.9", "3.10"]
7676
include:
77-
- os: windows-2016
77+
- os: windows-2022
7878
sys_pkgs: choco install swig
7979
activate: ./build-env/Scripts/activate
8080

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "swmm-toolkit/swmm-solver"]
22
path = swmm-toolkit/swmm-solver
33
url = https://github.com/OpenWaterAnalytics/Stormwater-Management-Model.git
4-
branch = swig
4+
branch = develop

swmm-toolkit/AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ Michael Tryby <[email protected]> (public domain)
55
Jennifer Wu <[email protected]>
66
Caleb Buahin <[email protected]>
77
Laurent Courty <[email protected]>
8+
Constantine Karos <[email protected]>
9+
Abhiram Mullapudi <[email protected]>
10+
Brooke Mason <[email protected]>

swmm-toolkit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cmake_minimum_required (VERSION 3.17)
1515

1616
project(swmm-toolkit
1717
VERSION
18-
0.8.2
18+
0.9.0
1919
)
2020

2121

swmm-toolkit/build-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
setuptools==41.4.0
55
wheel==0.33.6
66
scikit-build==0.11.1
7-
cmake==3.18.4
7+
cmake==3.21

swmm-toolkit/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def run(self):
6565

6666
# Set Platform specific cmake args here
6767
if platform_system == "Windows":
68-
cmake_args = ["-GVisual Studio 15 2017 Win64"]
68+
cmake_args = ["-GVisual Studio 17 2022","-Ax64"]
6969

7070
elif platform_system == "Darwin":
7171
cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9"]
@@ -88,7 +88,7 @@ def exclude_files(cmake_manifest):
8888

8989
setup(
9090
name = "swmm-toolkit",
91-
version = "0.8.2",
91+
version = "0.9.0",
9292

9393
packages = ["swmm_toolkit", "swmm.toolkit"],
9494
package_dir = package_dir,
@@ -116,10 +116,10 @@ def exclude_files(cmake_manifest):
116116
"Operating System :: POSIX :: Linux",
117117
"Operating System :: MacOS",
118118
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
119-
"Programming Language :: Python :: 3.6",
120119
"Programming Language :: Python :: 3.7",
121120
"Programming Language :: Python :: 3.8",
122121
"Programming Language :: Python :: 3.9",
122+
"Programming Language :: Python :: 3.10",
123123
"Programming Language :: C",
124124
"Development Status :: 4 - Beta",
125125
]

swmm-toolkit/src/swmm/toolkit/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ target_link_libraries(solver
139139
set_target_properties(solver
140140
PROPERTIES
141141
SUFFIX ${PYTHON_SUFFIX}
142+
SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT
142143
MACOSX_RPATH TRUE
143144
SKIP_BUILD_RPATH FALSE
144145
BUILD_WITH_INSTALL_RPATH FALSE

swmm-toolkit/src/swmm/toolkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
__credits__ = "Colleen Barr, Sam Hatchett"
2020
__license__ = "CC0 1.0 Universal"
2121

22-
__version__ = "0.8.2"
22+
__version__ = "0.9.0"
2323
__date__ = "June 7, 2021"
2424

2525
__maintainer__ = "Michael Tryby"

swmm-toolkit/src/swmm/toolkit/output_metadata.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ def __init__(self, output_handle):
194194
shared_enum.SystemAttribute.VOLUME_STORED:
195195
("Volume Stored", self._unit_labels[shared_enum.BaseUnits.VOLUME]),
196196
shared_enum.SystemAttribute.EVAP_RATE:
197-
("Evaporation Rate", self._unit_labels[shared_enum.BaseUnits.EVAP_RATE])
197+
("Evaporation Rate", self._unit_labels[shared_enum.BaseUnits.EVAP_RATE]),
198+
shared_enum.SystemAttribute.PTNL_EVAP_RATE:
199+
("Potential Evaporation Rate", self._unit_labels[shared_enum.BaseUnits.EVAP_RATE])
198200
}
199201

200202
self._build_pollut_metadata(output_handle)

swmm-toolkit/src/swmm/toolkit/shared_enum.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ class SystemAttribute(Enum, start = 0):
304304
:attr:`~OUTFALL_FLOWS` outfall outflow
305305
:attr:`~VOLUME_STORED` storage volume
306306
:attr:`~EVAP_RATE` evaporation
307+
:attr:`~PTNL_EVAP_RATE` potential evapotranspiration
307308
============================= ====================
308309
"""
309310
AIR_TEMP = 0
@@ -320,6 +321,7 @@ class SystemAttribute(Enum, start = 0):
320321
OUTFALL_FLOWS = 11
321322
VOLUME_STORED = 12
322323
EVAP_RATE = 13
324+
PTNL_EVAP_RATE = 14
323325

324326

325327
#
@@ -430,6 +432,7 @@ class NodeResult(Enum):
430432
:attr:`~DEPTH`
431433
:attr:`~HEAD`
432434
:attr:`~LATERAL_INFLOW`
435+
:attr:`~HYD_RES_TIME`
433436
"""
434437
TOTAL_INFLOW = 0
435438
TOTAL_OUTFLOW = 1
@@ -439,14 +442,19 @@ class NodeResult(Enum):
439442
DEPTH = 5
440443
HEAD = 6
441444
LATERAL_INFLOW = 7
445+
HYD_RES_TIME = 8
442446

443447

444448
class NodePollutant(Enum):
445449
"""Node Pollutant enum class.
446450
447451
:attr:`~QUALITY`
452+
:attr:`~INFLOW_CONC`
453+
:attr:`~REACTOR_CONC`
448454
"""
449455
QUALITY = 0
456+
INFLOW_CONC = 1
457+
REACTOR_CONC = 2
450458

451459

452460
class LinkProperty(Enum):
@@ -496,9 +504,11 @@ class LinkPollutant(Enum):
496504
497505
:attr:`~QUALITY`
498506
:attr:`~TOTAL_LOAD`
507+
:attr:`~REACTOR_CONC`
499508
"""
500509
QUALITY = 0
501510
TOTAL_LOAD = 1
511+
REACTOR_CONC = 2
502512

503513

504514
class SubcatchProperty(Enum):

0 commit comments

Comments
 (0)