Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
c3ac42c
first init mod
kurbansitterley Nov 21, 2025
e9f56df
add __all__
kurbansitterley Nov 21, 2025
315ead4
rename cryst prop pack
kurbansitterley Nov 21, 2025
aadb413
rename NaCl T dep
kurbansitterley Nov 21, 2025
4fc5574
fix imports coag prop pack
kurbansitterley Nov 21, 2025
daacba6
fix import and rename cryst tests
kurbansitterley Nov 21, 2025
5fd847a
fix MCAS import
kurbansitterley Nov 21, 2025
7183065
fix NaCl import
kurbansitterley Nov 21, 2025
71ae1ae
fix NaCl tdep import; rename tests
kurbansitterley Nov 21, 2025
b137f16
fix NDMA import
kurbansitterley Nov 21, 2025
46d12a4
fix sw import
kurbansitterley Nov 21, 2025
858efa3
fix water import
kurbansitterley Nov 21, 2025
fe7aa8c
rename and move ZO prop pack
kurbansitterley Nov 21, 2025
978e2f9
rename cryst prop pack
kurbansitterley Nov 21, 2025
ade8656
result of moving and renaming ZO prop pack
kurbansitterley Nov 21, 2025
961c5a9
rename zo prop pack
kurbansitterley Nov 21, 2025
c985687
prop pack init
kurbansitterley Nov 21, 2025
ec9bbba
fix sim cryst prop pack import
kurbansitterley Nov 21, 2025
188d3bf
fix dye desal fs imports
kurbansitterley Nov 21, 2025
c3ed4a0
fix ed fs imports
kurbansitterley Nov 21, 2025
9538cd3
fix gac and generic train imports
kurbansitterley Nov 21, 2025
6922e91
fix ix fs imports
kurbansitterley Nov 21, 2025
cc667f9
change lsrro imports
kurbansitterley Nov 21, 2025
a1416ea
black
kurbansitterley Nov 21, 2025
7e7564f
more black
kurbansitterley Nov 21, 2025
47b5227
RO config classes importable
kurbansitterley Nov 21, 2025
84e8347
fix asm1 test imports
kurbansitterley Nov 21, 2025
5f1f7b3
fix asm1 rxn imports
kurbansitterley Nov 21, 2025
2cebf33
asm1 rxn imports again
kurbansitterley Nov 21, 2025
c36972e
fix asm1 thermo imports
kurbansitterley Nov 21, 2025
9899d37
chkpont: add idaes.core imports; more unit specific imports
kurbansitterley Nov 21, 2025
24e745e
fix cryst fs imports
kurbansitterley Nov 21, 2025
bd2acc2
fix dye desal fs imports
kurbansitterley Nov 21, 2025
ca66548
fix generic train fs imports
kurbansitterley Nov 21, 2025
969ddda
fix desalter fs imports
kurbansitterley Nov 21, 2025
3ec555f
fix lsrro fs import in multi_sweep
kurbansitterley Nov 21, 2025
f156da1
tmp md fs imports
kurbansitterley Nov 21, 2025
97d5f19
fix AS test prop model imports
kurbansitterley Nov 21, 2025
aad5789
fix AD test prop model imports
kurbansitterley Nov 21, 2025
06ec6d9
move TDep label for consistency
kurbansitterley Nov 21, 2025
13d28af
finish property_models dir
kurbansitterley Nov 21, 2025
e0927d1
finish AS fs dir
kurbansitterley Nov 21, 2025
e522667
fix imports in translator dir
kurbansitterley Nov 21, 2025
a550064
AD fs imports
kurbansitterley Nov 21, 2025
b1c0371
fix imports in ED fs dir
kurbansitterley Nov 21, 2025
623fa58
move ActivatedSludgeModelType
kurbansitterley Nov 21, 2025
19aa5d3
fix electroNP imports
kurbansitterley Nov 21, 2025
33eb09c
fix full water res fac fs dir imports
kurbansitterley Nov 21, 2025
cd80306
add more to unit models init
kurbansitterley Nov 21, 2025
47fa9ba
fix gac fs dir imports
kurbansitterley Nov 21, 2025
ddc8b32
fix generic desal fs dir imports
kurbansitterley Nov 21, 2025
6047231
fix ix fs imports
kurbansitterley Nov 21, 2025
9765804
lsrro fs dir imports
kurbansitterley Nov 21, 2025
af4f48a
fix MD fs dir imports
kurbansitterley Nov 21, 2025
76ab8d0
MVC fs dir imports
kurbansitterley Nov 21, 2025
f947577
fix nf_dspmde fs imports
kurbansitterley Nov 21, 2025
757abd9
fix oaro fs dir imports
kurbansitterley Nov 21, 2025
f2c4c8a
fix RO w ERD fs dir imports
kurbansitterley Nov 21, 2025
1d7fbe9
fix sw RO desal fs dir imports
kurbansitterley Nov 21, 2025
79ae982
fix import
kurbansitterley Nov 21, 2025
d0c9816
add MomentumBalanceType
kurbansitterley Nov 21, 2025
6245096
small import tweaks
kurbansitterley Nov 21, 2025
ad9b407
add cstr inj scaler, boron removal, coag/floc model
kurbansitterley Nov 21, 2025
135efed
fix unit model tests imports through dewatering
kurbansitterley Nov 21, 2025
f294ae1
black
kurbansitterley Nov 21, 2025
aeea390
database not solute_list
kurbansitterley Nov 22, 2025
b5f5e40
revert multi sweep
kurbansitterley Nov 22, 2025
19a9b57
revert lsrro
kurbansitterley Nov 22, 2025
ac3700b
try move _lsrro_presweep?
kurbansitterley Nov 22, 2025
47ea657
alphabetical
kurbansitterley Nov 22, 2025
87fa477
steam ejector not injector
kurbansitterley Nov 22, 2025
9c93423
add more config enums
kurbansitterley Nov 22, 2025
99d53ba
finish test imports
kurbansitterley Nov 22, 2025
1e7006e
revert lsrro
kurbansitterley Nov 22, 2025
85f72be
remove unit model config enums
kurbansitterley Nov 22, 2025
08c79d8
update how to run ZO model
kurbansitterley Nov 22, 2025
f19dff1
update how to use prop model
kurbansitterley Nov 22, 2025
173a3b0
update how to setup simple RO
kurbansitterley Nov 22, 2025
7596984
update how to setup RO config
kurbansitterley Nov 22, 2025
3ddac00
update how to use MCAS
kurbansitterley Nov 22, 2025
4f8c583
remove duplicate pyunits import
kurbansitterley Nov 22, 2025
46ac1b1
update how to use property test harness
kurbansitterley Nov 22, 2025
2759466
update how to use test harness
kurbansitterley Nov 22, 2025
b0261bd
update unit model doc headers
kurbansitterley Nov 22, 2025
38f4c11
add import headers to prop model docs
kurbansitterley Nov 22, 2025
b47e81e
rename ZO properties to ZO prop pack
kurbansitterley Nov 22, 2025
73bfa84
update init for zo prop pack
kurbansitterley Nov 22, 2025
fd719a9
add zo prop pack docs and update/correct
kurbansitterley Nov 22, 2025
354c538
update imports in docs
kurbansitterley Nov 22, 2025
a43e6d5
random import updates
kurbansitterley Nov 22, 2025
5dc0f3d
correct separator import
kurbansitterley Nov 22, 2025
415f59b
correct ED 1stack fs config import
kurbansitterley Nov 22, 2025
0d63807
drop the __all__ for linting
kurbansitterley Nov 23, 2025
00e2f36
new line after end of section
kurbansitterley Nov 23, 2025
c5fce52
add academy testing and comment out rest of tests for speedy confirma…
Dec 18, 2025
705df08
Merge remote-tracking branch 'watertap-origin/main' into import-prop-…
Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
325 changes: 173 additions & 152 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,160 +70,160 @@ jobs:
run: |
pylint watertap

