From 39e0504e31cfa4646b58403f942dd749c2e21e95 Mon Sep 17 00:00:00 2001 From: Yohann Paris Date: Fri, 4 Oct 2024 14:25:45 -0400 Subject: [PATCH 1/6] cleaning up --- .../tera-model-config-drilldown.vue | 53 +++++++++++------- .../tera-model-configuration-item.vue | 56 +++++++++++-------- 2 files changed, 66 insertions(+), 43 deletions(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue index d23d623d5e..36b242954b 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue @@ -14,22 +14,17 @@ content-width="360px" > - @@ -646,7 +642,6 @@ const applyConfigValues = (config: ModelConfiguration) => { state: omit(state, ['transientModelConfig']) }); } - logger.success(`Configuration applied ${config.name}`); }; const onEditDescription = async () => { @@ -813,9 +808,29 @@ onUnmounted(() => { padding: var(--gap-2); } -ul { - list-style: none; - padding-top: var(--gap-small); +.input-config { + ul { + list-style: none; + padding-top: var(--gap-4); + } + + li { + & > * { + border-bottom: 1px solid var(--gray-300); + border-right: 1px solid var(--gray-300); + } + + &:first-child > * { + border-top: 1px solid var(--gray-300); + border-top-left-radius: var(--border-radius); + border-top-right-radius: var(--border-radius); + } + + &:last-child > * { + border-bottom-left-radius: var(--border-radius); + border-bottom-right-radius: var(--border-radius); + } + } } button.start-edit { diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-configuration-item.vue b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-configuration-item.vue index 99659c4e72..ffb0b719bb 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-configuration-item.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-configuration-item.vue @@ -1,15 +1,12 @@ @@ -17,7 +14,6 @@ import { ModelConfiguration } from '@/types/Types'; import { formatTimestamp } from '@/utils/date'; import Button from 'primevue/button'; -import Divider from 'primevue/divider'; import ContextMenu from 'primevue/contextmenu'; import { ref } from 'vue'; import { useConfirm } from 'primevue/useconfirm'; @@ -77,30 +73,42 @@ const onDeleteConfiguration = () => { From 919a75d22835bb6890ce0307d97368a5002961f7 Mon Sep 17 00:00:00 2001 From: Yohann Paris Date: Fri, 4 Oct 2024 14:31:25 -0400 Subject: [PATCH 2/6] disable the reset button if the configuration hasn't changed --- .../model-config/tera-model-config-drilldown.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue index 36b242954b..199e8b8e2f 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/model-config/tera-model-config-drilldown.vue @@ -60,7 +60,13 @@ /> @@ -278,6 +284,11 @@ const calibratedConfigObservables = computed(() => })) ); +// Check if the model configuration is the same as the original +const isModelConfigChanged = computed( + () => !isModelConfigsEqual(originalConfig.value, knobs.value.transientModelConfig) +); + // Save button is disabled if the model configuration name is empty, the values have changed, or the configuration is the same as the original const isSaveDisabled = computed( () => From 276398f1f75fefe87290a47dacfd2bc91e8ac7c4 Mon Sep 17 00:00:00 2001 From: Yohann Paris Date: Fri, 4 Oct 2024 14:44:05 -0400 Subject: [PATCH 3/6] Remove divider from the initial table --- .../model/petrinet/tera-initial-table.vue | 48 +++++++------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue index 218a02ccd0..026fb255c2 100644 --- a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue +++ b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue @@ -6,7 +6,7 @@ -
    +
    • @@ -16,21 +16,18 @@ {{ baseInitial }}
      @@ -45,7 +42,6 @@ @update-expression="emit('update-expression', $event)" @update-source="emit('update-source', $event)" /> -
    @@ -73,7 +69,6 @@ import { MiraModel, MiraTemplateParams } from '@/model-representation/mira/mira- import Accordion from 'primevue/accordion'; import AccordionTab from 'primevue/accordiontab'; import Button from 'primevue/button'; -import Divider from 'primevue/divider'; import TeraInputText from '@/components/widgets/tera-input-text.vue'; import TeraStratifiedMatrixModal from './model-configurations/tera-stratified-matrix-modal.vue'; import TeraInitialEntry from './tera-initial-entry.vue'; @@ -122,8 +117,13 @@ const filterText = ref(''); From 97833ecd78641878409ca4425b97ce2f849058ab Mon Sep 17 00:00:00 2001 From: Yohann Paris Date: Fri, 4 Oct 2024 16:01:51 -0400 Subject: [PATCH 4/6] cleaning up component --- .../tera-initial-other-value-modal.vue | 107 +++++++----------- 1 file changed, 44 insertions(+), 63 deletions(-) diff --git a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue index ce54438630..de61c01a92 100644 --- a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue +++ b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue @@ -4,45 +4,37 @@

    Other configuration values for '{{ otherValueList[0].target }}'

    - + - + + + + + + + + + + @@ -85,25 +77,25 @@ From ecdc0e7fa6a21fc3b693f7e10ba9eb424b03eb56 Mon Sep 17 00:00:00 2001 From: Yohann Paris Date: Mon, 7 Oct 2024 13:58:07 -0400 Subject: [PATCH 5/6] Update config_from_document.py --- packages/gollm/gollm_openai/prompts/config_from_document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gollm/gollm_openai/prompts/config_from_document.py b/packages/gollm/gollm_openai/prompts/config_from_document.py index 10e4450dea..6ab4a72378 100644 --- a/packages/gollm/gollm_openai/prompts/config_from_document.py +++ b/packages/gollm/gollm_openai/prompts/config_from_document.py @@ -26,13 +26,13 @@ a. `target` should reference the id of the initial variable from the AMR model ODE semantics. b. `source` should reference the title or file name of the research paper. c. `type` should be set to "initial”. - d. You should extract a numerical value or an expression of the initial state from the user-provided text if possible and add it to `expression` + d. You should extract a numerical value or an expression of the initial state from the user-provided text if possible and add it to `expression`. If you can not find a value in the text leave expression and expressionMathml blank. e. `expression_mathml` should be `expression` written in MathML format. 5. For each parameter specified in the AMR model ODE semantics, create a parameter semantic object. Do not create new parameter semantic objects if they are not included in the original AMR model. You should set parameter semantic object fields using the following rules: a. `reference_id` should reference the id of the parameter. b. `source` should reference the title or file name of the research paper. c. `type` should be set to "parameter". - d. Be sure to extract parameter values from the user-provided text, and do not use the default values from the AMR model. + d. Be sure to extract parameter values from the user-provided text, and do not use the default values from the AMR model. If you can not find a value in the text set `type` to "Constant" and leave `value`, `minimum`, and `maximum` blank. - If the extracted parameter value is a single constant value, set the parameter `value` to the constant value and set `type` to "Constant". - If the extracted parameter value is a distribution with a maximum and minimum value, set `type` to only "Uniform" and populate the `minimum` and `maximum` fields. 6. `observableSemanticList` should be an empty list. From ada7f21ea87f703e3f9beedb6e70d199d1c6df8c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:09:26 +0000 Subject: [PATCH 6/6] chore: lint and format client codebase --- .../src/components/model/petrinet/tera-initial-table.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue index 86d6ddcfa9..9d99911fc1 100644 --- a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue +++ b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-table.vue @@ -22,7 +22,7 @@ :model="model" :model-configuration="modelConfiguration" :modelConfigurations="modelConfigurations" - :feature-config="featureConfig" + :feature-config="featureConfig" :initial-id="target" @update-expression="emit('update-expression', $event)" @update-source="emit('update-source', $event)"