From 58535bc7476cb288aa8ef559aa85dc85a3ea9ca9 Mon Sep 17 00:00:00 2001 From: MichaelPesce Date: Mon, 11 Nov 2024 12:21:34 -0600 Subject: [PATCH 1/3] replace idaes log with logging log --- src/idaes_flowsheet_processor/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/idaes_flowsheet_processor/api.py b/src/idaes_flowsheet_processor/api.py index dc2cd14..5484883 100644 --- a/src/idaes_flowsheet_processor/api.py +++ b/src/idaes_flowsheet_processor/api.py @@ -38,7 +38,6 @@ import importlib_metadata as metadata # third-party -import idaes.logger as idaeslog from idaes.core.util.model_statistics import degrees_of_freedom from pydantic import BaseModel, Field, field_validator, ValidationInfo, ConfigDict import pyomo.environ as pyo @@ -48,7 +47,7 @@ FSI = TypeVar("FSI", bound="FlowsheetInterface") -_log = idaeslog.getLogger(__name__) +_log = logging.getLogger(__name__) class UnsupportedObjType(TypeError): From 998a863bfe8992f4d47e1e3f36c7637cea37cf4d Mon Sep 17 00:00:00 2001 From: MichaelPesce Date: Mon, 11 Nov 2024 12:21:55 -0600 Subject: [PATCH 2/3] use pyomo's degrees_of_freedom function --- src/idaes_flowsheet_processor/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idaes_flowsheet_processor/api.py b/src/idaes_flowsheet_processor/api.py index 5484883..c36bd39 100644 --- a/src/idaes_flowsheet_processor/api.py +++ b/src/idaes_flowsheet_processor/api.py @@ -38,7 +38,7 @@ import importlib_metadata as metadata # third-party -from idaes.core.util.model_statistics import degrees_of_freedom +from pyomo.contrib.viewer.report import degrees_of_freedom from pydantic import BaseModel, Field, field_validator, ValidationInfo, ConfigDict import pyomo.environ as pyo From b9154fdad10ca8be3a98c773538fdd0eaa42a67e Mon Sep 17 00:00:00 2001 From: MichaelPesce Date: Mon, 11 Nov 2024 14:14:29 -0600 Subject: [PATCH 3/3] move idaes from dependencies to test dependencies; update workflow accordingly --- .github/workflows/checks.yml | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b5bef25..55dcd8a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -84,7 +84,8 @@ jobs: name: Install (standard) run: | pip install "git+${{ format('{0}/{1}@{2}', github.server_url, github.repository, github.ref) }}" - - name: Install (idaes-solvers) + - if: matrix.install-mode == 'dev' + name: Install (idaes-solvers) run: | idaes get-extensions - if: matrix.coverage diff --git a/pyproject.toml b/pyproject.toml index 34e729e..0611ef9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,11 +12,11 @@ dynamic = ["version"] dependencies = [ "pydantic >= 2, <3", "pyomo", - "idaes-pse", ] [project.optional-dependencies] testing = [ "pytest >= 8", + "idaes-pse", # watertap.flowsheets currently required to be able to run tests "watertap==1.1.0rc0", ]