- NodeJS >= 24.11.0
- Python >= 3.12
- Create a conda environment with Python >= 3.12
- Activate the newly created env
- Run:
pip install git+https://github.com/prommis/flowsheet-inspector-lib.git - Run:
idaes get-extensions - Change to the
extensionfolder and run:npm install - Change to the
webview_uifolder and run:npm install
- Make sure you are using VS Code as your editor and Node.js >= 24.11.0.
- Change to the
extensionfolder and run:npm run watch:buildto enable live compilation - Change to the
webview_uifolder and run:npm run watch:buildto rebuild the React UI on every change - Open the project in VS Code and open
/extension/src/extension.ts - Press
F5and select the "Run Extension" debug configuration. This compiles the extension and launches it in a new VS Code window. - In the new window, open the Flowsheet Inspector sidebar and use the Python interpreter selector to pick the conda env you created above. You do not need to activate the env in a terminal.
- After changing code, reload the webview in the debug window with
Cmd+Shift+R(Mac) orCtrl+Shift+R(Windows/Linux)
- Update the package version number in
package.jsonand record your changes in/extension/CHANGELOG.md
How to update the version number in package.json:
{
"name": "flowsheet-inspector",
"publisher": "idaes-team",
"displayName": "Flowsheet-inspector",
"description": "",
"version": "0.0.15", <- HERE
...
}- Commit your changes, create a PR against the main branch, and merge it.
- From the main branch, create a new release branch named with the version number, for example:
release-0.0.3 - On the new branch, change to the
/extension/folder and runnpm run package - After the command finishes, you will find the new package in the project root folder, named with the version number you set.
If you are on a Linux machine, please make sure the following packages are installed:
| Package Name | Why |
|---|---|
| libgfortran5 | Provides libgfortran.so.5, required by IDAES extensions |
| liblapack3 | Provides liblapack.so.3, required by IDAES extensions |
| libblas3 | Required by LAPACK (LAPACK depends on BLAS) |
If there is a schema update in flowsheet-inspector-lib, you must delete the old reportdb.sqlite file in your dev environment to avoid errors.
The database file is located at:
| OS | Path |
|---|---|
| macOS | ~/.idaes/reportdb.sqlite |
| Linux | ~/.idaes/reportdb.sqlite |
| Windows | %LOCALAPPDATA%\idaes\reportdb.sqlite (e.g. C:\Users\YourUserName\AppData\Local\idaes\reportdb.sqlite) |
extension/– Contains the VS Code extension source files.webview_ui/– Contains the webview UI built with React.- React builds static files into
webview_ui/dist/, and the Vite config copies them toextension/src/webview_template/webview_new/, which is what the extension loads into the webview. - The UI cannot be previewed in a plain browser with
npm run dev. It calls the VS Code webview API on load and needs the extension host to send its init message, so always test it inside the debug VS Code window.
- React builds static files into