Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.12.0 #109

Merged
merged 7 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 39 additions & 100 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: App build
on:
push:
branches:
- "update-package-versions"
- "0.12.0rc0"

defaults:
run:
Expand All @@ -23,8 +23,8 @@ jobs:
# fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
activate-environment: watertap-ui-env
Expand All @@ -48,9 +48,13 @@ jobs:
# working-directory: ../
# run: git clone https://github.com/MichaelPesce/watertap.git && cd watertap && git fetch --all && git checkout update-pydantic && pip install --progress-bar off .

# - name: Install Watertap locally
# working-directory: ../
# run: git clone https://github.com/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .

- name: Install Watertap locally
working-directory: ../
run: git clone https://github.com/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .
run: git clone https://github.com/watertap-org/watertap.git && cd watertap && git fetch --all --tags && git checkout 0.12.0 && pip install --progress-bar off .

- name: Transfer Entry points
run: |
Expand Down Expand Up @@ -85,27 +89,25 @@ jobs:

- name: Sign Windows Distribution
run: |
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/WaterTAP-UI_24.01.26_win64.exe
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/WaterTAP-UI_24.03.29_win64.exe


- name: Upload artifact for windows build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: windows-dist
path: |
electron/dist/WaterTAP-UI_24.01.26_win64.exe
# windows-build:
# name: Windows Build
electron/dist/WaterTAP-UI_24.03.29_win64.exe


# runs-on: windows-latest
# linux-build:
# name: Linux Build

# env:
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# runs-on: ubuntu-latest

# # strategy:
# # fail-fast: false
# env:
# CI: false

# steps:
# - uses: actions/checkout@v3
Expand All @@ -122,16 +124,16 @@ jobs:
# run: |
# npm --prefix electron/ui clean-install

# - name: Install GNU FORTRAN, GOMP, Blas, and Lapack libraries
# run: |
# sudo apt-get install -y libgfortran5 libgomp1 liblapack3 libblas3

# - name: Get idaes extensions
# run: idaes get-extensions

# # - name: Install Watertap locally
# # working-directory: ../
# # run: git clone https://github.com/MichaelPesce/watertap.git && cd watertap && git fetch --all && git checkout springmeeting-2023 && pip install --progress-bar off .

# - name: Install Watertap locally
# working-directory: ../
# run: git clone https://github.com/watertap-org/watertap.git && cd watertap && git fetch --all --tags && git checkout 0.9.0rc0 && pip install --progress-bar off .
# run: git clone https://github.com/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .

# - name: Transfer Entry points
# run: |
Expand All @@ -141,95 +143,32 @@ jobs:
# run: |
# pip install --progress-bar off .

# - name: Install scipy 1.9.1
# run: |
# pip uninstall -y scipy && pip install scipy==1.9.1
# # - name: Create idaes extensions installer
# # run: |
# # npm --prefix electron run get-extensions-installer

# # - name: Revert to correct idaes version
# # run: |
# # pip uninstall -y idaes-pse && pip install 'idaes-pse @ https://github.com/IDAES/idaes-pse/archive/2.0.0a3.zip'

# - name: Build Backend
# run: npm --prefix electron run build-backend

# - name: Build Frontend
# run: npm --prefix electron run build-frontend-win
# run: npm --prefix electron run build-frontend

# - name: Build Windows Distribution
# run: npm --prefix electron run electron-build-win
# # for some reason, ico file breaks linux build. going without icon for now
# - name: Remove ico file
# run: rm electron/build/nawi-logo.ico

# - name: Upload artifact for windows build
# - name: Build Linux Distribution
# run: npm --prefix electron run electron-build-lin

# - name: Upload artifact for linux build
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: windows-dist
# name: linux-dist
# path: |
# electron/dist/WaterTAP-UI_Setup.exe

linux-build:
name: Linux Build

runs-on: ubuntu-latest

env:
CI: false

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: watertap-ui-env

- name: Install Electron JS dependencies
run: |
npm --prefix electron clean-install

- name: Install frontend JS dependencies
run: |
npm --prefix electron/ui clean-install

- name: Install GNU FORTRAN, GOMP, Blas, and Lapack libraries
run: |
sudo apt-get install -y libgfortran5 libgomp1 liblapack3 libblas3

- name: Get idaes extensions
run: idaes get-extensions

- name: Install Watertap locally
working-directory: ../
run: git clone https://github.com/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .

- name: Transfer Entry points
run: |
npm --prefix electron run move-entrypoints

- name: Install watertap-ui Python package
run: |
pip install --progress-bar off .

# - name: Create idaes extensions installer
# run: |
# npm --prefix electron run get-extensions-installer

# - name: Revert to correct idaes version
# run: |
# pip uninstall -y idaes-pse && pip install 'idaes-pse @ https://github.com/IDAES/idaes-pse/archive/2.0.0a3.zip'

- name: Build Backend
run: npm --prefix electron run build-backend

- name: Build Frontend
run: npm --prefix electron run build-frontend

# for some reason, ico file breaks linux build. going without icon for now
- name: Remove ico file
run: rm electron/build/nawi-logo.ico

- name: Build Linux Distribution
run: npm --prefix electron run electron-build-lin

- name: Upload artifact for linux build
uses: actions/upload-artifact@v3
if: always()
with:
name: linux-dist
path: |
electron/dist/watertap-ui_0.1.0_amd64.deb
# electron/dist/watertap-ui_0.1.0_amd64.deb

12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
os-version: windows-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
activate-environment: watertap-ui-env
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
# run: pytest tests -v

- name: run backend server
run: uvicorn --app-dir backend/app main:app --reload --host 0.0.0.0 --port 8001 & sleep 30
run: uvicorn --app-dir backend/app main:app --reload --host 127.0.0.1 --port 8001 & sleep 30

- name: run frontend
run: npm --prefix electron/ui start & sleep 30
Expand All @@ -93,7 +93,7 @@ jobs:
run: npx cypress run

- name: Upload artifact for screenshots & videos
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress_results-${{ matrix.os }}
Expand All @@ -119,8 +119,8 @@ jobs:
os-version: windows-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
activate-environment: watertap-ui-env
Expand Down
4 changes: 2 additions & 2 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "watertap-ui",
"author": "Michael Pesce <[email protected]>",
"version": "24.01.26",
"version": "24.03.29",
"private": true,
"main": "build/main.js",
"dependencies": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"artifactName": "WaterTAP-UI_24.01.26_win64.exe"
"artifactName": "WaterTAP-UI_24.03.29_win64.exe"
},
"deb": {
"depends": [
Expand Down Expand Up @@ -106,7 +106,7 @@
"win": {
"target": "nsis",
"icon": "build/nawi-logo.ico",
"artifactName": "WaterTAP-UI_24.01.26_win64.exe"
"artifactName": "WaterTAP-UI_24.03.29_win64.exe"
},
"linux": {
"target": "Deb",
Expand Down
2 changes: 1 addition & 1 deletion electron/ui/src/views/SplashPage/SplashPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function SplashPage() {
<Grid item xs={3}> </Grid>
<Grid item xs={6}>
<Box>
<p style={{paddingTop:0, marginTop: 0, color:"#9c9c9c"}}>v24.01.26 (WaterTAP v0.11.0)</p>
<p style={{paddingTop:0, marginTop: 0, color:"#9c9c9c"}}>v24.03.29 (WaterTAP v0.12.0)</p>
</Box>
</Grid>
<Grid item xs={3}> </Grid>
Expand Down