This repository is for work on the user interface (UI) for the IDAES Flowsheet Processor. The UI installer can be downloaded from our homepage at: https://watertap-org.github.io/
The following steps assume that:
conda
is 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-env
This 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-install
idaes get-extensions --verbose
Ensure that the flowsheet-processor-env
Conda environment is active and all dependencies are installed
conda activate flowsheet-processor-env
cd <idaes-flowsheet-processor-ui-path>/frontend
npm run app-start
There 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
pytest
This 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 test
Hit '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-start
Then, to run the tests:
cd frontend
npx cypress run
If 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
.