tests:
name: Tests (py${{ matrix.python-version }}/${{ matrix.os }})
runs-on: ${{ matrix.os-version }}
needs: [code-formatting]
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
os:
- linux
- win64
# - macos
include:
- os: linux
os-version: ubuntu-22.04
- os: win64
os-version: windows-2022
# - os: macos
# os-version: macos-10.15
- python-version: '3.10'
# limit uploading coverage report for a single Python version in the matrix
coverage: true
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: watertap-dev
python-version: ${{ matrix.python-version }}
miniforge-version: latest
- name: Install dependencies
run: |
echo '::group::Output of "conda install" commands'
conda install --quiet --yes pip setuptools wheel pandoc
echo '::endgroup::'
echo '::group::Output of "pip install" commands'
pip install -r requirements-dev.txt
echo '::endgroup::'
echo '::group::Output of "conda install -c conda-forge cyipopt" command'
conda install -c conda-forge cyipopt
echo '::endgroup::'
echo '::group::Display installed packages'
conda list
pip list
pip show idaes-pse
echo '::endgroup::'
echo '::group::Output of "idaes get-extensions" command'
idaes get-extensions --extra petsc --verbose
echo '::endgroup::'
- name: Add coverage report pytest options
if: matrix.coverage
run:
|
echo PYTEST_ADDOPTS="$PYTEST_ADDOPTS --cov --cov-report=xml" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest --pyargs watertap --idaes-flowsheets --entry-points-group watertap.flowsheets
- name: Upload coverage report as job artifact
if: matrix.coverage
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.os }}
path: coverage.xml
if-no-files-found: error
- name: Test documentation code
run: |
make -C docs doctest -d
# TODO: this should be moved to a dedicated job/workflow
# until then, we can leave this here as a reminder
- name: Test documentation links
if: 'false'
run: |
make -C docs linkcheck -d
# tests:
# name: Tests (py${{ matrix.python-version }}/${{ matrix.os }})
# runs-on: ${{ matrix.os-version }}
# needs: [code-formatting]
# strategy:
# fail-fast: false
# matrix:
# python-version:
# - '3.9'
# - '3.10'
# - '3.11'
# os:
# - linux
# - win64
# # - macos
# include:
# - os: linux
# os-version: ubuntu-22.04
# - os: win64
# os-version: windows-2022
# # - os: macos
# # os-version: macos-10.15
# - python-version: '3.10'
# # limit uploading coverage report for a single Python version in the matrix
# coverage: true
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: conda-incubator/setup-miniconda@v3
# with:
# activate-environment: watertap-dev
# python-version: ${{ matrix.python-version }}
# miniforge-version: latest
# - name: Install dependencies
# run: |
# echo '::group::Output of "conda install" commands'
# conda install --quiet --yes pip setuptools wheel pandoc
# echo '::endgroup::'
# echo '::group::Output of "pip install" commands'
# pip install -r requirements-dev.txt
# echo '::endgroup::'
# echo '::group::Output of "conda install -c conda-forge cyipopt" command'
# conda install -c conda-forge cyipopt
# echo '::endgroup::'
# echo '::group::Display installed packages'
# conda list
# pip list
# pip show idaes-pse
# echo '::endgroup::'
# echo '::group::Output of "idaes get-extensions" command'
# idaes get-extensions --extra petsc --verbose
# echo '::endgroup::'
# - name: Add coverage report pytest options
# if: matrix.coverage
# run:
# |
# echo PYTEST_ADDOPTS="$PYTEST_ADDOPTS --cov --cov-report=xml" >> $GITHUB_ENV
# - name: Test with pytest
# run: |
# pytest --pyargs watertap --idaes-flowsheets --entry-points-group watertap.flowsheets
# - name: Upload coverage report as job artifact
# if: matrix.coverage
# uses: actions/upload-artifact@v4
# with:
# name: coverage-report-${{ matrix.os }}
# path: coverage.xml
# if-no-files-found: error
# - name: Test documentation code
# run: |
# make -C docs doctest -d
# # TODO: this should be moved to a dedicated job/workflow
# # until then, we can leave this here as a reminder
# - name: Test documentation links
# if: 'false'
# run: |
# make -C docs linkcheck -d

