Skip to content

Commit b56bd5a

Browse files
committed
Merge branch 'main' of https://github.com/USEPA/WNTR
2 parents 636e167 + 306de0b commit b56bd5a

32 files changed

+28848
-217
lines changed

.github/workflows/build_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: pypa/cibuildwheel@79b0dd328794e1180a7268444d46cdf12e1abd01 # v2.21.0
4747
env:
4848
CIBW_ENVIRONMENT: BUILD_WNTR_EXTENSIONS='true'
49-
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
49+
CIBW_BUILD: cp310-* cp311-* cp312-* cp313-*
5050
CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *-musllinux*"
5151
CIBW_REPAIR_WHEEL_COMMAND: '' # Skip repair step
5252
- name: Fix macos13 wheel names # For some reason, they come out as macos14 instead of macos13
@@ -77,7 +77,7 @@ jobs:
7777
runs-on: ${{ matrix.os }}
7878
strategy:
7979
matrix:
80-
python-version: ['3.9', '3.10', '3.11', '3.12']
80+
python-version: ['3.10', '3.11', '3.12', '3.13']
8181
os: [windows-latest, macOS-13, macos-latest, ubuntu-latest]
8282
fail-fast: false
8383
steps:
@@ -94,7 +94,7 @@ jobs:
9494
- name: Install wntr
9595
run: |
9696
python -m pip install --upgrade pip
97-
pip install wheel "numpy>=1.2.1,<2.0" scipy networkx pandas matplotlib setuptools
97+
pip install wheel "numpy>=2.2.6" scipy networkx pandas matplotlib setuptools
9898
pip install --no-index --pre --find-links=. wntr
9999
- name: Import wntr
100100
run: |
@@ -120,7 +120,7 @@ jobs:
120120
runs-on: ${{ matrix.os }}
121121
strategy:
122122
matrix:
123-
python-version: ['3.9', '3.10', '3.11', '3.12']
123+
python-version: ['3.10', '3.11', '3.12', '3.13']
124124
os: [windows-latest, macOS-13, ubuntu-latest, macos-latest]
125125
fail-fast: false
126126
steps:

.github/workflows/quick_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
test:
1616
strategy:
1717
matrix:
18-
python-version: ['3.9', '3.11']
18+
python-version: ['3.11', '3.13']
1919
fail-fast: false
2020
runs-on: ubuntu-latest
2121
steps:

documentation/advancedsim.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,10 @@ The solution for :math:`u` and :math:`v` is then returned and printed to four si
236236
>>> ns = NewtonSolver()
237237
>>> solver_status = ns.solve(m)
238238
>>> np.round(m.u.value,4)
239-
1.618
239+
np.float64(1.618)
240+
240241
>>> np.round(m.v.value,4)
241-
2.618
242+
np.float64(2.618)
242243

243244
Building MSX models
244245
-------------------

documentation/whatsnew/v1.4.0.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ Version 1.4.0 (main)
22
---------------------------------------------------
33
WNTR version 1.4.0 includes the following updates:
44

