Skip to content

Commit

Permalink
merge main in
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelPesce committed Oct 21, 2024
2 parents c115d3a + 0c26c6f commit 82361c7
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 25 deletions.
8 changes: 4 additions & 4 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:
- "1.0.0"
- "1.1rc0"

defaults:
run:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:

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

- name: Transfer Entry points
run: |
Expand All @@ -70,7 +70,7 @@ 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.08.15_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.10.11_win64.exe
- name: Upload artifact for windows build
Expand All @@ -79,4 +79,4 @@ jobs:
with:
name: windows-dist
path: |
electron/dist/WaterTAP-UI_24.08.15_win64.exe
electron/dist/WaterTAP-UI_24.10.11_win64.exe
16 changes: 13 additions & 3 deletions backend/requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ alabaster==0.7.16
altgraph==0.17.4
annotated-types==0.6.0
anyio==3.6.1
appdirs==1.4.4
appnope==0.1.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
Expand All @@ -23,6 +24,7 @@ cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.3
colorama==0.4.6
comm==0.2.2
contourpy==1.2.0
coverage==7.4.4
Expand All @@ -41,13 +43,16 @@ executing==2.0.1
fastapi==0.110.0
fastjsonschema==2.19.0
filelock==3.13.1
flexcache==0.3
flexparser==0.3.1
fonttools==4.45.1
fqdn==1.5.1
h11==0.13.0
h5py==3.10.0
htmlmin==0.1.12
httpcore==1.0.4
idaes-pse==2.4.0
httpx==0.27.0
idaes-pse==2.6.0
identify==2.5.35
idna==3.3
imagesize==1.4.1
Expand Down Expand Up @@ -110,11 +115,13 @@ overrides==7.7.0
packaging==23.2
pandas==2.0.3
pandocfilters==1.5.1
parameter-sweep==0.1.dev5
parso==0.8.3
pathspec==0.12.1
pefile==2023.2.7
pexpect==4.9.0
Pillow==10.1.0
Pint==0.22
Pint==0.24.3
platformdirs==4.2.0
pluggy==1.3.0
ply==3.11
Expand All @@ -133,7 +140,7 @@ pyinstaller==5.3
pyinstaller-hooks-contrib==2024.3
pylint==2.17.7
pymongo==4.6.1
Pyomo==6.7.1
Pyomo==6.8.0
pyparsing==3.1.1
pytest==7.4.4
pytest-cov==4.1.0
Expand All @@ -142,6 +149,9 @@ python-dotenv==1.0.1
python-json-logger==2.0.7
python-multipart==0.0.5
pytz==2023.3.post1
pywin32==306
pywin32-ctypes==0.2.2
pywinpty==2.0.13
PyYAML==6.0.1
pyzmq==25.1.2
qtconsole==5.5.1
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.08.15",
"version": "24.10.11",
"private": true,
"main": "build/main.js",
"dependencies": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"artifactName": "WaterTAP-UI_24.08.15_win64.exe"
"artifactName": "WaterTAP-UI_24.10.11_win64.exe"
},
"deb": {
"depends": [
Expand Down Expand Up @@ -107,7 +107,7 @@
"win": {
"target": "nsis",
"icon": "build/nawi-logo.ico",
"artifactName": "WaterTAP-UI_24.08.15_win64.exe"
"artifactName": "WaterTAP-UI_24.10.11_win64.exe"
},
"linux": {
"target": "Deb",
Expand Down
1 change: 1 addition & 0 deletions electron/ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function App() {
const hasTheme = true
const WAIT_TIME = 2

// use Material UI theme for styles to be consistent throughout app
const mui_theme = createTheme({
palette: {
primary: {
Expand Down
24 changes: 15 additions & 9 deletions electron/ui/src/components/SingleOutput/SingleOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export default function SingleOutput(props) {
const handleOpenSaveConfig = () => setOpenSaveConfig(true);
const handleCloseSaveConfig = () => setOpenSaveConfig(false);

/**
* organize output data into a list of dictionaries formatted for the output table
*/
useEffect(()=> {
let export_variables = {...outputData.outputData.exports}
let rows = {}
Expand Down Expand Up @@ -116,6 +119,10 @@ export default function SingleOutput(props) {
});
}

/**
* generate html for table
* @returns table body component containing table rows
*/
const renderRows = () => {
try {
return (
Expand All @@ -133,15 +140,14 @@ export default function SingleOutput(props) {
{rows.map((row, idx) => (

<TableRow key={`_${idx}`}>
<TableCell>
<TableCell align='right'>
{row.name}
</TableCell>
<TableCell>
{row.units}
</TableCell>
<TableCell align="right">
<TableCell align='center'>
{row.value.toLocaleString('en-US', {maximumFractionDigits:row.rounding})}
{/* {row.value} */}
</TableCell>
<TableCell align='left'>
{row.units}
</TableCell>
</TableRow>
))}
Expand Down Expand Up @@ -208,9 +214,9 @@ export default function SingleOutput(props) {
<TableHead>
<TableRow>
<TableCell>Category</TableCell>
<TableCell>Variable</TableCell>
<TableCell>Units</TableCell>
<TableCell align="right">Value</TableCell>
<TableCell align='right'>Variable</TableCell>
<TableCell align='center'>Value</TableCell>
<TableCell align='left'>Units</TableCell>
</TableRow>
</TableHead>
{renderRows()}
Expand Down
4 changes: 2 additions & 2 deletions electron/ui/src/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const themes = {
'(WaterTAP) is an open-source Python-based software package that ' +
'supports the technoeconomic assessment of full water treatment trains.',
projectRelease: {
'version': '24.08.15', 'depVersions': {
'WaterTAP': '1.0.0'
'version': '24.10.11', 'depVersions': {
'WaterTAP': '1.1.0'
}
},
splashImage: nawiSplash,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default function ConfigInput(props) {
/**
* Organize variables into sections by their 'category' attribute.
*
* @returns Object {<category-name>: [list, of, variable, objects]}
* @returns [Object(left) {<category-name>: [list, of, variable, objects]}, Object(right) {<category-name>: [list, of, variable, objects]}]
*/
const organizeVariables = (bvars) => {
let var_sections = {}
Expand Down Expand Up @@ -234,7 +234,10 @@ export default function ConfigInput(props) {

}

// sort the keys of var_sections into two groups that have as close as possible to even amount of total variables
/**
* sort the keys of var_sections into two groups that have as close as possible to even amount of total variables
* we want the two columns to be roughly the same length if possible
**/
let var_sections_left = {}
let var_sections_right = {}
let total_variables_left = 0
Expand Down

0 comments on commit 82361c7

Please sign in to comment.