upload-coverage:
name: Upload coverage report (Codecov)
needs: [tests]
runs-on: ubuntu-latest
steps:
# the checkout step is needed to have access to codecov.yml
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: coverage-report-*
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
# NOTE: secrets are not available for pull_request workflows
# However, as of 2024-02-10, Codecov is still allowing tokenless upload from PRs
# but does require token for other workflows e.g. merge to `main`
# see https://github.com/codecov/codecov-action/issues/1274#issuecomment-1934437359
token: ${{ secrets.CODECOV_TOKEN }}
# downgrading after v0.7.0 broke tokenless upload
# see codecov/codecov-action#1487
version: v0.6.0
# upload-coverage:
# name: Upload coverage report (Codecov)
# needs: [tests]
# runs-on: ubuntu-latest
# steps:
# # the checkout step is needed to have access to codecov.yml
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# pattern: coverage-report-*
# - name: Upload coverage report to Codecov
# uses: codecov/codecov-action@v4
# with:
# fail_ci_if_error: true
# verbose: true
# # NOTE: secrets are not available for pull_request workflows
# # However, as of 2024-02-10, Codecov is still allowing tokenless upload from PRs
# # but does require token for other workflows e.g. merge to `main`
# # see https://github.com/codecov/codecov-action/issues/1274#issuecomment-1934437359
# token: ${{ secrets.CODECOV_TOKEN }}
# # downgrading after v0.7.0 broke tokenless upload
# # see codecov/codecov-action#1487
# version: v0.6.0

