From b2a320c49c11c571277a9876a031036ae8d237aa Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 18 Aug 2025 08:53:45 -0400 Subject: [PATCH 01/42] Update build_wheel.yml Bump upload-artifacts to v4 --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 402ea21b..f71943cd 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -121,6 +121,6 @@ jobs: CIBW_SKIP: cp36-* cp37-* pp* *-musllinux* CIBW_BUILD_VERBOSITY: 1 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl From c20e38efc4cb12da29bb0c1b8d26860c484eda30 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 18 Aug 2025 09:03:14 -0400 Subject: [PATCH 02/42] Update CMakeLists.txt SWIG -py3 flag has been deprecated --- swmm-toolkit/src/swmm/toolkit/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt index a88d77a4..99097ccb 100644 --- a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt +++ b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt @@ -12,7 +12,7 @@ ################################################################################ -set(CMAKE_SWIG_FLAGS -py3) +# set(CMAKE_SWIG_FLAGS -py3) # Determine filename suffix for python extension if(WIN32) From c2e7d197a472deb8633cec19fd819110eb3558c0 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:00:41 -0400 Subject: [PATCH 03/42] Update Python version and dependencies in workflow --- .github/workflows/build_wheel.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index f71943cd..80db695a 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -29,13 +29,13 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.10 - name: Build wheel run: | pip install wheel python setup.py bdist_wheel - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: nrtest-swmm/dist/*.whl @@ -56,7 +56,7 @@ jobs: submodules: true - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v3.1.4 with: package-dir: ./swmm-toolkit env: @@ -80,7 +80,7 @@ jobs: CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64" CIBW_BUILD_VERBOSITY: 1 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl @@ -105,7 +105,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v3.1.4 with: package-dir: ./swmm-toolkit env: From d98c9981ca48fe96e0331aa7fb269a87a1cec11b Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:07:47 -0400 Subject: [PATCH 04/42] Update OS and Python versions in CI workflow --- .github/workflows/build_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 80db695a..862eb3d7 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -46,8 +46,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-2022, macos-12] - pyver: [cp38, cp39, cp310, cp311, cp312] + os: [ubuntu-latest, windows-latest, macos-latest] + pyver: [cp39, cp310, cp311, cp312] steps: - name: Checkout repo From 637e46b80a9c4a49d940ffb06977e252a67340f5 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:12:49 -0400 Subject: [PATCH 05/42] Update CIBW_SKIP to include cp-*38 --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 862eb3d7..b1f88473 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -118,7 +118,7 @@ jobs: # only build current supported python: https://devguide.python.org/versions/ # don't build pypy or musllinux to save build time. TODO: find a good way to support those archs CIBW_BUILD: ${{matrix.pyver}}-* - CIBW_SKIP: cp36-* cp37-* pp* *-musllinux* + CIBW_SKIP: cp36-* cp37-* cp-*38 pp* *-musllinux* CIBW_BUILD_VERBOSITY: 1 - uses: actions/upload-artifact@v4 From f024b87ca622cc94a890590736b4a76bf334eb25 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:17:24 -0400 Subject: [PATCH 06/42] Revise unit test workflow for OS and action updates --- .github/workflows/unit_test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index c496033f..0e9acbfd 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -21,13 +21,13 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2022, macos-12, ubuntu-latest] + os: [windows-latest, ubuntu-latest, macos-latest] include: - - os: windows-2022 + - os: windows-latest sys_pkgs: choco install swig activate: ./build-env/Scripts/activate - - os: macos-12 + - os: macos-latest sys_pkgs: brew install swig ninja activate: source ./build-env/bin/activate @@ -36,14 +36,14 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.10" - name: Install required system packages run: ${{matrix.sys_pkgs}} @@ -60,4 +60,4 @@ jobs: run: | pip install -r test-requirements.txt pip install --no-index --find-links=./dist swmm_toolkit - pytest \ No newline at end of file + pytest From 451e46560f7b3e675b8b48ca5bf3b05adf7dc2da Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:25:02 -0400 Subject: [PATCH 07/42] Simplify unit test workflow by removing sys_pkgs Removed system package installation steps for swig and ninja. --- .github/workflows/unit_test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 0e9acbfd..ae4fbdd0 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -24,11 +24,9 @@ jobs: os: [windows-latest, ubuntu-latest, macos-latest] include: - os: windows-latest - sys_pkgs: choco install swig activate: ./build-env/Scripts/activate - os: macos-latest - sys_pkgs: brew install swig ninja activate: source ./build-env/bin/activate - os: ubuntu-latest @@ -45,9 +43,6 @@ jobs: with: python-version: "3.10" - - name: Install required system packages - run: ${{matrix.sys_pkgs}} - - name: Build wheel in virtual env run: | python -m venv --clear ./build-env From f962411647900f7c75827b794fa235ccf03620eb Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:28:12 -0400 Subject: [PATCH 08/42] Add ninja requirement for macOS platform --- swmm-toolkit/build-requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swmm-toolkit/build-requirements.txt b/swmm-toolkit/build-requirements.txt index cc5fbd1a..3c429ed6 100644 --- a/swmm-toolkit/build-requirements.txt +++ b/swmm-toolkit/build-requirements.txt @@ -5,4 +5,5 @@ setuptools == 65.5.1 wheel == 0.38.1 scikit-build == 0.11.1 cmake == 3.21 -swig == 4.0.2 \ No newline at end of file +swig == 4.0.2 +ninja; sys_platform == "darwin" From 55c698a31fbb284da884863620f5680408498cc9 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:40:05 -0400 Subject: [PATCH 09/42] Fix SWIG_COMPILE_DEFINITIONS in CMakeLists.txt --- swmm-toolkit/src/swmm/toolkit/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt index 99097ccb..664102de 100644 --- a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt +++ b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt @@ -74,7 +74,7 @@ target_link_libraries(output set_target_properties(output PROPERTIES SUFFIX ${PYTHON_SUFFIX} - SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API + SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API= MACOSX_RPATH TRUE SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE From 221cb7e2850f29d5894700a5c203e6e84bf4051e Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 10:43:47 -0400 Subject: [PATCH 10/42] Fix SWIG_COMPILE_DEFINITIONS for solver target --- swmm-toolkit/src/swmm/toolkit/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt index 664102de..d87a9b4b 100644 --- a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt +++ b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt @@ -139,7 +139,7 @@ target_link_libraries(solver set_target_properties(solver PROPERTIES SUFFIX ${PYTHON_SUFFIX} - SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT + SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT= MACOSX_RPATH TRUE SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE From eb75de211cfbd0c0e3c93f089a3e0f9053797c1e Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 25 Aug 2025 11:06:55 -0400 Subject: [PATCH 11/42] Change macOS deployment target in setup.py Update macOS deployment target from 10.9 to 11.0. --- swmm-toolkit/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py index 846887ca..75d06a27 100644 --- a/swmm-toolkit/setup.py +++ b/swmm-toolkit/setup.py @@ -88,7 +88,7 @@ def run(self): cmake_args = ["-GVisual Studio 17 2022","-Ax64"] elif platform_system == "Darwin": - cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9"] + cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"] else: cmake_args = ["-GUnix Makefiles"] From 0f59a2af80951f4069ca59ad1510f6b81dca6893 Mon Sep 17 00:00:00 2001 From: michaeltryby Date: Fri, 29 Aug 2025 20:53:39 -0400 Subject: [PATCH 12/42] Update build system for CMake 4 and OpenMP 17.0.1 --- swmm-toolkit/CMakeLists.txt | 2 +- swmm-toolkit/build-requirements.txt | 10 +-- swmm-toolkit/extern/openmp.cmake | 81 +++++++++++++------- swmm-toolkit/setup.py | 2 +- swmm-toolkit/src/swmm/toolkit/CMakeLists.txt | 4 +- swmm-toolkit/swmm-solver | 2 +- 6 files changed, 62 insertions(+), 39 deletions(-) diff --git a/swmm-toolkit/CMakeLists.txt b/swmm-toolkit/CMakeLists.txt index e73fc735..17c8d8e7 100644 --- a/swmm-toolkit/CMakeLists.txt +++ b/swmm-toolkit/CMakeLists.txt @@ -11,7 +11,7 @@ ################## CMAKELISTS FOR SWMM-TOOLKIT PROJECT ################### ################################################################################ -cmake_minimum_required (VERSION 3.17) +cmake_minimum_required (VERSION 4.0.2) project(swmm-toolkit VERSION diff --git a/swmm-toolkit/build-requirements.txt b/swmm-toolkit/build-requirements.txt index cc5fbd1a..d0f142a8 100644 --- a/swmm-toolkit/build-requirements.txt +++ b/swmm-toolkit/build-requirements.txt @@ -1,8 +1,8 @@ -setuptools == 65.5.1 -wheel == 0.38.1 -scikit-build == 0.11.1 -cmake == 3.21 -swig == 4.0.2 \ No newline at end of file +setuptools +wheel +scikit-build +cmake +swig == 4.0.2 diff --git a/swmm-toolkit/extern/openmp.cmake b/swmm-toolkit/extern/openmp.cmake index 89d74850..2df357fe 100644 --- a/swmm-toolkit/extern/openmp.cmake +++ b/swmm-toolkit/extern/openmp.cmake @@ -2,7 +2,7 @@ # CMakeLists.txt - CMake configuration file for OpenMP Library on Darwin # # Created: Mar 17, 2021 -# Updated: May 19, 2021 +# Updated: Aug 29, 2025 # # Author: Michael E. Tryby # US EPA ORD/CESER @@ -14,50 +14,73 @@ # instead. # # All sources were obtained directly from the LLVM releases on github -# See license-llvm-openmp.txt for the corresponding license and -# https://openmp.llvm.org/ for details on the OpenMP run-time. +# See license-llvm-openmp.txt for the corresponding license and +# https://openmp.llvm.org/ for details on the OpenMP run-time. ################################################################################ ##################### CMAKELISTS FOR OPENMP LIBRARY ###################### ################################################################################ -include(FetchContent) +# Append local dir to module search path +list( + APPEND CMAKE_MODULE_PATH + ${CMAKE_BINARY_DIR}/_deps/llvm_cmake-src/Modules +) + +include( + FetchContent +) + + +# v17.0.1 (v17.0.0 was yanked) +FetchContent_Declare( + llvm_cmake + URL + https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.1/cmake-17.0.1.src.tar.xz + URL_HASH + SHA256=46e745d9bdcd2e18719a47b080e65fd476e1f6c4bbaa5947e4dee057458b78bc +) -FetchContent_Declare(OpenMP +FetchContent_Declare( + OpenMP URL - https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/openmp-12.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.1/openmp-17.0.1.src.tar.xz URL_HASH - SHA256=60fe79440eaa9ebf583a6ea7f81501310388c02754dbe7dc210776014d06b091 + SHA256=d4a25c04d1bc035990a85f172bfe29a38f21ff87448f7fbae165fa780cb95717 + OVERRIDE_FIND_PACKAGE ) -set(OPENMP_STANDALONE_BUILD TRUE) -set(LIBOMP_INSTALL_ALIASES OFF) +set( + OPENMP_STANDALONE_BUILD + TRUE +) +set( + LIBOMP_INSTALL_ALIASES + OFF +) -FetchContent_MakeAvailable(OpenMP) -set(OpenMP_AVAILABLE TRUE) +FetchContent_MakeAvailable( + llvm_cmake + OpenMP +) +target_compile_options( + omp + INTERFACE + -Xclang + -fopenmp +) -target_link_directories(omp +target_link_directories( + omp PUBLIC $ - $ + $ ) -install(TARGETS omp - LIBRARY - DESTINATION - "${LIBRARY_DIST}" +add_library( + OpenMP::OpenMP_C + ALIAS + omp ) - -if(CMAKE_C_COMPILER_ID MATCHES "Clang\$") - set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I${CMAKE_BINARY_DIR}/_deps/openmp-build/runtime/src") - set(OpenMP_C_LIB_NAMES "omp") - set(OpenMP_omp_LIBRARY "${CMAKE_BINARY_DIR}/_deps/openmp-build/runtime/src/libomp.dylib") -endif() - -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang\$") - set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${CMAKE_BINARY_DIR}/_deps/openmp-build/runtime/src") - set(OpenMP_CXX_LIB_NAMES "omp") - set(OpenMP_omp_LIBRARY "${CMAKE_BINARY_DIR}/_deps/openmp-build/runtime/src/libomp.dylib") -endif() \ No newline at end of file diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py index 846887ca..6d1fa3cc 100644 --- a/swmm-toolkit/setup.py +++ b/swmm-toolkit/setup.py @@ -88,7 +88,7 @@ def run(self): cmake_args = ["-GVisual Studio 17 2022","-Ax64"] elif platform_system == "Darwin": - cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9"] + cmake_args = ["-GXcode","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"] else: cmake_args = ["-GUnix Makefiles"] diff --git a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt index 99097ccb..d87a9b4b 100644 --- a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt +++ b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt @@ -74,7 +74,7 @@ target_link_libraries(output set_target_properties(output PROPERTIES SUFFIX ${PYTHON_SUFFIX} - SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API + SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API= MACOSX_RPATH TRUE SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE @@ -139,7 +139,7 @@ target_link_libraries(solver set_target_properties(solver PROPERTIES SUFFIX ${PYTHON_SUFFIX} - SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT + SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT= MACOSX_RPATH TRUE SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE diff --git a/swmm-toolkit/swmm-solver b/swmm-toolkit/swmm-solver index 459db1d4..a04418f9 160000 --- a/swmm-toolkit/swmm-solver +++ b/swmm-toolkit/swmm-solver @@ -1 +1 @@ -Subproject commit 459db1d4dfc61ff994ae01f92eae64e378e08915 +Subproject commit a04418f9827377eeb5fc414fa481c8ee9004d18f From 8264fee3336ff1f7860052feb80158f48ca85ecb Mon Sep 17 00:00:00 2001 From: michaeltryby Date: Sat, 30 Aug 2025 14:02:41 -0400 Subject: [PATCH 13/42] Make series test end period inclusive --- swmm-toolkit/tests/test_output.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swmm-toolkit/tests/test_output.py b/swmm-toolkit/tests/test_output.py index be628881..b1f4954c 100644 --- a/swmm-toolkit/tests/test_output.py +++ b/swmm-toolkit/tests/test_output.py @@ -96,11 +96,12 @@ def test_getsubcatchseries(handle): 0.040894926, 0.011605669, 0.00509294, - 0.0027438672]) + 0.0027438672, + 0.0016718778]) test_array = output.get_subcatch_series(handle, 1, shared_enum.SubcatchAttribute.RUNOFF_RATE, 0, 10) - assert len(test_array) == 10 + assert len(test_array) == 11 assert np.allclose(test_array, ref_array) From 102840258dccf8b31c1e284faa974981f59b006a Mon Sep 17 00:00:00 2001 From: michaeltryby Date: Sat, 30 Aug 2025 14:06:17 -0400 Subject: [PATCH 14/42] Swith to develop --- swmm-toolkit/swmm-solver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/swmm-solver b/swmm-toolkit/swmm-solver index 459db1d4..a04418f9 160000 --- a/swmm-toolkit/swmm-solver +++ b/swmm-toolkit/swmm-solver @@ -1 +1 @@ -Subproject commit 459db1d4dfc61ff994ae01f92eae64e378e08915 +Subproject commit a04418f9827377eeb5fc414fa481c8ee9004d18f From 2cc7dbc3ef7c07c7897179c1f06c250b2e63aa7b Mon Sep 17 00:00:00 2001 From: michaeltryby Date: Sat, 30 Aug 2025 14:14:13 -0400 Subject: [PATCH 15/42] Unpin build requirements --- swmm-toolkit/build-requirements.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/swmm-toolkit/build-requirements.txt b/swmm-toolkit/build-requirements.txt index 3c429ed6..9d98ee98 100644 --- a/swmm-toolkit/build-requirements.txt +++ b/swmm-toolkit/build-requirements.txt @@ -1,9 +1,8 @@ -setuptools == 65.5.1 -wheel == 0.38.1 -scikit-build == 0.11.1 -cmake == 3.21 +setuptools +wheel +scikit-build +cmake swig == 4.0.2 -ninja; sys_platform == "darwin" From 9030d7f599b40933059bd7152b829d4ab4824a9f Mon Sep 17 00:00:00 2001 From: ckaros Date: Sat, 30 Aug 2025 19:53:50 -0400 Subject: [PATCH 16/42] update swig --- swmm-toolkit/build-requirements.txt | 2 +- swmm-toolkit/pyproject.toml | 6 ++-- swmm-toolkit/src/swmm/toolkit/output.i | 7 ++-- swmm-toolkit/src/swmm/toolkit/solver.i | 4 ++- swmm-toolkit/src/swmm/toolkit/swig_headers.i | 38 ++++++++++++++++++++ 5 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 swmm-toolkit/src/swmm/toolkit/swig_headers.i diff --git a/swmm-toolkit/build-requirements.txt b/swmm-toolkit/build-requirements.txt index d0f142a8..8c6bacb6 100644 --- a/swmm-toolkit/build-requirements.txt +++ b/swmm-toolkit/build-requirements.txt @@ -5,4 +5,4 @@ setuptools wheel scikit-build cmake -swig == 4.0.2 +swig diff --git a/swmm-toolkit/pyproject.toml b/swmm-toolkit/pyproject.toml index 5f79a435..538bcb3e 100644 --- a/swmm-toolkit/pyproject.toml +++ b/swmm-toolkit/pyproject.toml @@ -4,7 +4,7 @@ requires = [ "setuptools>=42", "scikit-build>=0.13", "cmake>=3.21", - "swig==4.0.2", - "ninja==1.11.1 ; sys_platform == 'darwin'" + "swig", + "ninja==1.11.1 ; sys_platform == 'darwin'", ] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/swmm-toolkit/src/swmm/toolkit/output.i b/swmm-toolkit/src/swmm/toolkit/output.i index 95fd21d8..6b894353 100644 --- a/swmm-toolkit/src/swmm/toolkit/output.i +++ b/swmm-toolkit/src/swmm/toolkit/output.i @@ -12,7 +12,6 @@ %include "typemaps.i" %include "cstring.i" - /* Docstrings for module */ %include "output_docs.i" @@ -28,6 +27,8 @@ //%rename("%(regex:/^\w+_([a-zA-Z]+)/\L\\1/)s") ""; %include "output_rename.i" +/* SWIG Override headers*/ +%include "swig_headers.i" /* MARK FUNCTIONS FOR ALLOCATING AND DEALLOCATING HANDLES */ %newobject SMO_init; @@ -77,7 +78,7 @@ and return a (possibly) different pointer */ for(int i=0; i<*$2; i++) { PyList_SetItem(o, i, PyFloat_FromDouble((double)temp[i])); } - $result = SWIG_Python_AppendOutput($result, o); + $result = SWIG_AppendOutput($result, o); SMO_freeMemory(*$1); } } @@ -94,7 +95,7 @@ and return a (possibly) different pointer */ for(int i=0; i<*$2; i++) { PyList_SetItem(o, i, PyInt_FromLong((long)temp[i])); } - $result = SWIG_Python_AppendOutput($result, o); + $result = SWIG_AppendOutput($result, o); SMO_freeMemory(*$1); } } diff --git a/swmm-toolkit/src/swmm/toolkit/solver.i b/swmm-toolkit/src/swmm/toolkit/solver.i index 49257bc0..03090212 100644 --- a/swmm-toolkit/src/swmm/toolkit/solver.i +++ b/swmm-toolkit/src/swmm/toolkit/solver.i @@ -31,6 +31,8 @@ %include "stats_typemaps.i"; +/* SWIG Override headers*/ +%include "swig_headers.i" /* TYPEMAP FOR IGNORING INT ERROR CODE RETURN VALUE */ @@ -108,7 +110,7 @@ for(int i=0; i<*$2; i++) { PyList_SetItem(o, i, PyFloat_FromDouble(temp$argnum[i])); } - $result = SWIG_Python_AppendOutput($result, o); + $result = SWIG_AppendOutput($result, o); swmm_freeMemory(*$1); } } diff --git a/swmm-toolkit/src/swmm/toolkit/swig_headers.i b/swmm-toolkit/src/swmm/toolkit/swig_headers.i new file mode 100644 index 00000000..6d1eea73 --- /dev/null +++ b/swmm-toolkit/src/swmm/toolkit/swig_headers.i @@ -0,0 +1,38 @@ + +/* +in version 4.3, swig had a breaking change. Python functions that return None +no longer implicitly return void. see https://github.com/swig/swig/pull/2907 +and https://github.com/swig/swig/issues/2905 + +This header block reverts the change from that commit, since I cannot find a +more concise way to implicitly make functions that return None just be void. + +I think the "correct" way is to define typemap(outs) that match every function +signature we have and drop the error code accordingly. +*/ +%header %{ +SWIGINTERN PyObject* +Custom_SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { + if (!result) { + result = obj; + } else if (result == Py_None) { + SWIG_Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + if (result) { + PyList_SET_ITEM(result, 0, o2); + } else { + SWIG_Py_DECREF(obj); + return o2; + } + } + PyList_Append(result,obj); + SWIG_Py_DECREF(obj); + } + return result; +} +#define SWIG_Python_AppendOutput Custom_SWIG_Python_AppendOutput +%} \ No newline at end of file From ad1c88e3e3f8e0f10408391f00838d602f776deb Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 11:59:54 -0400 Subject: [PATCH 17/42] Bump checkout and setup-python actions --- .github/workflows/build_wheel.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index b1f88473..ad7ff71a 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -22,14 +22,12 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 - with: - submodules: true + uses: actions/checkout@v5 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: '3.10' - name: Build wheel run: | From 6e5ef9b2de373e59c8f902f4109f793fe275b053 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:21:33 -0400 Subject: [PATCH 18/42] Enhance artifact handling --- .github/workflows/build_wheel.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index ad7ff71a..e394c544 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -33,11 +33,16 @@ jobs: run: | pip install wheel python setup.py bdist_wheel - - uses: actions/upload-artifact@v4 - with: - path: nrtest-swmm/dist/*.whl - + - name: Get wheel filename + run: echo "artifact_name=$(ls dist/*.whl | xargs -n1 basename)" >> $GITHUB_OUTPUT + + - name: Upload wheel artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.get_wheel.outputs.artifact_name }} + path: dist/*.whl + build_wheels: runs-on: ${{ matrix.os }} From e31109c8ea3fa6229414c46aa3becaf5ea50f422 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:28:18 -0400 Subject: [PATCH 19/42] Fix wheel artifact upload path in workflow --- .github/workflows/build_wheel.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index e394c544..a6bc9c1b 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -40,8 +40,7 @@ jobs: - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - name: ${{ steps.get_wheel.outputs.artifact_name }} - path: dist/*.whl + path: dist/${{ steps.get_wheel.outputs.artifact_name }}.whl build_wheels: From bd59d64809f5501804c4c7e04300954beb13ffa3 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:38:12 -0400 Subject: [PATCH 20/42] Fix wheel artifact upload path in workflow --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index a6bc9c1b..6d7037c4 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -40,7 +40,7 @@ jobs: - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - path: dist/${{ steps.get_wheel.outputs.artifact_name }}.whl + path: dist/${{ steps.get_wheel.outputs.artifact_name }} build_wheels: From dca2b013fcdfa93ea8766712801c6d1b18c1a4c6 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:39:44 -0400 Subject: [PATCH 21/42] Fix wheel filename retrieval in workflow --- .github/workflows/build_wheel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 6d7037c4..38027a36 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -35,12 +35,13 @@ jobs: python setup.py bdist_wheel - name: Get wheel filename - run: echo "artifact_name=$(ls dist/*.whl | xargs -n1 basename)" >> $GITHUB_OUTPUT + id: get_wheel + run: echo "artifact_name=$( ls dist/*.whl )" >> $GITHUB_OUTPUT - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - path: dist/${{ steps.get_wheel.outputs.artifact_name }} + path: ${{ steps.get_wheel.outputs.artifact_name }} build_wheels: From efd6d42d5eb13cabad71b607f732cbb5ff7262e0 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:43:40 -0400 Subject: [PATCH 22/42] Fix path for wheel artifact upload --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 38027a36..da11b436 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -41,7 +41,7 @@ jobs: - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - path: ${{ steps.get_wheel.outputs.artifact_name }} + path: ./${{ steps.get_wheel.outputs.artifact_name }} build_wheels: From d3f218872ef29b30832d34e66b1281491bd42cb8 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 12:51:35 -0400 Subject: [PATCH 23/42] Fix path for wheel artifact upload in workflow --- .github/workflows/build_wheel.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index da11b436..20dddcab 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -36,12 +36,14 @@ jobs: - name: Get wheel filename id: get_wheel - run: echo "artifact_name=$( ls dist/*.whl )" >> $GITHUB_OUTPUT + run: | + echo "PWD=$PWD" + echo "artifact_name=$( ls dist/*.whl )" >> $GITHUB_OUTPUT - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - path: ./${{ steps.get_wheel.outputs.artifact_name }} + path: $PWD/${{ steps.get_wheel.outputs.artifact_name }} build_wheels: From eeab848d8124edf50486332036d85f1d5024f911 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 13:04:07 -0400 Subject: [PATCH 24/42] Fix artifact name handling in build_wheel.yml --- .github/workflows/build_wheel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 20dddcab..ae8f9e51 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -38,12 +38,13 @@ jobs: id: get_wheel run: | echo "PWD=$PWD" - echo "artifact_name=$( ls dist/*.whl )" >> $GITHUB_OUTPUT + echo "artifact_name=$( ls dist/*.whl | xargs -n1 basename )" >> $GITHUB_OUTPUT - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - path: $PWD/${{ steps.get_wheel.outputs.artifact_name }} + name: name: ${{ steps.get_wheel.outputs.artifact_name }} + path: dist/*.whl build_wheels: From 6ec115047cdaf78c3d991db6e7df8ad978366d83 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 13:05:11 -0400 Subject: [PATCH 25/42] Simplify get_wheel step in build_wheel.yml Remove unnecessary echo command for PWD. --- .github/workflows/build_wheel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index ae8f9e51..79c5131b 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -37,7 +37,6 @@ jobs: - name: Get wheel filename id: get_wheel run: | - echo "PWD=$PWD" echo "artifact_name=$( ls dist/*.whl | xargs -n1 basename )" >> $GITHUB_OUTPUT - name: Upload wheel artifact From 61e659bbcac5afb13d4583d0334fd7a31ce9435f Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 13:08:05 -0400 Subject: [PATCH 26/42] Fix syntax error in artifact upload step --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 79c5131b..99ab2d34 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -42,7 +42,7 @@ jobs: - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - name: name: ${{ steps.get_wheel.outputs.artifact_name }} + name: ${{ steps.get_wheel.outputs.artifact_name }} path: dist/*.whl From 3a68736c0cca176548393990ddcc32b366548d27 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 13:12:47 -0400 Subject: [PATCH 27/42] Update wheel artifact upload path in workflow --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 99ab2d34..db355086 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -43,7 +43,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ steps.get_wheel.outputs.artifact_name }} - path: dist/*.whl + path: nrtest-swmm/dist/*.whl build_wheels: From cf51a66cf0de31dd957ab03c475332e386c49d80 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 16:45:10 -0400 Subject: [PATCH 28/42] Update wheel artifact upload step in workflow Removed step to get wheel filename and set a static name for the uploaded artifact. --- .github/workflows/build_wheel.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index db355086..ba624e34 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -33,16 +33,11 @@ jobs: run: | pip install wheel python setup.py bdist_wheel - - - name: Get wheel filename - id: get_wheel - run: | - echo "artifact_name=$( ls dist/*.whl | xargs -n1 basename )" >> $GITHUB_OUTPUT - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: - name: ${{ steps.get_wheel.outputs.artifact_name }} + name: nrtest-swmm-wheel path: nrtest-swmm/dist/*.whl From 2ab1a856548c100f035872228918a3ca3b2a24dd Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 16:54:59 -0400 Subject: [PATCH 29/42] Update artifact name for wheel uploads --- .github/workflows/build_wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index ba624e34..f71f6a13 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -82,6 +82,7 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }}-${{ matrix.py }} path: ./wheelhouse/*.whl build_cross_wheels: From 32f5ae9232ee84cd1da90e9e22cdd7921db71f0f Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 16:57:07 -0400 Subject: [PATCH 30/42] Update wheel artifact name to include python version --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index f71f6a13..a661c9ec 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -82,7 +82,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.os }}-${{ matrix.py }} + name: wheels-${{ matrix.os }}-${{ matrix.pyver }} path: ./wheelhouse/*.whl build_cross_wheels: From 91108e270b911ad973d43adddb3e12051efb4d51 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:07:52 -0400 Subject: [PATCH 31/42] Update macOS deployment target and skip Python versions --- .github/workflows/build_wheel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index a661c9ec..2723c1e5 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -60,6 +60,7 @@ jobs: with: package-dir: ./swmm-toolkit env: + MACOSX_DEPLOYMENT_TARGET: 11.0 CIBW_TEST_COMMAND: "pytest {package}/tests" CIBW_BEFORE_TEST: pip install -r {package}/test-requirements.txt # mac needs ninja to build @@ -74,7 +75,7 @@ jobs: # only build current supported python: https://devguide.python.org/versions/ # don't build pypy or musllinux to save build time. TODO: find a good way to support those archs CIBW_BUILD: ${{matrix.pyver}}-* - CIBW_SKIP: cp36-* cp37-* pp* *-musllinux* + CIBW_SKIP: cp38-* pp* *-musllinux* # Will avoid testing on emulated architectures # Skip trying to test arm64 builds on Intel Macs CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64" From e2aaa241eec6bfee0c288c03e662beb01cc3d6c9 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:08:50 -0400 Subject: [PATCH 32/42] Update cmake_args for macOS in setup.py Remove deployment target specification for macOS in setup.py. --- swmm-toolkit/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py index 6d1fa3cc..7feeb1e2 100644 --- a/swmm-toolkit/setup.py +++ b/swmm-toolkit/setup.py @@ -88,7 +88,7 @@ def run(self): cmake_args = ["-GVisual Studio 17 2022","-Ax64"] elif platform_system == "Darwin": - cmake_args = ["-GXcode","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"] + cmake_args = ["-GXcode"] else: cmake_args = ["-GUnix Makefiles"] From a0f808dff60168f083787e93a09234130d96a431 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:16:05 -0400 Subject: [PATCH 33/42] Add MACOSX_DEPLOYMENT_TARGET to unit test workflow Set MACOSX_DEPLOYMENT_TARGET environment variable for building wheel. --- .github/workflows/unit_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index ae4fbdd0..c6d6ecf7 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -44,6 +44,8 @@ jobs: python-version: "3.10" - name: Build wheel in virtual env + env: + MACOSX_DEPLOYMENT_TARGET: 11.0 run: | python -m venv --clear ./build-env ${{matrix.activate}} From 5da0156a58dfa39331f76ccfab0904cf41d8dde6 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:18:11 -0400 Subject: [PATCH 34/42] Change macOS architecture from x86_64 to arm64 --- .github/workflows/build_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 2723c1e5..c0a07eea 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -71,14 +71,14 @@ jobs: # configure cibuildwheel to build native archs ('auto'), and some emulated ones CIBW_ARCHS_LINUX: x86_64 CIBW_ARCHS_WINDOWS: AMD64 - CIBW_ARCHS_MACOS: x86_64 + CIBW_ARCHS_MACOS: arm64 # only build current supported python: https://devguide.python.org/versions/ # don't build pypy or musllinux to save build time. TODO: find a good way to support those archs CIBW_BUILD: ${{matrix.pyver}}-* CIBW_SKIP: cp38-* pp* *-musllinux* # Will avoid testing on emulated architectures # Skip trying to test arm64 builds on Intel Macs - CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64" + CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_x86_64 *-macosx_universal2:arm64" CIBW_BUILD_VERBOSITY: 1 - uses: actions/upload-artifact@v4 From a5178ae4799263dbec604bc0358bbe1bcf800f0b Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:21:16 -0400 Subject: [PATCH 35/42] Fix MACOSX_DEPLOYMENT_TARGET format in workflow --- .github/workflows/unit_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index c6d6ecf7..4a830649 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -45,7 +45,7 @@ jobs: - name: Build wheel in virtual env env: - MACOSX_DEPLOYMENT_TARGET: 11.0 + MACOSX_DEPLOYMENT_TARGET: "11.0" run: | python -m venv --clear ./build-env ${{matrix.activate}} From 083390b0bc4acd4e6f49570a15c9539d2a968adf Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 17:25:59 -0400 Subject: [PATCH 36/42] Change MACOSX_DEPLOYMENT_TARGET to string format --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index c0a07eea..58b8d395 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -60,7 +60,7 @@ jobs: with: package-dir: ./swmm-toolkit env: - MACOSX_DEPLOYMENT_TARGET: 11.0 + MACOSX_DEPLOYMENT_TARGET: "11.0" CIBW_TEST_COMMAND: "pytest {package}/tests" CIBW_BEFORE_TEST: pip install -r {package}/test-requirements.txt # mac needs ninja to build From f77c28d8de2a749026cda4b11ac9c737eb6f5e22 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 20:42:28 -0400 Subject: [PATCH 37/42] Update macOS architecture settings in build workflow --- .github/workflows/build_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 58b8d395..25d19248 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -71,14 +71,14 @@ jobs: # configure cibuildwheel to build native archs ('auto'), and some emulated ones CIBW_ARCHS_LINUX: x86_64 CIBW_ARCHS_WINDOWS: AMD64 - CIBW_ARCHS_MACOS: arm64 + CIBW_ARCHS_MACOS: x86_64 arm64 # only build current supported python: https://devguide.python.org/versions/ # don't build pypy or musllinux to save build time. TODO: find a good way to support those archs CIBW_BUILD: ${{matrix.pyver}}-* CIBW_SKIP: cp38-* pp* *-musllinux* # Will avoid testing on emulated architectures # Skip trying to test arm64 builds on Intel Macs - CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_x86_64 *-macosx_universal2:arm64" + CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_universal2:arm64" CIBW_BUILD_VERBOSITY: 1 - uses: actions/upload-artifact@v4 From 4de8ffaaff0562877c8cb31e15c8ba269a9197d9 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 20:55:56 -0400 Subject: [PATCH 38/42] Update GitHub Actions workflow for building wheels --- .github/workflows/build_wheel.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 25d19248..ef4046cf 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -87,16 +87,15 @@ jobs: path: ./wheelhouse/*.whl build_cross_wheels: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: [ubuntu-latest,macos-12] pyver: [cp38, cp39, cp310, cp311, cp312] steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v5 with: submodules: true @@ -116,13 +115,13 @@ jobs: CIBW_BEFORE_BUILD_LINUX: rm -f $(which swig) && rm -f $(which swig4.0) # configure cibuildwheel to build native archs ('auto'), and some emulated ones CIBW_ARCHS_LINUX: aarch64 - CIBW_ARCHS_MACOS: arm64 # only build current supported python: https://devguide.python.org/versions/ # don't build pypy or musllinux to save build time. TODO: find a good way to support those archs CIBW_BUILD: ${{matrix.pyver}}-* - CIBW_SKIP: cp36-* cp37-* cp-*38 pp* *-musllinux* + CIBW_SKIP: cp-*38 pp* *-musllinux* CIBW_BUILD_VERBOSITY: 1 - uses: actions/upload-artifact@v4 with: + name: wheels-linux-aarch64-${{ matrix.pyver }} path: ./wheelhouse/*.whl From b08774ab70b0c11cdacfea7339c15a61122f423f Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Sun, 31 Aug 2025 21:01:01 -0400 Subject: [PATCH 39/42] Add Python 3.13 to build matrix in workflows --- .github/workflows/build_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index ef4046cf..92fa2f8c 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -47,7 +47,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - pyver: [cp39, cp310, cp311, cp312] + pyver: [cp39, cp310, cp311, cp312, cp313] steps: - name: Checkout repo @@ -91,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - pyver: [cp38, cp39, cp310, cp311, cp312] + pyver: [cp39, cp310, cp311, cp312, cp313] steps: - name: Checkout repo From a620d26f19f83f967334951a9a75428049229705 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Mon, 1 Sep 2025 10:57:06 -0400 Subject: [PATCH 40/42] Update test requirements for pytest and numpy --- swmm-toolkit/test-requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swmm-toolkit/test-requirements.txt b/swmm-toolkit/test-requirements.txt index 0cc9aaba..812ef65c 100644 --- a/swmm-toolkit/test-requirements.txt +++ b/swmm-toolkit/test-requirements.txt @@ -1,8 +1,8 @@ -pytest == 7.1.1 -numpy == 1.21.6; python_version == "3.7" -numpy == 1.24.4; python_version < "3.12" -numpy == 1.26.2; python_version >= "3.12" +pytest == 8.4.1 +numpy == 2.0.2; python_version < "3.10" +numpy == 2.2.6; python_version == "3.10.*" +numpy == 2.3.2; python_version >= "3.11" aenum == 3.1.11 From 05348062404e2eedbcc370533fb7b9195cadfd73 Mon Sep 17 00:00:00 2001 From: michaeltryby Date: Tue, 2 Sep 2025 21:01:17 -0400 Subject: [PATCH 41/42] Move OpenMP to swmm-solver --- swmm-toolkit/CMakeLists.txt | 12 +- swmm-toolkit/extern/license-llvm-openmp.txt | 361 ------------------- swmm-toolkit/extern/openmp.cmake | 86 ----- swmm-toolkit/src/swmm/toolkit/CMakeLists.txt | 3 +- swmm-toolkit/swmm-solver | 2 +- 5 files changed, 3 insertions(+), 461 deletions(-) delete mode 100644 swmm-toolkit/extern/license-llvm-openmp.txt delete mode 100644 swmm-toolkit/extern/openmp.cmake diff --git a/swmm-toolkit/CMakeLists.txt b/swmm-toolkit/CMakeLists.txt index 17c8d8e7..99308d30 100644 --- a/swmm-toolkit/CMakeLists.txt +++ b/swmm-toolkit/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists.txt - CMake configuration file for swmm-toolkit python package # # Created: Feb 6, 2020 -# Modified Jun 7, 2021 +# Modified Sep 2, 2025 # # Author: See AUTHORS # @@ -36,16 +36,6 @@ cmake_policy(SET CMP0078 NEW) cmake_policy(SET CMP0086 NEW) include(${SWIG_USE_FILE}) -# If wheel build on Apple fetch and build OpenMP Library -if (APPLE) - include(./extern/openmp.cmake) -else() - find_package(OpenMP - REQUIRED - OPTIONAL_COMPONENTS - C - ) -endif() # Add project subdirectories add_subdirectory(swmm-solver) diff --git a/swmm-toolkit/extern/license-llvm-openmp.txt b/swmm-toolkit/extern/license-llvm-openmp.txt deleted file mode 100644 index 99075663..00000000 --- a/swmm-toolkit/extern/license-llvm-openmp.txt +++ /dev/null @@ -1,361 +0,0 @@ -============================================================================== -The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: -============================================================================== - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----- LLVM Exceptions to the Apache 2.0 License ---- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into an Object form of such source code, you -may redistribute such embedded portions in such Object form without complying -with the conditions of Sections 4(a), 4(b) and 4(d) of the License. - -In addition, if you combine or link compiled forms of this Software with -software that is licensed under the GPLv2 ("Combined Software") and if a -court of competent jurisdiction determines that the patent provision (Section -3), the indemnity provision (Section 9) or other Section of the License -conflicts with the conditions of the GPLv2, you may retroactively and -prospectively choose to deem waived or otherwise exclude such Section(s) of -the License, but only in their entirety and only with respect to the Combined -Software. - -============================================================================== -Software from third parties included in the LLVM Project: -============================================================================== -The LLVM Project contains third party software which is under different license -terms. All such code will be identified clearly using at least one of two -mechanisms: -1) It will be in a separate directory tree with its own `LICENSE.txt` or - `LICENSE` file at the top containing the specific license and restrictions - which apply to that software, or -2) It will contain specific license and restriction terms at the top of every - file. - -============================================================================== -Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): -============================================================================== - -The software contained in this directory tree is dual licensed under both the -University of Illinois "BSD-Like" license and the MIT license. As a user of -this code you may choose to use it under either license. As a contributor, -you agree to allow your code to be used under both. The full text of the -relevant licenses is included below. - -In addition, a license agreement from the copyright/patent holders of the -software contained in this directory tree is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 1997-2019 Intel Corporation - -All rights reserved. - -Developed by: - OpenMP Runtime Team - Intel Corporation - http://www.openmprtl.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of Intel Corporation OpenMP Runtime Team nor the - names of its contributors may be used to endorse or promote products - derived from this Software without specific prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 1997-2019 Intel Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -============================================================================== - -Intel Corporation - -Software Grant License Agreement ("Agreement") - -Except for the license granted herein to you, Intel Corporation ("Intel") reserves -all right, title, and interest in and to the Software (defined below). - -Definition - -"Software" means the code and documentation as well as any original work of -authorship, including any modifications or additions to an existing work, that -is intentionally submitted by Intel to llvm.org (http://llvm.org) ("LLVM") for -inclusion in, or documentation of, any of the products owned or managed by LLVM -(the "Work"). For the purposes of this definition, "submitted" means any form of -electronic, verbal, or written communication sent to LLVM or its -representatives, including but not limited to communication on electronic -mailing lists, source code control systems, and issue tracking systems that are -managed by, or on behalf of, LLVM for the purpose of discussing and improving -the Work, but excluding communication that is conspicuously marked otherwise. - -1. Grant of Copyright License. Subject to the terms and conditions of this - Agreement, Intel hereby grants to you and to recipients of the Software - distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable copyright license to reproduce, prepare derivative - works of, publicly display, publicly perform, sublicense, and distribute the - Software and such derivative works. - -2. Grant of Patent License. Subject to the terms and conditions of this - Agreement, Intel hereby grants you and to recipients of the Software - distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable (except as stated in this section) patent license - to make, have made, use, offer to sell, sell, import, and otherwise transfer - the Work, where such license applies only to those patent claims licensable - by Intel that are necessarily infringed by Intel's Software alone or by - combination of the Software with the Work to which such Software was - submitted. If any entity institutes patent litigation against Intel or any - other entity (including a cross-claim or counterclaim in a lawsuit) alleging - that Intel's Software, or the Work to which Intel has contributed constitutes - direct or contributory patent infringement, then any patent licenses granted - to that entity under this Agreement for the Software or Work shall terminate - as of the date such litigation is filed. - -Unless required by applicable law or agreed to in writing, the software is -provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -either express or implied, including, without limitation, any warranties or -conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A -PARTICULAR PURPOSE. - -============================================================================== diff --git a/swmm-toolkit/extern/openmp.cmake b/swmm-toolkit/extern/openmp.cmake deleted file mode 100644 index 2df357fe..00000000 --- a/swmm-toolkit/extern/openmp.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# -# CMakeLists.txt - CMake configuration file for OpenMP Library on Darwin -# -# Created: Mar 17, 2021 -# Updated: Aug 29, 2025 -# -# Author: Michael E. Tryby -# US EPA ORD/CESER -# -# Note: -# Need to build libomp for binary compatibility with Python. -# -# OpenMP library build fails for Xcode generator. Use Ninja or Unix Makefiles -# instead. -# -# All sources were obtained directly from the LLVM releases on github -# See license-llvm-openmp.txt for the corresponding license and -# https://openmp.llvm.org/ for details on the OpenMP run-time. - -################################################################################ -##################### CMAKELISTS FOR OPENMP LIBRARY ###################### -################################################################################ - - -# Append local dir to module search path -list( - APPEND CMAKE_MODULE_PATH - ${CMAKE_BINARY_DIR}/_deps/llvm_cmake-src/Modules -) - -include( - FetchContent -) - - -# v17.0.1 (v17.0.0 was yanked) -FetchContent_Declare( - llvm_cmake - URL - https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.1/cmake-17.0.1.src.tar.xz - URL_HASH - SHA256=46e745d9bdcd2e18719a47b080e65fd476e1f6c4bbaa5947e4dee057458b78bc -) - -FetchContent_Declare( - OpenMP - URL - https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.1/openmp-17.0.1.src.tar.xz - URL_HASH - SHA256=d4a25c04d1bc035990a85f172bfe29a38f21ff87448f7fbae165fa780cb95717 - OVERRIDE_FIND_PACKAGE -) - -set( - OPENMP_STANDALONE_BUILD - TRUE -) -set( - LIBOMP_INSTALL_ALIASES - OFF -) - -FetchContent_MakeAvailable( - llvm_cmake - OpenMP -) - -target_compile_options( - omp - INTERFACE - -Xclang - -fopenmp -) - -target_link_directories( - omp - PUBLIC - $ - $ -) - -add_library( - OpenMP::OpenMP_C - ALIAS - omp -) diff --git a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt index d87a9b4b..34d735fc 100644 --- a/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt +++ b/swmm-toolkit/src/swmm/toolkit/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists.txt - CMake configuration file for swmm.toolkit python package # # Created: Feb 6, 2020 -# Updated: May 19, 2021 +# Updated: Sep 2, 2025 # # Author: See AUTHORS # @@ -133,7 +133,6 @@ target_link_libraries(solver PUBLIC $<$>:Python3::Module> swmm5 - $<$:OpenMP::OpenMP_C> ) set_target_properties(solver diff --git a/swmm-toolkit/swmm-solver b/swmm-toolkit/swmm-solver index a04418f9..24cdf73c 160000 --- a/swmm-toolkit/swmm-solver +++ b/swmm-toolkit/swmm-solver @@ -1 +1 @@ -Subproject commit a04418f9827377eeb5fc414fa481c8ee9004d18f +Subproject commit 24cdf73c3d7cf3bb62f0bff150d5987f1f826889 From 03a41f329aa10ce48b82d97a7cd309ed99f44a17 Mon Sep 17 00:00:00 2001 From: Bryant E McDonnell Date: Thu, 4 Sep 2025 09:58:11 -0600 Subject: [PATCH 42/42] Staging Release Changes --- swmm-toolkit/AUTHORS | 1 + swmm-toolkit/setup.py | 11 +++++------ swmm-toolkit/src/swmm/toolkit/__init__.py | 13 ++++++------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/swmm-toolkit/AUTHORS b/swmm-toolkit/AUTHORS index a908903a..5d76256d 100644 --- a/swmm-toolkit/AUTHORS +++ b/swmm-toolkit/AUTHORS @@ -2,6 +2,7 @@ Michael Tryby (public domain) +Michael Tryby Jennifer Wu Caleb Buahin Laurent Courty diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py index 7feeb1e2..4430e8a2 100644 --- a/swmm-toolkit/setup.py +++ b/swmm-toolkit/setup.py @@ -2,7 +2,7 @@ # setup.py - Setup script for swmm-toolkit python package # # Created: Jul 2, 2018 -# Updated: Jun 7, 2021 +# Updated: Sep 4, 2025 # # Author: See AUTHORS # @@ -112,13 +112,13 @@ def exclude_files(cmake_manifest): setup( name = "swmm-toolkit", - version = "0.15.5", + version = "0.16.0", packages = ["swmm_toolkit", "swmm.toolkit"], package_dir = package_dir, zip_safe = False, - install_requires = ["aenum==3.1.11"], + install_requires = ["aenum>=3.1.11"], cmdclass = {"clean": CleanCommand}, cmake_args = cmake_args, @@ -130,7 +130,7 @@ def exclude_files(cmake_manifest): url='https://github.com/pyswmm/swmm-python', author='See AUTHORS', - maintainer_email='bemcdonnell@gmail.com', + maintainer_email='michael.tryby@gmail.com', license='CC0', license_files=license_files, keywords="swmm5, swmm, stormwater, hydraulics, hydrology", @@ -140,12 +140,11 @@ def exclude_files(cmake_manifest): "Operating System :: POSIX :: Linux", "Operating System :: MacOS", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: C", "Development Status :: 5 - Production/Stable", ] diff --git a/swmm-toolkit/src/swmm/toolkit/__init__.py b/swmm-toolkit/src/swmm/toolkit/__init__.py index 9d09fa28..7ac565cc 100644 --- a/swmm-toolkit/src/swmm/toolkit/__init__.py +++ b/swmm-toolkit/src/swmm/toolkit/__init__.py @@ -4,7 +4,7 @@ # __init__.py - SWMM toolkit package # # Created: Aug 9, 2018 -# Updated: July 2, 2022 +# Updated: September 4, 2025 # # Author: See AUTHORS # @@ -15,16 +15,15 @@ __author__ = "See AUTHORS" -__copyright__ = "None" -__credits__ = "Colleen Barr, Sam Hatchett" +__credits__ = "Colleen Barr" __license__ = "CC0 1.0 Universal" -__version__ = "0.15.5" -__date__ = "June 7, 2021" +__version__ = "0.16.0" +__date__ = "September 4, 2025" __maintainer__ = "Michael Tryby" -__email__ = "tryby.michael@epa.gov" -__status__ = "Beta" +__email__ = "michael.tryby@gmail.com" +__status__ = "Production/Stable" import os