Skip to content

Commit

Permalink
Merge branch 'main' into co2_membrane
Browse files Browse the repository at this point in the history
  • Loading branch information
ksbeattie authored Nov 21, 2024
2 parents d44f95e + b0f9156 commit 410c036
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 280 deletions.
148 changes: 0 additions & 148 deletions Jenkinsfile

This file was deleted.

1 change: 0 additions & 1 deletion docker/README.md

This file was deleted.

50 changes: 0 additions & 50 deletions docker/idaes-jupyterhub/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docker/idaes-jupyterhub/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions docker/ubuntu-conda/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docker/ubuntu-conda/README-build.md

This file was deleted.

12 changes: 0 additions & 12 deletions docker/ubuntu-conda/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Cubic Equations of State
========================

.. deprecated:: 2.7
Use :class:`idaes.models.properties.modular_properties.eos.ceos` in the Modular Property Framework instead.

This property package implements a general form of a cubic equation of state which can be used for most cubic-type equations of state. This package supports phase equilibrium calculations with a smooth phase transition formulation that makes it amenable for equation oriented optimization. The following equations of state are currently supported:

* Peng-Robinson
Expand Down
13 changes: 13 additions & 0 deletions idaes/models/properties/cubic_eos/cubic_prop_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
)
from pyomo.common.config import ConfigDict, ConfigValue, In
from pyomo.contrib.incidence_analysis import solve_strongly_connected_components
from pyomo.common.deprecation import deprecated

# Import IDAES cores
from idaes.core import (
Expand Down Expand Up @@ -97,6 +98,12 @@
_log = idaeslog.getLogger(__name__)


@deprecated(
msg="The standalone cubic property package has been deprecated in favor of the "
"cubic equation of state for the modular property framework. This class will be "
"removed in the May 2025 release.",
version="2.7.0",
)
@declare_process_block_class("CubicParameterBlock")
class CubicParameterData(PhysicalParameterBlock):
"""
Expand Down Expand Up @@ -222,6 +229,12 @@ def define_metadata(cls, obj):
)


@deprecated(
msg="The standalone cubic property package has been deprecated in favor of the "
"cubic equation of state for the modular property framework. This class will be "
"removed in the May 2025 release.",
version="2.7.0",
)
class CubicEoSInitializer(InitializerBase):
"""
Initializer for CubicEoS property packages.
Expand Down
8 changes: 5 additions & 3 deletions idaes/models/properties/cubic_eos/tests/test_BT_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
)
from pyomo.util.check_units import assert_units_consistent

import idaes.logger as idaeslog
from idaes.models.properties.tests.test_harness import PropertyTestHarness
from idaes.core.solvers import get_solver

Expand Down Expand Up @@ -76,12 +77,13 @@ def configure(self):
@pytest.mark.skipif(not prop_available, reason="Cubic root finder not available")
class TestBTExample(object):
@pytest.mark.component
def test_units(self):
def test_units(self, caplog):
m = ConcreteModel()

m.fs = FlowsheetBlock(dynamic=False)

m.fs.props = BT_PR.BTParameterBlock(valid_phase=("Vap", "Liq"))
with caplog.at_level(idaeslog.WARNING):
m.fs.props = BT_PR.BTParameterBlock(valid_phase=("Vap", "Liq"))
assert "May 2025 release." in caplog.text

m.fs.state = m.fs.props.build_state_block([0], defined_state=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
)

from idaes.core import FlowsheetBlock, Component
import idaes.logger as idaeslog
from idaes.models.properties.cubic_eos.cubic_prop_pack import (
CubicParameterBlock,
CubicStateBlock,
Expand Down Expand Up @@ -51,12 +52,13 @@ class TestParameterBlock(object):
not cubic_roots_available(), reason="Cubic functions not available"
)
@pytest.mark.unit
def test_build_default(self):
def test_build_default(self, caplog):
m = ConcreteModel()

m.fs = FlowsheetBlock(dynamic=False)

m.fs.params = CubicParameterBlock()
with caplog.at_level(idaeslog.WARNING):
m.fs.params = CubicParameterBlock()
assert "May 2025 release." in caplog.text

assert m.fs.params.state_block_class is CubicStateBlock
assert m.fs.params.config.valid_phase == ("Vap", "Liq")
Expand Down
9 changes: 2 additions & 7 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
--index-url https://pypi.python.org/simple/

# Developer extra packages

### docs
alabaster>=0.7.7
# Newer sphinx needed for proper type hint support in docstrings
sphinx>=3.0.0
sphinxcontrib-napoleon>=0.5.0
# sphinx-argparse 0.4.0 is the last version to support Python 3.9
# see https://sphinx-argparse.readthedocs.io/en/latest/changelog.html#id3
sphinx-argparse==0.4.0
sphinx-book-theme<=1.1.2,>=1.0.0
sphinx-copybutton==0.5.2
Expand All @@ -19,15 +18,11 @@ pytest-cov
# @lbianchi-lbl: both pylint and astroid should be tightly pinned; see .pylint/idaes_transform.py for more info
pylint==3.0.3
astroid==3.0.3
flake8
black==24.3.0
# pre-commit install, manage, and run pre-commit hooks
pre-commit

### other/misc
jsonschema
jupyter_contrib_nbextensions
snowballstemmer==1.2.1
addheader>=0.2.2

# this will install IDAES in editable mode using the dependencies defined under the `extras_require` tags defined in `setup.py`
Expand Down
Loading

0 comments on commit 410c036

Please sign in to comment.