user-mode-pytest:
name: pytest (user mode) (py${{ matrix.python-version }}/${{ matrix.os }})
runs-on: ${{ matrix.os-version }}
needs: [code-formatting]
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.11'
os:
- linux
- win64
include:
- os: linux
os-version: ubuntu-22.04
- os: win64
os-version: windows-2022
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: watertap
python-version: ${{ matrix.python-version }}
- name: Define install URL (default)
env:
_repo_full_name: watertap-org/watertap
_ref_to_install: main
run: |
echo "_install_url=https://github.com/${_repo_full_name}/archive/${_ref_to_install}.zip" >> $GITHUB_ENV
- name: Define install URL (for PRs)
if: github.event.pull_request
env:
_repo_full_name: ${{ github.event.pull_request.head.repo.full_name }}
_ref_to_install: ${{ github.event.pull_request.head.sha }}
run:
echo "_install_url=https://github.com/${_repo_full_name}/archive/${_ref_to_install}.zip" >> $GITHUB_ENV
- name: Install watertap and testing dependencies
run: |
echo '::group::Output of "pip install" commands'
pip install "watertap @ ${_install_url}" pytest
echo '::endgroup::'
echo '::group::Display installed packages'
conda list
pip list
pip show idaes-pse
echo '::endgroup::'
echo '::group::Output of "idaes get-extensions" command'
idaes get-extensions --extra petsc --verbose
echo '::endgroup::'
- name: Run pytest
run: |
pytest --pyargs watertap
# user-mode-pytest:
# name: pytest (user mode) (py${{ matrix.python-version }}/${{ matrix.os }})
# runs-on: ${{ matrix.os-version }}
# needs: [code-formatting]
# strategy:
# fail-fast: false
# matrix:
# python-version:
# - '3.9'
# - '3.11'
# os:
# - linux
# - win64
# include:
# - os: linux
# os-version: ubuntu-22.04
# - os: win64
# os-version: windows-2022
# steps:
# - name: Set up Python ${{ matrix.python-version }}
# uses: conda-incubator/setup-miniconda@v3
# with:
# activate-environment: watertap
# python-version: ${{ matrix.python-version }}
# - name: Define install URL (default)
# env:
# _repo_full_name: watertap-org/watertap
# _ref_to_install: main
# run: |
# echo "_install_url=https://github.com/${_repo_full_name}/archive/${_ref_to_install}.zip" >> $GITHUB_ENV
# - name: Define install URL (for PRs)
# if: github.event.pull_request
# env:
# _repo_full_name: ${{ github.event.pull_request.head.repo.full_name }}
# _ref_to_install: ${{ github.event.pull_request.head.sha }}
# run:
# echo "_install_url=https://github.com/${_repo_full_name}/archive/${_ref_to_install}.zip" >> $GITHUB_ENV
# - name: Install watertap and testing dependencies
# run: |
# echo '::group::Output of "pip install" commands'
# pip install "watertap @ ${_install_url}" pytest
# echo '::endgroup::'
# echo '::group::Display installed packages'
# conda list
# pip list
# pip show idaes-pse
# echo '::endgroup::'
# echo '::group::Output of "idaes get-extensions" command'
# idaes get-extensions --extra petsc --verbose
# echo '::endgroup::'
# - name: Run pytest
# run: |
# pytest --pyargs watertap

