Skip to content

Commit

Permalink
Merge pull request watertap-org#141 from MichaelPesce/use-idaes-flows…
Browse files Browse the repository at this point in the history
…heet-processor

Update fsapi to idaes-flowsheet-processor api
  • Loading branch information
MichaelPesce authored Nov 26, 2024
2 parents cfdbe3c + ab8c7fc commit e8bef6c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/app/internal/flowsheet_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# package-local
from app.internal.settings import Deployment, AppSettings
from watertap.ui.fsapi import FlowsheetInterface
from idaes_flowsheet_processor.api import FlowsheetInterface
import idaes.logger as idaeslog

_log = idaeslog.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion backend/app/routers/flowsheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from app.internal.flowsheet_manager import FlowsheetManager, FlowsheetInfo
from app.internal.parameter_sweep import run_parameter_sweep
from app.internal.log_parser import parse_logs
from watertap.ui.fsapi import FlowsheetInterface, FlowsheetExport
from idaes_flowsheet_processor.api import FlowsheetInterface, FlowsheetExport
import idaes.logger as idaeslog

CURRENT = "current"
Expand Down
3 changes: 2 additions & 1 deletion backend/requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,5 @@ webencodings==0.5.1
websocket-client==1.7.0
widgetsnbextension==4.0.10
wrapt==1.16.0
zipp==3.17.0
zipp==3.17.0
git+https://github.com/watertap-org/idaes-flowsheet-processor.git
2 changes: 2 additions & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ asgiref==3.5.2
certifi==2021.10.8
click==8.1.3
fastapi==0.110.0
flexparser != 0.4
h11==0.13.0
idna==3.3
pydantic==2.6.4
Expand All @@ -19,5 +20,6 @@ typing_extensions==4.9.0
uvicorn==0.17.6
importlib_resources==5.9.0 ; python_version < "3.10"
git+https://github.com/watertap-org/watertap.git
git+https://github.com/watertap-org/idaes-flowsheet-processor.git
# watertap @ git+https://github.com/MichaelPesce/watertap@update-pydantic

2 changes: 1 addition & 1 deletion backend/tests/app/internal/examples/api_example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from watertap.ui.fsapi import FlowsheetInterface
from idaes_flowsheet_processor.api import FlowsheetInterface
from idaes.core.solvers import get_solver


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from watertap.ui.fsapi import FlowsheetInterface
from idaes_flowsheet_processor.api import FlowsheetInterface
from idaes.core.solvers import get_solver


Expand Down
4 changes: 2 additions & 2 deletions backend/tests/app/routers/test_flowsheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from urllib.parse import quote

from watertap.ui.fsapi import FlowsheetExport
from idaes_flowsheet_processor.api import FlowsheetExport
from fastapi.responses import FileResponse

# add 'examples' to packages, *before* app starts
Expand All @@ -24,7 +24,7 @@ def client():

def pytest_generate_tests(metafunc):
if "flowsheet_id" in metafunc.fixturenames:
from watertap.ui.fsapi import FlowsheetInterface
from idaes_flowsheet_processor.api import FlowsheetInterface

module_names = list(FlowsheetInterface.from_installed_packages())
metafunc.parametrize(
Expand Down
4 changes: 2 additions & 2 deletions electron/ui/cypress/e2e/FlowsheetTesting.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ describe('WaterTAP UI Testing', () => {

it('tests new flowsheet', () => {
let modelFile = "https://drive.google.com/uc?export=download&id=1XdjuWNpYT9teZxaF8TuwDz0XS2XyXKeT"
// let exportFile = "https://drive.google.com/uc?export=download&id=1-jWQmI4wO2OlyUi32fqobFEmPn3zm9Q9"
let exportFile = "https://drive.google.com/uc?export=download&id=1_KtDRLSQeyKoQ3rH-4kNuxpvuQVuhQCu"
let exportFile = "https://drive.google.com/uc?export=download&id=1-jWQmI4wO2OlyUi32fqobFEmPn3zm9Q9"
// let exportFile = "https://drive.google.com/uc?export=download&id=1_KtDRLSQeyKoQ3rH-4kNuxpvuQVuhQCu"
cy.load_flowsheets_list()
cy.screenshot('loaded flowsheet list page')

Expand Down

0 comments on commit e8bef6c

Please sign in to comment.