diff --git a/.github/workflows/wheel_build.yml b/.github/workflows/wheel_build.yml new file mode 100644 index 00000000..4708d167 --- /dev/null +++ b/.github/workflows/wheel_build.yml @@ -0,0 +1,96 @@ +name: Wheel build + +on: + pull_request: + branches: + - master + push: + branches: + - dev + workflow_dispatch: + +jobs: + build_nrtest_plugin: + name: Build nrtest-swmm plugin + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./nrtest-swmm + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Build wheel + run: | + pip install wheel + python setup.py bdist_wheel + + - name: Upload wheel + uses: actions/upload-artifact@v3 + with: + name: nrtest-swmm-wheel + path: nrtest-swmm/dist/*.whl + + + build_swmm_lib: + name: Build swmm library + runs-on: windows-2019 + defaults: + run: + shell: bash + working-directory: swmm-toolkit/swmm-solver/ci-tools/linux + + steps: + - name: Checkout swmm-python repo + uses: actions/checkout@v3 + with: + submodules: true + + - name: Checkout ci-tools repo + uses: actions/checkout@v3 + with: + repository: michaeltryby/ci-tools + ref: master + path: swmm-toolkit/swmm-solver/ci-tools + + - name: Build + run: ./make.sh -g "Visual Studio 16 2019" + + - name: Upload dependency + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: swmm-lib + path: swmm-toolkit/swmm-solver/upload/*.* + + + build_swmm_wheel: + name: Build swmm-toolkit wheel + needs: [ build_swmm_lib ] + runs-on: windows-2019 + defaults: + run: + shell: bash + working-directory: ./swmm-toolkit + + steps: + - name: Checkout swmm-python repo + uses: actions/checkout@v3 + with: + submodules: false + + - name: Download dependency + uses: actions/download-artifact@v3 + with: + name: swmm-lib + path: ./swmm-toolkit/extern + + - name: Build wheel in virtual env + run: | + ls extern diff --git a/nrtest-swmm/nrtest_swmm/__init__.py b/nrtest-swmm/nrtest_swmm/__init__.py index 508300df..5c730333 100644 --- a/nrtest-swmm/nrtest_swmm/__init__.py +++ b/nrtest-swmm/nrtest_swmm/__init__.py @@ -4,7 +4,7 @@ # __init__.py - nrtest_swmm module # # Author: Michael E. Tryby -# US EPA - ORD/NRMRL +# US EPA - ORD/CESER # ''' @@ -25,8 +25,8 @@ __credits__ = "Colleen Barr, Maurizio Cingi, Mark Gray, David Hall, Bryant McDonnell" __license__ = "CC0 1.0 Universal" -__version__ = "0.7.0" -__date__ = "Jul 28, 2021" +__version__ = "0.8.0" +__date__ = "Oct 17, 2023" __maintainer__ = "Michael E. Tryby" __email__ = "tryby.michael@epa.gov" @@ -108,9 +108,10 @@ def swmm_report_compare(path_test, path_ref, rtol, atol): HEADER = 4 FOOTER = 4 - with open(path_test ,'r') as ftest, open(path_ref, 'r') as fref: + with open(path_test ,'r', encoding="ISO-8859-1") as ftest, \ + open(path_ref, 'r', encoding="ISO-8859-1") as fref: - for (test_line, ref_line) in zip(hdf.parse(ftest, HEADER, FOOTER)[1], + for (test_line, ref_line) in zip(hdf.parse(ftest, HEADER, FOOTER)[1], \ hdf.parse(fref, HEADER, FOOTER)[1]): if test_line != ref_line: diff --git a/nrtest-swmm/setup.py b/nrtest-swmm/setup.py index 8d0846ff..62d51ee0 100644 --- a/nrtest-swmm/setup.py +++ b/nrtest-swmm/setup.py @@ -6,7 +6,7 @@ # Author: Michael E. Tryby # US EPA - ORD/NRMRL # -# Modified: Jul 28, 2021 +# Modified: Oct 17, 2023 # # Usage: # \>python setup.py bdist_wheel @@ -27,7 +27,7 @@ setup( name='nrtest-swmm', - version='0.7.0', + version='0.8.0', description="SWMM extension for nrtest", author="Michael E. Tryby",