This repository is for work on the user interface (UI) for the IDAES Flowsheet Processor. The UI installer can be downloaded from our download site.
For information on using the UI, check out our Documentation website.
The following steps assume that:
condais already installed and configured- This repository (i.e. https://github.com/watertap-org/idaes-flowsheet-processor-ui) has been cloned locally and the working directory is set to the root of the repository
Run the following command to create and activate a new Conda environment named flowsheet-processor-env:
conda env create --file environment.yml && conda activate flowsheet-processor-envThis will install the correct runtime versions of both the backend (Python) and frontend (NodeJS) portions of the UI, as well as the backend (Python) dependencies.
Run the following command to install the JavaScript dependencies:
npm --prefix frontend clean-installidaes get-extensions --verboseEach parent package (IDAES, WaterTAP, and PROMMIS) has a list of default flowsheets. To add these flowsheets to the UI, simply install the parent package (in your working environment).
For WaterTAP:
pip install watertapFor IDAES:
pip install idaes-pseFor PROMMIS:
pip install prommisEnsure that the flowsheet-processor-env Conda environment is active and all dependencies are installed
conda activate flowsheet-processor-envcd <idaes-flowsheet-processor-ui-path>/frontend
npm run app-startThere are three sets of tests that can be run: Python tests, JavaScript unit tests, and JavaScript end-to-end tests.
From the repository root directory run:
To run:
cd backend/src/idaes_flowsheet_processor_ui
pytestThis will take several minutes since one set of tests solves the UI flowsheets.
The unit tests are written using the testing-library package.
To run:
cd frontend
npm run testHit 'a' for "run all tests" if you want to run tests regardless of what changed.
The end-to-end tests are written in Cypress.
Before running the tests, start the app, in another process (or shell):
cd frontend
npm run app-startThen, to run the tests:
cd frontend
npx cypress runIf there are errors, screenshots and videos can be found (in subdirectories named for each test) under electron/ui/cypress/screenshots and electron/ui/cypress/videos.