-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from OpenWaterAnalytics/dev
- Loading branch information
Showing
11 changed files
with
82 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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__ = "[email protected]" | ||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ cmake_minimum_required (VERSION 3.17) | |
|
||
project(swmm-toolkit | ||
VERSION | ||
0.9.0 | ||
0.9.1 | ||
) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters