Repository: pyswmm/swmm-python (language: python)

Issue:
Bump setuptools from 41.4.0 to 65.5.1 in /swmm-toolkit
Bumps [setuptools](https://github.com/pypa/setuptools) from 41.4.0 to 65.5.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pypa/setuptools/releases">setuptools's releases</a>.</em></p>
<blockquote>
<h2>v65.5.1</h2>
<p>No release notes provided.</p>
<h2>v65.5.0</h2>
<p>No release notes provided.</p>
<h2>v65.4.1</h2>
<p>No release notes provided.</p>
<h2>v65.4.0</h2>
<p>No release notes provided.</p>
<h2>v65.3.0</h2>
<p>No release notes provided.</p>
<h2>v65.2.0</h2>
<p>No release notes provided.</p>
<h2>v65.1.1</h2>
<p>No release notes provided.</p>
<h2>v65.1.0</h2>
<p>No release notes provided.</p>
<h2>v65.0.2</h2>
<p>No release notes provided.</p>
<h2>v65.0.1</h2>
<p>No release notes provided.</p>
<h2>v65.0.0</h2>
<p>No release notes provided.</p>
<h2>v64.0.3</h2>
<p>No release notes provided.</p>
<h2>v64.0.2</h2>
<p>No release notes provided.</p>
<h2>v64.0.1</h2>
<p>No release notes provided.</p>
<h2>v64.0.0</h2>
<p>No release notes provided.</p>
<h2>v63.4.3</h2>
<p>No release notes provided.</p>
<h2>v63.4.2</h2>
<p>No release notes provided.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/setuptools/blob/main/CHANGES.rst">setuptools's changelog</a>.</em></p>
<blockquote>
<h2>v65.5.1</h2>
<p>Misc
^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3638">#3638</a>: Drop a test dependency on the <code>mock</code> package, always use :external+python:py:mod:<code>unittest.mock</code> -- by :user:<code>hroncok</code></li>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3659">#3659</a>: Fixed REDoS vector in package_index.</li>
</ul>
<h2>v65.5.0</h2>
<p>Changes
^^^^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3624">#3624</a>: Fixed editable install for multi-module/no-package <code>src</code>-layout projects.</li>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3626">#3626</a>: Minor refactorings to support distutils using stdlib logging module.</li>
</ul>
<p>Documentation changes
^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3419">#3419</a>: Updated the example version numbers to be compliant with PEP-440 on the &quot;Specifying Your Project’s Version&quot; page of the user guide.</li>
</ul>
<p>Misc
^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3569">#3569</a>: Improved information about conflicting entries in the current working directory
and editable install (in documentation and as an informational warning).</li>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3576">#3576</a>: Updated version of <code>validate_pyproject</code>.</li>
</ul>
<h2>v65.4.1</h2>
<p>Misc
^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3613">#3613</a>: Fixed encoding errors in <code>expand.StaticModule</code> when system default encoding doesn't match expectations for source files.</li>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3617">#3617</a>: Merge with pypa/distutils@6852b20 including fix for <a href="https://github-redirect.dependabot.com/pypa/distutils/issues/181">pypa/distutils#181</a>.</li>
</ul>
<h2>v65.4.0</h2>
<p>Changes
^^^^^^^</p>
<ul>
<li><a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3609">#3609</a>: Merge with pypa/distutils@d82d926 including support for DIST_EXTRA_CONFIG in <a href="https://github-redirect.dependabot.com/pypa/distutils/issues/177">pypa/distutils#177</a>.</li>
</ul>
<p>v65.3.0</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/setuptools/commit/a462cb5edb324dcc56f903524b742305e4087014"><code>a462cb5</code></a> Bump version: 65.5.0 → 65.5.1</li>
<li><a href="https://github.com/pypa/setuptools/commit/de35d8be997c9f8508b425e33a1b6e52431091fa"><code>de35d8b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3656">#3656</a> from bmorris3/typos</li>
<li><a href="https://github.com/pypa/setuptools/commit/58e23de0d4c2ce0f2502d072bb9a2ed1e2ab0ba6"><code>58e23de</code></a> Update changelog. Ref <a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3659">#3659</a>.</li>
<li><a href="https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be"><code>43a9c9b</code></a> Limit the amount of whitespace to search/backtrack. Fixes <a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3659">#3659</a>.</li>
<li><a href="https://github.com/pypa/setuptools/commit/579134321d4d9397c886a5cb50cc26d0e3fa4279"><code>5791343</code></a> Add test capturing failed expectation. Ref <a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3659">#3659</a>.</li>
<li><a href="https://github.com/pypa/setuptools/commit/1f97905bc40310ca454ff1ea3884f233b7dcc88c"><code>1f97905</code></a> ⚫ Fade to black.</li>
<li><a href="https://github.com/pypa/setuptools/commit/6254567c6ae323bb8ce19a6930ae3cc5f7fb25cc"><code>6254567</code></a> Remove workaround for emacs.</li>
<li><a href="https://github.com/pypa/setuptools/commit/729b180e926634930c21ccce5558780d42707763"><code>729b180</code></a> ⚫ Fade to black.</li>
<li><a href="https://github.com/pypa/setuptools/commit/c068081a7234a0c5c322a9312654e7d0f4aaa8d1"><code>c068081</code></a> Typo corrections</li>
<li><a href="https://github.com/pypa/setuptools/commit/f777a40ed9abf529906c2939f80a184a5ed035fa"><code>f777a40</code></a> Suppress deprecation warning in --rsyncdir. Workaround for <a href="https://github-redirect.dependabot.com/pypa/setuptools/issues/3655">#3655</a>.</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/setuptools/compare/v41.4.0...v65.5.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=setuptools&package-manager=pip&previous-version=41.4.0&new-version=65.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/OpenWaterAnalytics/swmm-python/network/alerts).

</details>


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 14d41f8f..94cc39be 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -3,7 +3,7 @@ name: Build Wheels
 on: [push, pull_request]
 
 env:
-  DOCKER_IMAGE: dockcross/manylinux2014-x64
+  DOCKER_IMAGE: dockcross/manylinux2014-x64:latest
 
 
 jobs:
@@ -33,43 +33,6 @@ jobs:
         with:
           path: nrtest-swmm/dist/*.whl
 
-  test_conda_build:
-    name: Conda wheel test mac
-    runs-on: macos-latest
-    defaults:
-      run:
-        shell: bash -l {0}
-
-    steps:
-      - name: Checkout repo
-        uses: actions/checkout@v2
-        with:
-          submodules: true
-
-      - uses: conda-incubator/setup-miniconda@v2
-        with:
-          auto-update-conda: true
-          channels: conda-forge
-          # Python 3.9 does not support all libs we need in swmm-python
-          python-version: 3.8
-
-      - name: Install required system packages
-        run: brew install swig ninja
-
-      - name: Install requirements
-        run: |
-          cd swmm-toolkit
-          conda activate test
-          conda install --yes --file build-requirements.txt
-          python setup.py bdist_wheel
-
-      - name: Test wheel
-        run: |
-          cd swmm-toolkit
-          conda activate test
-          conda install --yes --file test-requirements.txt
-          python -m pip install --no-index --find-links=./dist swmm_toolkit --user
-          pytest
 
 
   build_linux_wheels:
@@ -109,7 +72,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [windows-2022, macos-10.15]
-        py: ["3.7", "3.8", "3.9", "3.10"]
+        py: ["3.7", "3.8", "3.9", "3.10", "3.11"]
         include:
           - os: windows-2022
             sys_pkgs: choco install swig
@@ -150,4 +113,4 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-artifact@v2
         with:
-          path: swmm-toolkit/dist/*.whl
\ No newline at end of file
+          path: swmm-toolkit/dist/*.whl
diff --git a/swmm-toolkit/CMakeLists.txt b/swmm-toolkit/CMakeLists.txt
index 93c16d67..3816e8b7 100644
--- a/swmm-toolkit/CMakeLists.txt
+++ b/swmm-toolkit/CMakeLists.txt
@@ -15,7 +15,7 @@ cmake_minimum_required (VERSION 3.17)
 
 project(swmm-toolkit
     VERSION
-        0.9.0
+        0.9.1
 )
 
 
diff --git a/swmm-toolkit/build-requirements.txt b/swmm-toolkit/build-requirements.txt
index 17b3977d..cc5fbd1a 100644
--- a/swmm-toolkit/build-requirements.txt
+++ b/swmm-toolkit/build-requirements.txt
@@ -1,7 +1,8 @@
 
 
 
-setuptools==41.4.0
-wheel==0.33.6
-scikit-build==0.11.1
-cmake==3.21
+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
diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py
index f821ceb1..8f5e35a9 100644
--- a/swmm-toolkit/setup.py
+++ b/swmm-toolkit/setup.py
@@ -88,7 +88,7 @@ def exclude_files(cmake_manifest):
 
 setup(
     name = "swmm-toolkit",
-    version = "0.9.0",
+    version = "0.9.1",
 
     packages = ["swmm_toolkit", "swmm.toolkit"],
     package_dir = package_dir,
@@ -120,6 +120,7 @@ def exclude_files(cmake_manifest):
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
         "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 b1aab68a..d7d4c162 100644
--- a/swmm-toolkit/src/swmm/toolkit/__init__.py
+++ b/swmm-toolkit/src/swmm/toolkit/__init__.py
@@ -19,7 +19,7 @@
 __credits__ = "Colleen Barr, Sam Hatchett"
 __license__ = "CC0 1.0 Universal"
 
-__version__ = "0.9.0"
+__version__ = "0.9.1"
 __date__ = "June 7, 2021"
 
 __maintainer__ = "Michael Tryby"
diff --git a/swmm-toolkit/tools/build-wheels.sh b/swmm-toolkit/tools/build-wheels.sh
index e1f7090c..738627ca 100755
--- a/swmm-toolkit/tools/build-wheels.sh
+++ b/swmm-toolkit/tools/build-wheels.sh
@@ -13,7 +13,7 @@ set -e -x
 
 
 # Install a system package required by our library
-sudo yum install -y swig
+# sudo yum install -y swig
 
 
 # Setup and build in swmm-toolkit dir
@@ -21,7 +21,7 @@ mkdir -p ./dist
 cd swmm-toolkit
 
 # Build wheels
-for PYBIN in /opt/python/cp{37,38,39,310}*/bin; do
+for PYBIN in /opt/python/cp{37,38,39,310,311}*/bin; do
     # Setup python virtual environment for build
     ${PYBIN}/python -m venv --clear ./build-env
     source ./build-env/bin/activate


Test patch:
diff --git a/.github/workflows/conda-test.yml b/.github/workflows/conda-test.yml
new file mode 100644
index 00000000..6890163a
--- /dev/null
+++ b/.github/workflows/conda-test.yml
@@ -0,0 +1,50 @@
+name: Conda Tests
+
+on:
+  workflow_run:
+    workflows: ["Build Wheels"]
+    types:
+      - completed
+
+
+jobs:
+  test_conda_build:
+    name: Conda wheel test mac
+    runs-on: macos-latest
+    defaults:
+      run:
+        shell: bash -l {0}
+
+    steps:
+      - name: Checkout repo
+        uses: actions/checkout@v2
+        with:
+          submodules: true
+
+      - uses: conda-incubator/setup-miniconda@v2
+        with:
+          auto-update-conda: true
+          channels: conda-forge
+          # Python 3.9 does not support all libs we need in swmm-python
+          python-version: 3.8
+
+      - name: Install required system packages
+        run: brew install swig ninja
+
+      - name: Install requirements
+        run: |
+          cd swmm-toolkit
+          conda create -n test-env pip
+          conda activate test-env
+          pip install -r build-requirements.txt
+          python setup.py bdist_wheel
+          conda deactivate
+
+      - name: Test wheel
+        run: |
+          cd swmm-toolkit
+          conda activate test-env
+          pip install -r test-requirements.txt
+          python -m pip install --no-index --find-links=./dist swmm_toolkit
+          pytest
+          conda deactivate
diff --git a/nrtest-swmm/nrtest_swmm/__init__.py b/nrtest-swmm/nrtest_swmm/__init__.py
index 3ba91075..508300df 100644
--- a/nrtest-swmm/nrtest_swmm/__init__.py
+++ b/nrtest-swmm/nrtest_swmm/__init__.py
@@ -25,8 +25,8 @@
 __credits__ = "Colleen Barr, Maurizio Cingi, Mark Gray, David Hall, Bryant McDonnell"
 __license__ = "CC0 1.0 Universal"
 
-__version__ = "0.6.0"
-__date__ = "May 8, 2020"
+__version__ = "0.7.0"
+__date__ = "Jul 28, 2021"
 
 __maintainer__ = "Michael E. Tryby"
 __email__ = "tryby.michael@epa.gov"
@@ -65,15 +65,15 @@ def swmm_allclose_compare(path_test, path_ref, rtol, atol):
     for (test, ref) in zip(ordr.output_generator(path_test),
                            ordr.output_generator(path_ref)):
 
-        if len(test[0]) != len(ref[0]):
-            raise ValueError('Inconsistent lengths')
+        # Compare arrays when lengths are unequal by truncating extra elements 
+        length = min(len(test[0]), len(ref[0]))
 
-        # Skip over results if they are equal
-        if (np.array_equal(test[0], ref[0])):
+        # Skip over results if they are equal to optimize performance
+        if (np.array_equal(test[0][:length], ref[0][:length])):
             continue
 
         else:
-            np.testing.assert_allclose(test[0], ref[0], rtol, atol)
+            np.testing.assert_allclose(test[0][:length], ref[0][:length], rtol, atol)
 
     return True
 
diff --git a/nrtest-swmm/scripts/report-diff b/nrtest-swmm/scripts/report-diff
index 054def11..8fbd085f 100644
--- a/nrtest-swmm/scripts/report-diff
+++ b/nrtest-swmm/scripts/report-diff
@@ -25,14 +25,14 @@ def _binary_diff(path_test, path_ref, min_cdd):
     for (test, ref) in zip(ordr.output_generator(path_test),
                            ordr.output_generator(path_ref)):
 
-        if len(test[0]) != len(ref[0]):
-            raise ValueError('Inconsistent lengths')
+        # Compare arrays when lengths are unequal by truncating extra elements
+        length = min(len(test[0]), len(ref[0]))
 
         # Skip over arrays that are equal
-        if np.array_equal(test[0], ref[0]):
+        if np.array_equal(test[0][:length], ref[0][:length]):
             continue
         else:
-            lre = _log_relative_error(test[0], ref[0])
+            lre = _log_relative_error(test[0][:length], ref[0][:length])
             idx = np.unravel_index(np.argmin(lre), lre.shape)
 
             if lre[idx] < min_cdd:
diff --git a/nrtest-swmm/setup.py b/nrtest-swmm/setup.py
index 7d2338d0..8d0846ff 100644
--- a/nrtest-swmm/setup.py
+++ b/nrtest-swmm/setup.py
@@ -3,11 +3,11 @@
 #
 #  setup.py
 #
-#  Modified on October 17, 2019
-#
 #  Author:     Michael E. Tryby
 #              US EPA - ORD/NRMRL
 #
+#  Modified: Jul 28, 2021
+#
 #  Usage:
 #    \>python setup.py bdist_wheel
 #
@@ -27,7 +27,7 @@
 
 setup(
     name='nrtest-swmm',
-    version='0.6.0',
+    version='0.7.0',
     description="SWMM extension for nrtest",
 
     author="Michael E. Tryby",
diff --git a/swmm-toolkit/test-requirements.txt b/swmm-toolkit/test-requirements.txt
index c6c0ef8d..f46c81c6 100644
--- a/swmm-toolkit/test-requirements.txt
+++ b/swmm-toolkit/test-requirements.txt
@@ -1,6 +1,7 @@
 
 
 
-pytest==7.1.1
-numpy==1.21.5
-aenum==3.1.11
+pytest == 7.1.1
+numpy  == 1.21.6; python_version == "3.7"
+numpy  == 1.23.4; python_version >= "3.8"
+aenum  == 3.1.11