-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mix_split_inherent_rxns
- Loading branch information
Showing
5 changed files
with
111 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
################################################################################# | ||
# The Institute for the Design of Advanced Energy Systems Integrated Platform | ||
# Framework (IDAES IP) was produced under the DOE Institute for the | ||
# Design of Advanced Energy Systems (IDAES). | ||
# | ||
# Copyright (c) 2018-2023 by the software owners: The Regents of the | ||
# University of California, through Lawrence Berkeley National Laboratory, | ||
# National Technology & Engineering Solutions of Sandia, LLC, Carnegie Mellon | ||
# University, West Virginia University Research Corporation, et al. | ||
# All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md | ||
# for full copyright and license information. | ||
################################################################################# | ||
import os | ||
|
||
import pytest | ||
from pyomo.environ import SolverFactory | ||
|
||
from idaes.core.util.testing import _enable_scip_solver_for_testing | ||
|
||
|
||
ampl_module_scip = pytest.importorskip( | ||
"ampl_module_scip", reason="'ampl_module_scip' not available" | ||
) | ||
|
||
|
||
@pytest.mark.unit | ||
def test_path_manipulation(): | ||
path_before_enabling = str(os.environ["PATH"]) | ||
|
||
func_to_revert_changes = _enable_scip_solver_for_testing() | ||
path_after_enabling = str(os.environ["PATH"]) | ||
sf = SolverFactory("scip") | ||
assert len(path_after_enabling) > len(path_before_enabling) | ||
assert str(ampl_module_scip.bin_dir) in str(sf.executable()) | ||
assert sf.available() | ||
|
||
func_to_revert_changes() | ||
path_after_reverting = str(os.environ["PATH"]) | ||
assert path_after_reverting == path_before_enabling |
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 |
---|---|---|
|
@@ -127,7 +127,7 @@ def __getitem__(self, key): | |
# Put abstract (non-versioned) deps here. | ||
# Concrete dependencies go in requirements[-dev].txt | ||
install_requires=[ | ||
"pyomo>=6.6.2", | ||
"pyomo @ git+https://github.com/IDAES/[email protected]", | ||
"pint", # required to use Pyomo units | ||
"networkx", # required to use Pyomo network | ||
"numpy", | ||
|