From e5732017f0d92cd442750d3f4b58d702e8d3e27f Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 21 Jan 2025 09:11:43 -0500 Subject: [PATCH 01/32] update manifest to include new binaries --- MANIFEST.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index bc799d13..4deb5764 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,8 +1,6 @@ include README.md include LICENSE.md -include wntr/epanet/Darwin/* -include wntr/epanet/Linux/* -include wntr/epanet/Windows/* +include wntr/epanet/libepanet/* include wntr/sim/aml/evaluator* include wntr/sim/aml/numpy.i include wntr/sim/network_isolation/network_isolation* @@ -10,4 +8,3 @@ include wntr/sim/network_isolation/numpy.i include wntr/tests/networks_for_testing/*.inp include wntr/library/msx/*.json include wntr/library/msx/*.msx -include wntr/epanet/libepanet/darwin-formula/libomp.rb From 5b6cd269f8e3cbc13e5cfc7cb482f143991424d8 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 21 Jan 2025 09:26:42 -0500 Subject: [PATCH 02/32] correct manifest syntax --- MANIFEST.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4deb5764..037a86e2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,10 @@ include README.md include LICENSE.md -include wntr/epanet/libepanet/* +include wntr/epanet/libepanet/darwin-arm/* +include wntr/epanet/libepanet/darwin-formula/* +include wntr/epanet/libepanet/darwin-x64/* +include wntr/epanet/libepanet/linux-x64/* +include wntr/epanet/libepanet/windows-x64/* include wntr/sim/aml/evaluator* include wntr/sim/aml/numpy.i include wntr/sim/network_isolation/network_isolation* From 7d7db0d551742bfbb9fdd387ca6dccd32e4bd6b4 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 12:44:45 -0500 Subject: [PATCH 03/32] make path explicit in build job --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 6cc593a9..730ab439 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,7 +40,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wntr_${{ matrix.python-version }}_${{ matrix.os }}.whl - path: dist/wntr* + path: dist/wntr_${{ matrix.python-version }}_${{ matrix.os }}.whl install_import: needs: build From 56258b9b1e894be06e026dd350b9b7feb31c59c2 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 12:48:15 -0500 Subject: [PATCH 04/32] remove explicit path --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 730ab439..6cc593a9 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,7 +40,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wntr_${{ matrix.python-version }}_${{ matrix.os }}.whl - path: dist/wntr_${{ matrix.python-version }}_${{ matrix.os }}.whl + path: dist/wntr* install_import: needs: build From a56ec71d1d78b8fc554aa03e9dd0f9f28e60bda8 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 12:52:31 -0500 Subject: [PATCH 05/32] add env variable --- .github/workflows/build_tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 6cc593a9..4307b6f6 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -34,6 +34,8 @@ jobs: pip install -r requirements.txt - name: Build wheel run: | + if [[ "${{ matrix.os }}" == "macos-13" ]]; then + export MACOSX_DEPLOYMENT_TARGET="13.0" python setup.py bdist_wheel ls dist/* - name: Save wheel From 1299dd36bceff2edb1847d5988dacd869b39065b Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 13:03:07 -0500 Subject: [PATCH 06/32] another attempt --- .github/workflows/build_tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 4307b6f6..796bcfcd 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -32,6 +32,12 @@ jobs: python -m pip install --upgrade pip pip install wheel pip install -r requirements.txt + - name: Conditionally set env var + if: runner.os == 'macOS' && matrix.os == 'macos-13' + run: | + echo "Setting MACOSX_DEPLOYMENT_TARGET to 13.0" + echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV + - name: Build wheel run: | if [[ "${{ matrix.os }}" == "macos-13" ]]; then From eb5f9f8750d2cf83100dff3045a750ccd0f56bc9 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 13:03:41 -0500 Subject: [PATCH 07/32] remove old conditional --- .github/workflows/build_tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 796bcfcd..b9c664cc 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,8 +40,6 @@ jobs: - name: Build wheel run: | - if [[ "${{ matrix.os }}" == "macos-13" ]]; then - export MACOSX_DEPLOYMENT_TARGET="13.0" python setup.py bdist_wheel ls dist/* - name: Save wheel From 982ee7a033fb25778e4e2b09c22d617aec630a66 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 13:23:58 -0500 Subject: [PATCH 08/32] try 14.0 --- .github/workflows/build_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index b9c664cc..86250076 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -35,8 +35,8 @@ jobs: - name: Conditionally set env var if: runner.os == 'macOS' && matrix.os == 'macos-13' run: | - echo "Setting MACOSX_DEPLOYMENT_TARGET to 13.0" - echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV + echo "Setting MACOSX_DEPLOYMENT_TARGET to 14.0" + echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV - name: Build wheel run: | From 0812cfe9f7cc3156442620282bcb2988e86ee053 Mon Sep 17 00:00:00 2001 From: kbonney Date: Mon, 27 Jan 2025 17:25:27 -0500 Subject: [PATCH 09/32] debugging run --- .github/workflows/build_tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 86250076..0e2d59d7 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -32,15 +32,17 @@ jobs: python -m pip install --upgrade pip pip install wheel pip install -r requirements.txt - - name: Conditionally set env var - if: runner.os == 'macOS' && matrix.os == 'macos-13' + - name: Debugging run: | - echo "Setting MACOSX_DEPLOYMENT_TARGET to 14.0" - echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV + python3 -c "import platform; print(platform.mac_ver())" + python3 -c "import sysconfig; print(sysconfig.get_platform())" + python3 -c "from distutils.util import get_platform; print(get_platform())" + echo $MACOSX_DEPLOYMENT_TARGET - name: Build wheel run: | - python setup.py bdist_wheel + # Hammer to use if all else fails for macos-13 case: python setup.py bdist_wheel --plat-name macosx-13.0-universal2 + python setup.py bdist_wheel ls dist/* - name: Save wheel uses: actions/upload-artifact@v4 From 31c2a4af9c8a81c70d6c8d3b1562f45180732b36 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 10:30:44 -0500 Subject: [PATCH 10/32] more debugging ideas --- .github/workflows/build_tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 0e2d59d7..e0c0714f 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -38,11 +38,14 @@ jobs: python3 -c "import sysconfig; print(sysconfig.get_platform())" python3 -c "from distutils.util import get_platform; print(get_platform())" echo $MACOSX_DEPLOYMENT_TARGET + export MACOSX_DEPLOYMENT_TARGET=13.0 + echo $MACOSX_DEPLOYMENT_TARGET + xcodebuild -version - name: Build wheel run: | # Hammer to use if all else fails for macos-13 case: python setup.py bdist_wheel --plat-name macosx-13.0-universal2 - python setup.py bdist_wheel + python setup.py bdist_wheel --verbose ls dist/* - name: Save wheel uses: actions/upload-artifact@v4 From 385730bfbd18c5fa4d157437e44bd0056ad87c15 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 12:12:15 -0500 Subject: [PATCH 11/32] fix debug steps --- .github/workflows/build_tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index e0c0714f..1ea11703 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,7 +40,10 @@ jobs: echo $MACOSX_DEPLOYMENT_TARGET export MACOSX_DEPLOYMENT_TARGET=13.0 echo $MACOSX_DEPLOYMENT_TARGET - xcodebuild -version + + - name: Run xcodebuild version (macos only) + if: runner.os == 'macOS' + run: xcodebuild -version - name: Build wheel run: | From f3e21e7597f3223080b3f31db3782a8555f515f4 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 14:11:17 -0500 Subject: [PATCH 12/32] adjust debug --- .github/workflows/build_tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 1ea11703..0441695d 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -37,14 +37,15 @@ jobs: python3 -c "import platform; print(platform.mac_ver())" python3 -c "import sysconfig; print(sysconfig.get_platform())" python3 -c "from distutils.util import get_platform; print(get_platform())" + + - name: Macos debug + if: runner.os == 'macOS' + run: | + xcodebuild -version echo $MACOSX_DEPLOYMENT_TARGET export MACOSX_DEPLOYMENT_TARGET=13.0 echo $MACOSX_DEPLOYMENT_TARGET - - name: Run xcodebuild version (macos only) - if: runner.os == 'macOS' - run: xcodebuild -version - - name: Build wheel run: | # Hammer to use if all else fails for macos-13 case: python setup.py bdist_wheel --plat-name macosx-13.0-universal2 From 393adfca6c96589c4599c2a9b6f46925ce943663 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 14:23:31 -0500 Subject: [PATCH 13/32] change env var before build wntr --- .github/workflows/build_tests.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 0441695d..65a7f1ba 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -26,18 +26,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python --version - python -m pip install --upgrade pip - pip install wheel - pip install -r requirements.txt - - name: Debugging - run: | - python3 -c "import platform; print(platform.mac_ver())" - python3 -c "import sysconfig; print(sysconfig.get_platform())" - python3 -c "from distutils.util import get_platform; print(get_platform())" - - name: Macos debug if: runner.os == 'macOS' run: | @@ -45,6 +33,12 @@ jobs: echo $MACOSX_DEPLOYMENT_TARGET export MACOSX_DEPLOYMENT_TARGET=13.0 echo $MACOSX_DEPLOYMENT_TARGET + - name: Install dependencies + run: | + python --version + python -m pip install --upgrade pip + pip install wheel + pip install -r requirements.txt - name: Build wheel run: | From 0eea2f448bc393d3b032c554dffd135f63c5e243 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 14:44:43 -0500 Subject: [PATCH 14/32] env var before python --- .github/workflows/build_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 65a7f1ba..33b96261 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -21,11 +21,6 @@ jobs: os: [windows-latest, macOS-13, macos-latest, ubuntu-latest] fail-fast: false steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - name: Macos debug if: runner.os == 'macOS' run: | @@ -33,6 +28,11 @@ jobs: echo $MACOSX_DEPLOYMENT_TARGET export MACOSX_DEPLOYMENT_TARGET=13.0 echo $MACOSX_DEPLOYMENT_TARGET + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python --version From 9474440c9be8ec84f7f9201097774db37093243c Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 14:52:30 -0500 Subject: [PATCH 15/32] fix macos setting --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 33b96261..9b0fbca3 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false steps: - name: Macos debug - if: runner.os == 'macOS' + if: runner.os == 'macOS-13' run: | xcodebuild -version echo $MACOSX_DEPLOYMENT_TARGET From a82aacd8c739c892a862e84e2c152d94d2a4e7a9 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 15:26:51 -0500 Subject: [PATCH 16/32] try forcing platform name --- .github/workflows/build_tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 9b0fbca3..0dd16cbd 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,6 +40,15 @@ jobs: pip install wheel pip install -r requirements.txt + - name: Build wheel (macOS-13 specific plat-name override) + run: | + if [[ "$RUNNER_OS" == "macOS-13"]]; then + python setup.py bdist_wheel --plat-name macosx-13.0-universal2 --verbose + else + python setup.py bdist_wheel --verbose + fi + ls dist/* + - name: Build wheel run: | # Hammer to use if all else fails for macos-13 case: python setup.py bdist_wheel --plat-name macosx-13.0-universal2 From 9a2543e76213f000a31b9b8fd30fe64a68bfa0f9 Mon Sep 17 00:00:00 2001 From: kbonney Date: Tue, 28 Jan 2025 17:11:41 -0500 Subject: [PATCH 17/32] fix syntax --- .github/workflows/build_tests.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 0dd16cbd..54e8bbe6 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -40,18 +40,15 @@ jobs: pip install wheel pip install -r requirements.txt - - name: Build wheel (macOS-13 specific plat-name override) + + - name: Build macos-13 + if: ${{ matrix.os == 'macOS-13'}} run: | - if [[ "$RUNNER_OS" == "macOS-13"]]; then - python setup.py bdist_wheel --plat-name macosx-13.0-universal2 --verbose - else - python setup.py bdist_wheel --verbose - fi + python setup.py bdist_wheel --plat-name macosx-13.0-universal2 --verbose ls dist/* - - - name: Build wheel + - name: Build all other OS + if: ${{ matrix.os != 'macOS-13'}} run: | - # Hammer to use if all else fails for macos-13 case: python setup.py bdist_wheel --plat-name macosx-13.0-universal2 python setup.py bdist_wheel --verbose ls dist/* - name: Save wheel From af7e606c96ec916a632681e2734d7fae9b519bf1 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 10:24:31 -0500 Subject: [PATCH 18/32] add testing step to install import --- .github/workflows/build_tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 54e8bbe6..a72d4bc9 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -21,8 +21,8 @@ jobs: os: [windows-latest, macOS-13, macos-latest, ubuntu-latest] fail-fast: false steps: - - name: Macos debug - if: runner.os == 'macOS-13' + - name: Macos debug and set deployment target variable + if: ${{ matrix.os == 'macOS-13'}} run: | xcodebuild -version echo $MACOSX_DEPLOYMENT_TARGET @@ -38,10 +38,8 @@ jobs: python --version python -m pip install --upgrade pip pip install wheel - pip install -r requirements.txt - - - - name: Build macos-13 + pip install -r requirements.txt + - name: Build macOS-13 # Special case due to unresolved wheel naming bug. if: ${{ matrix.os == 'macOS-13'}} run: | python setup.py bdist_wheel --plat-name macosx-13.0-universal2 --verbose @@ -79,9 +77,11 @@ jobs: python -m pip install --upgrade pip pip install wheel "numpy>=1.2.1,<2.0" scipy networkx pandas matplotlib setuptools pip install --no-index --pre --find-links=. wntr + pip install pytest - name: Usage of wntr run: | python -c "import wntr" + pytest --pyargs wntr.tests pytest_coverage: runs-on: ${{ matrix.os }} From 53d7d5484d1067cc4454731691ad94c0c8a515b1 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 10:27:28 -0500 Subject: [PATCH 19/32] add upper bound to plotly requirement --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 45582cf7..4628564c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ matplotlib setuptools # Optional -plotly +plotly<6.0 folium utm openpyxl From 5ab95990dd92af2201cd9bb2c6da01763cb69f37 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 10:52:48 -0500 Subject: [PATCH 20/32] checkout and install requirements.txt for wntr wheel test --- .github/workflows/build_tests.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index a72d4bc9..1982efe9 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -77,12 +77,19 @@ jobs: python -m pip install --upgrade pip pip install wheel "numpy>=1.2.1,<2.0" scipy networkx pandas matplotlib setuptools pip install --no-index --pre --find-links=. wntr - pip install pytest - - name: Usage of wntr + - name: Import wntr run: | python -c "import wntr" + - name: Checkout requirements.txt + uses: actions/checkout@v4 + with: + sparse-checkout: | + requirements.txt + fetch-depth: 1 + - name: Test wntr + run: | + pip install -r requirements.txt pytest --pyargs wntr.tests - pytest_coverage: runs-on: ${{ matrix.os }} strategy: From c3bb96265972107ce5bf12c7c91a6c957be16523 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 11:03:59 -0500 Subject: [PATCH 21/32] test only one file since others break --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 1982efe9..b5d33ba4 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -89,7 +89,7 @@ jobs: - name: Test wntr run: | pip install -r requirements.txt - pytest --pyargs wntr.tests + pytest --pyargs wntr.tests.test_sim_results pytest_coverage: runs-on: ${{ matrix.os }} strategy: From a2366aebb60e357a7de65fd59731203641095588 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 11:28:58 -0500 Subject: [PATCH 22/32] checkout tests folder for testing --- .github/workflows/build_tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index b5d33ba4..d5df1609 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -85,11 +85,13 @@ jobs: with: sparse-checkout: | requirements.txt + wntr/tests/ + sparse-checkout-cone-mode: false fetch-depth: 1 - name: Test wntr run: | pip install -r requirements.txt - pytest --pyargs wntr.tests.test_sim_results + coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest --doctest-modules --doctest-glob="*.rst" wntr pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 0f1ea1115a4f78482c0d03e8de87b84a0bb5034a Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 11:44:07 -0500 Subject: [PATCH 23/32] remove wheel testing. difficult to get working --- .github/workflows/build_tests.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index d5df1609..ffd0f280 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -80,18 +80,6 @@ jobs: - name: Import wntr run: | python -c "import wntr" - - name: Checkout requirements.txt - uses: actions/checkout@v4 - with: - sparse-checkout: | - requirements.txt - wntr/tests/ - sparse-checkout-cone-mode: false - fetch-depth: 1 - - name: Test wntr - run: | - pip install -r requirements.txt - coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest --doctest-modules --doctest-glob="*.rst" wntr pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 141ca958f5849c34bb720321fd3b8cd01f68cb2a Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 12:30:15 -0500 Subject: [PATCH 24/32] another testing attempt. --- .github/workflows/build_tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index ffd0f280..4c4066f3 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -80,6 +80,13 @@ jobs: - name: Import wntr run: | python -c "import wntr" + - name: Checkout requirements.txt + uses: actions/checkout@v4 + - name: Test wntr + run: | + pip install -r requirements.txt + python -c "import wntr; print(wntr.__file__)" + coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest --doctest-modules --doctest-glob="*.rst" wntr pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 1adbf1dd05964fe935bc9c38bf0d649c20b0ef59 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 13:03:23 -0500 Subject: [PATCH 25/32] another testing attempt. --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 4c4066f3..c94c2ab6 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -86,7 +86,7 @@ jobs: run: | pip install -r requirements.txt python -c "import wntr; print(wntr.__file__)" - coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest --doctest-modules --doctest-glob="*.rst" wntr + pytest wntr/tests/ pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 424aa692702597c212a5032f54a810921108c6f8 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 14:04:59 -0500 Subject: [PATCH 26/32] Remove test wheels, still buggy. --- .github/workflows/build_tests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index c94c2ab6..ffd0f280 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -80,13 +80,6 @@ jobs: - name: Import wntr run: | python -c "import wntr" - - name: Checkout requirements.txt - uses: actions/checkout@v4 - - name: Test wntr - run: | - pip install -r requirements.txt - python -c "import wntr; print(wntr.__file__)" - pytest wntr/tests/ pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 7256779599875fbde3525f7d9c42d94bc04e32d9 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 14:11:15 -0500 Subject: [PATCH 27/32] Try including testing data in wheel --- .github/workflows/build_tests.yml | 11 +++++++++++ MANIFEST.in | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index ffd0f280..9f9c410e 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -80,6 +80,17 @@ jobs: - name: Import wntr run: | python -c "import wntr" + - name: Checkout requirements.txt + uses: actions/checkout@v4 + with: + sparse-checkout: | + requirements.txt + sparse-checkout-cone-mode: false + fetch-depth: 1 + - name: Test wntr + run: | + pip install -r requirements.txt + pytest --pyargs wntr.tests.test_sim_results pytest_coverage: runs-on: ${{ matrix.os }} strategy: diff --git a/MANIFEST.in b/MANIFEST.in index 037a86e2..8db9bcbb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,3 +12,8 @@ include wntr/sim/network_isolation/numpy.i include wntr/tests/networks_for_testing/*.inp include wntr/library/msx/*.json include wntr/library/msx/*.msx +include wntr/tests/networks_for_testing/* +include wntr/tests/data_for_testing/* +include examples/* +include examples/demos/* +include examples/networks/* From b26edbf0c87ff2c02927bb18d918b49b14521aac Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 14:30:50 -0500 Subject: [PATCH 28/32] attempt to set working directory --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 9f9c410e..2fd16564 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -90,7 +90,7 @@ jobs: - name: Test wntr run: | pip install -r requirements.txt - pytest --pyargs wntr.tests.test_sim_results + pytest --rootdir=$(python -c "import wntr; print(wntr.__path__[0] + '/tests')") --pyargs wntr.tests.test_sim_results pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 621d5bc68958918bc7aedb20c456f4ce9755fbfe Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 14:49:46 -0500 Subject: [PATCH 29/32] another attempt --- .github/workflows/build_tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 2fd16564..dffe7dcc 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -85,12 +85,14 @@ jobs: with: sparse-checkout: | requirements.txt + wntr/tests/ + examples/ sparse-checkout-cone-mode: false fetch-depth: 1 - name: Test wntr run: | pip install -r requirements.txt - pytest --rootdir=$(python -c "import wntr; print(wntr.__path__[0] + '/tests')") --pyargs wntr.tests.test_sim_results + pytest wntr/tests/ pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 470174b2c3ccfdeddfa184f9d3ec80909805a827 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 15:37:27 -0500 Subject: [PATCH 30/32] fix libomp issue --- .github/workflows/build_tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index dffe7dcc..f01a1434 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -87,8 +87,12 @@ jobs: requirements.txt wntr/tests/ examples/ + wntr/epanet/libepanet/darwin-formula/libomp.rb sparse-checkout-cone-mode: false fetch-depth: 1 + - if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macOS-13'}} + run: | + brew reinstall --build-from-source --formula wntr/epanet/libepanet/darwin-formula/libomp.rb - name: Test wntr run: | pip install -r requirements.txt From 3b1ad6fde7ef9db36e8ac581dc256796bf560883 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 15:54:20 -0500 Subject: [PATCH 31/32] remove demos from wheel testing --- .github/workflows/build_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index f01a1434..003f4951 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -96,7 +96,7 @@ jobs: - name: Test wntr run: | pip install -r requirements.txt - pytest wntr/tests/ + pytest wntr/tests/ --ignore=wntr/tests/test_demos.py pytest_coverage: runs-on: ${{ matrix.os }} strategy: From 6c6ecd2d9db4e48c2c8bae97e63c0ad6d05420d6 Mon Sep 17 00:00:00 2001 From: kbonney Date: Wed, 29 Jan 2025 15:57:15 -0500 Subject: [PATCH 32/32] remove files and tests for demos/examples --- .github/workflows/build_tests.yml | 2 +- MANIFEST.in | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index 003f4951..bad38e0f 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -96,7 +96,7 @@ jobs: - name: Test wntr run: | pip install -r requirements.txt - pytest wntr/tests/ --ignore=wntr/tests/test_demos.py + pytest wntr/tests/ --ignore=wntr/tests/test_demos.py --ignore=wntr/tests/test_examples.py pytest_coverage: runs-on: ${{ matrix.os }} strategy: diff --git a/MANIFEST.in b/MANIFEST.in index 8db9bcbb..037a86e2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,8 +12,3 @@ include wntr/sim/network_isolation/numpy.i include wntr/tests/networks_for_testing/*.inp include wntr/library/msx/*.json include wntr/library/msx/*.msx -include wntr/tests/networks_for_testing/* -include wntr/tests/data_for_testing/* -include examples/* -include examples/demos/* -include examples/networks/*