5-
* Updated binaries with the lates msx build
6-
* Added a demand pattern library
7-
* Added the salt water intrusion tutorial
8-
* Added the landslide analysis tutorial
9-
* Minor revisions to Jupyter Notebooks and documentation
5+
* Fixed status badge by @kbonney in https://github.com/USEPA/WNTR/pull/489
6+
* Added a getting started Jupyter notebook by @kbonney in https://github.com/USEPA/WNTR/pull/469
7+
* Bug fix for libepanet binaries, replaced with files from the latest build of MSX by @kbonney in https://github.com/USEPA/WNTR/pull/495
8+
* Added a demand pattern library by @kaklise in https://github.com/USEPA/WNTR/pull/492
9+
* Added a model development Jupyter notebook tutorial by @kaklise in https://github.com/USEPA/WNTR/pull/491
10+
* Added a salt water intrusion Jupyter notebook tutorial by @kbonney in https://github.com/USEPA/WNTR/pull/455
11+
* Added minor revisions to Jupyter Notebooks and documentation by @kaklise in https://github.com/USEPA/WNTR/pull/499
12+
* Removed version restriction on geopandas, and remove fiona optional dependency by @angusmcb in https://github.com/USEPA/WNTR/pull/488
13+
* Updated documentation to include release instructions, plus minor formatting updates by @kaklise in https://github.com/USEPA/WNTR/pull/502
14+
* Moved tests from Jupyter Notebooks to GitHub Action tests by @kaklise in https://github.com/USEPA/WNTR/pull/505
15+
* Bug fix for initial status and initial setting used by the WNTRSimulator by @kaklise in https://github.com/USEPA/WNTR/pull/506
16+
* Added signing of dylibs for Apple Silicon by @meggrasse in https://github.com/USEPA/WNTR/pull/498
17+
* Bug fix for MSX initial concentration and sources by @dbhart in https://github.com/USEPA/WNTR/pull/507
18+
* Resolved GeoPandas deprecation warnings by @emmanuel-ferdman in https://github.com/USEPA/WNTR/pull/510
19+
* Bug fix for vertices setter to allow for list of lists by @kaklise in https://github.com/USEPA/WNTR/pull/522
20+
* Added a model library by @kbonney in https://github.com/USEPA/WNTR/pull/509

examples/getting_started.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import wntr
88

99
# Create a water network model
10-
inp_file = 'networks/Net3.inp'
11-
wn = wntr.network.WaterNetworkModel(inp_file)
10+
wn = wntr.network.WaterNetworkModel('Net3')
1211

1312
# Simulate hydraulics
1413
sim = wntr.sim.EpanetSimulator(wn)

examples/salt_water_intrusion_tutorial.ipynb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,29 @@
429429
"salt_water_55_flush = response_quality.loc[55/24,:]\n",
430430
"ax = wntr.graphics.plot_network(wn, node_attribute=salt_water_55_flush, node_colorbar_label=\"Salt\\nconcentration\\n(kg/m$^3$)\", title=\"Flushing salt concentration hour 55\", show_plot=False, ax=axes[1])"
431431
]
432+
},
433+
{
434+
"cell_type": "markdown",
435+
"metadata": {},
436+
"source": [
437+
"# Save results to CSV files\n",
438+
"Save average baseline and response water quality results"
439+
]
440+
},
441+
{
442+
"cell_type": "code",
443+
"execution_count": null,
444+
"metadata": {},
445+
"outputs": [],
446+
"source": [
447+
"baseline_quality.mean(axis=1).to_csv('salt_water_baseline_quality.csv')\n",
448+
"response_quality.mean(axis=1).to_csv('salt_water_response_quality.csv')"
449+
]
432450
}
433451
],
434452
"metadata": {
435453
"kernelspec": {
436-
"display_name": "wntr_test",
454+
"display_name": "Python 3 (ipykernel)",
437455
"language": "python",
438456
"name": "python3"
439457
},
@@ -447,7 +465,7 @@
447465
"name": "python",
448466
"nbconvert_exporter": "python",
449467
"pygments_lexer": "ipython3",
450-
"version": "3.12.10"
468+
"version": "3.11.7"
451469
}
452470
},
453471
"nbformat": 4,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "numpy>=1.21,<2.0"]
2+
requires = ["setuptools", "numpy>=2.2.6 "]
33
build-backend = "setuptools.build_meta"
44

55
[tool.pytest.ini_options]

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Required
2-
numpy>=1.21,<2.0
3-
scipy<1.13.0
2+
numpy>=2.2.6
3+
scipy
44
networkx
55
pandas
66
matplotlib

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
MAINTAINER_EMAIL = '[email protected]'
7373
LICENSE = 'Revised BSD'
7474
URL = 'https://github.com/USEPA/WNTR'
75-
DEPENDENCIES = ['numpy>=1.21,<2.0', 'scipy', 'networkx', 'pandas', 'matplotlib', 'setuptools']
75+
DEPENDENCIES = ['numpy>=2.2.6 ', 'scipy', 'networkx', 'pandas', 'matplotlib', 'setuptools']
7676

7777
# use README file as the long description
7878
file_dir = os.path.abspath(os.path.dirname(__file__))

0 commit comments

Comments
 (0)