This repository is for building desktop versions of user interaces under the IDAES project. It is designed to create deployments in a GitHub workflow.
The following steps assume that:
gh
is already installed and configured For installation instructions, see https://github.com/cli/cli.- This repository (i.e. https://github.com/watertap-org/idaes-electron-build) has been cloned locally and the working directory is set to the root of the repository
gh workflow run .github/workflows/build-dispatch.yml -f project=watertap -f os-version=windows-latest -f artifact-name=WaterTAP-Flowsheet-Processor -f pip-install-target=watertap@git+https://github.com/watertap-org/watertap@main
gh workflow run .github/workflows/build-dispatch.yml -f project=idaes -f os-version=windows-latest -f artifact-name=IDAES-Flowsheet-Processor -f pip-install-target=idaes-pse@git+https://github.com/IDAES/idaes-pse
gh workflow run .github/workflows/build-dispatch.yml -f project=prommis -f os-version=windows-latest -f artifact-name=PROMMIS-Flowsheet-Processor -f pip-install-target=prommis@git+https://github.com/prommis/prommis@main
These commands will initiate a windows deployment. For mac, use os-version=macos-latest. For a complete set of input options, see below:
- project
- type: choice
- options:
- watertap
- prommis
- idaes
- description: project name
- os-version
- type: choice
- options:
- windows-latest
- macos-latest
- description: operating system
- pip-install-target
- type: string
- default: watertap@git+https://github.com/watertap-org/watertap@main
- description: pip target for python project
- artifact-name
- type: string
- default: WaterTAP-Flowsheet-Processor
- description: Build artifact name
- idaes-flowsheet-processor-ui-repo
- type: string
- default: watertap-org/idaes-flowsheet-processor-ui
- description: IDAES Flowsheet Processor UI repository URL. Can be replaced by forks such as {github-user}/idaes-flowsheet-processor-ui
- idaes-flowsheet-processor-ui-ref
- type: string
- default: main
- description: Branch or tag for IDAES Flowsheet Processor UI repository
- package-build-number
- type: string
- description: package build number
The following steps assume that:
conda
is already installed and configured- This repository (i.e. https://github.com/watertap-org/idaes-electron-build) 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.
From the root directory, run the following python file:
python scripts/set_configuration.py -p <project-you-wish-to-build>
This will create a package.json file environment files that are required to create the Electron package. Project options are watertap, prommis, and idaes.
The following steps assume that:
conda
is already installed and configuredflowsheet-processor-env
Conda environment is active
cd <idaes-electron-build>
python scripts/move_entrypoints.py
cd <idaes-electron-build>/electron
git clone https://github.com/watertap-org/idaes-flowsheet-processor-ui.git && cd idaes-flowsheet-processor-ui && pip install --progress-bar off .
pip install <project>
- Windows operating system
cd <idaes-electron-build>/electron
npm run dist:win
- Mac operationg system
- Signed in to Apple developer account
- A valid Developer ID Application certificate AND corresponding private key stored in keychain access
cd <idaes-electron-build>/electron
npm run dist:mac