Skip to content

Commit

Permalink
fixed checkbox bug, resolved #49
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenaH84 committed May 30, 2024
1 parent 689d56d commit d0e40e9
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 22 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
- main

env:
SSH_USER: lhendrix
SSH_HOST: 51.68.188.78
REGISTRY: ghcr.io
IMAGE_NAME: battmoteam/battmogui:latest
WORKDIR: battmogui
GITLAB_URL: "https://lorena.hendrix:${{ secrets.GITLAB_PAT}}@gitlab.sintef.no/FFP-products/prod/webapp-instances/102023526-1006.git"

jobs:
publish:
name: publish docker images
name: publish image
runs-on: ubuntu-latest

steps:
Expand All @@ -29,15 +30,25 @@ jobs:
- name: Publish
run: docker-compose -f docker-compose-deploy.yml push

mirror:
name: mirror repository to GitLab
deploy:
name: Deploy image
runs-on: ubuntu-latest
needs: publish

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Mirror changes
run: |
git remote add gitlab ${{ env.GITLAB_URL }}
git fetch origin main
git push gitlab main:test
- name: Install SSH keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.ACTIONS_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Test SSH Connection
run: ssh -o StrictHostKeyChecking=no ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "echo SSH connection successful"
- name: Login to Registry
run: echo ${{ secrets.PAT }} | docker login ghcr.io -u lorenah84 --password-stdin
- name: Pull and Run Containers
run: |
ssh ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "cd ${{ env.WORKDIR }} && \
docker compose -f docker-compose.yml pull && \
docker compose -f docker-compose.yml up -d"
- name: Cleanup
run: rm -rf ~/.ssh
2 changes: 1 addition & 1 deletion streamlit/app_scripts/app_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def fill_non_material_components(self,density,category_display_name,category_par
key = checkbox_key,
value= st.session_state[checkbox_key],
on_change = self.checkbox_input_connect,
args = (checkbox_key, tab, category_id, non_material_parameter.name,non_material_parameter),
args = (checkbox_key, tab, category_id, non_material_parameter.name),
label_visibility="collapsed")
st.text(" ")

Expand Down
2 changes: 1 addition & 1 deletion streamlit/input_files/battmo_formatted_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"NegativeElectrode": {
"Coating": {
"thickness": 8.499999999999999e-05,
"thickness": 7.3e-05,
"N": 20,
"effectiveDensity": 1770.4,
"bruggemanCoefficient": 1.5,
Expand Down
14 changes: 7 additions & 7 deletions streamlit/input_files/linked_data_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
"@type": "emmo:Thickness",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 85.0
"hasNumericalData": 73.0
},
"unit": {
"label": "MicroMetre",
Expand All @@ -465,7 +465,7 @@
"@type": "emmo:Porosity",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 0.2
"hasNumericalData": 0.07148914570811338
},
"unit": {
"label": "UnitOne",
Expand All @@ -478,7 +478,7 @@
"@type": "emmo:MassLoading",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 15.0484
"hasNumericalData": 15.0
},
"unit": {
"label": "MiliGramPerCubicCentiMeter",
Expand Down Expand Up @@ -530,7 +530,7 @@
"@type": "emmo:Capacity",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 1120.5836528712066
"hasNumericalData": 962.3836077599775
},
"unit": {
"label": "MiliAmpereHour",
Expand Down Expand Up @@ -1339,7 +1339,7 @@
"@type": "emmo:N/PRatio",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 1.07
"hasNumericalData": 0.92
},
"unit": {
"label": "UnitOne",
Expand All @@ -1352,7 +1352,7 @@
"@type": "emmo:CellMass",
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 31.7796972032
"hasNumericalData": 31.387528930628832
},
"unit": {
"label": "Gram",
Expand All @@ -1365,7 +1365,7 @@
"@type": null,
"value": {
"@type": "emmo:Numerical",
"hasNumericalData": 1047.6223333812661
"hasNumericalData": 962.3836077599775
},
"unit": {
"label": "AmpereHour",
Expand Down
2 changes: 1 addition & 1 deletion streamlit/output_files/calculated_values.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"positive_electrode": 3151.12
},
"mass_loadings": {
"negative_electrode": 15.0484,
"negative_electrode": 15.0,
"positive_electrode": 23.948511999999994
}
}
Expand Down

0 comments on commit d0e40e9

Please sign in to comment.