notebooks:
name: Test notebooks (py${{ matrix.python-version }}/${{ matrix.os }})
Expand Down Expand Up @@ -275,3 +275,24 @@ jobs:
- name: Run pytest with nbmake
run: |
pytest --nbmake --nbmake-kernel="${{ env.WATERTAP_KERNEL_NAME }}" **/*.ipynb
- name: Clone watertap-academy repository
uses: actions/checkout@v4
with:
repository: watertap-org/watertap_academy_fall_2025
path: watertap_academy_fall_2025

- name: Install academy kernel
run: |
jupyter kernelspec list
python -m ipykernel install --user --name "watertap-academy"
jupyter kernelspec list

- name: Run pytest on academy notebooks
run: |
cd watertap_academy_fall_2025
echo '::group::Running pytest on notebooks'
if ! pytest --nbmake --nbmake-kernel="watertap-academy" **/*.ipynb; then
echo "Pytest failed!"
exit 1
fi
echo '::endgroup::'
8 changes: 4 additions & 4 deletions docs/how_to_guides/how_to_run_models_in_a_py_script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Example: Python file with recommended structure
# Import flowsheet block from IDAES core
from idaes.core import FlowsheetBlock
# Import NaCl property model
import watertap.property_models.NaCl_prop_pack as props
from watertap.property_models import NaClParameterBlock
# Import utility tool for calculating scaling factors
from idaes.core.util.scaling import calculate_scaling_factors
# Import RO model
Expand All @@ -77,7 +77,7 @@ Example: Python file with recommended structure
# Create a concrete model, flowsheet, and NaCl property parameter block.
m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=False)
m.fs.properties = props.NaClParameterBlock()
m.fs.properties = NaClParameterBlock()
# Add an RO unit to the flowsheet.
m.fs.unit = ReverseOsmosis0D(property_package=m.fs.properties)

Expand Down Expand Up @@ -128,7 +128,7 @@ Example: the same code without recommended structure (may cause errors on Window
# Import flowsheet block from IDAES core
from idaes.core import FlowsheetBlock
# Import NaCl property model
import watertap.property_models.NaCl_prop_pack as props
from watertap.property_models import NaClParameterBlock
# Import utility tool for calculating scaling factors
from idaes.core.util.scaling import calculate_scaling_factors
# Import RO model
Expand All @@ -139,7 +139,7 @@ Example: the same code without recommended structure (may cause errors on Window
# Create a concrete model, flowsheet, and NaCl property parameter block.
m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=False)
m.fs.properties = props.NaClParameterBlock()
m.fs.properties = NaClParameterBlock()
# Add an RO unit to the flowsheet.
m.fs.unit = ReverseOsmosis0D(property_package=m.fs.properties)

Expand Down
6 changes: 3 additions & 3 deletions docs/how_to_guides/how_to_run_zero_order_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The example script shown below is for the dual media filtration zero-order model
from idaes.core import FlowsheetBlock
from watertap.core.solvers import get_solver

from watertap.core.wt_database import Database
from watertap.core.zero_order_properties import WaterParameterBlock
from watertap.core import Database
from watertap.property_models import ZOParameterBlock
from watertap.unit_models.zero_order import DualMediaFiltrationZO


Expand All @@ -22,7 +22,7 @@ The example script shown below is for the dual media filtration zero-order model

# Create an IDAES flowsheet and define the solutes
model.fs = FlowsheetBlock(dynamic=False)
model.fs.params = WaterParameterBlock(solute_list=["nonvolatile_toc", "toc", "tss"])
model.fs.params = ZOParameterBlock(solute_list=["nonvolatile_toc", "toc", "tss"])

# Setup the zero-order model and define inlet flows
model.fs.unit = DualMediaFiltrationZO(
Expand Down
Loading
Loading