From 8d43bbc3244e7f03c1633941af6a7466c16c4c64 Mon Sep 17 00:00:00 2001 From: Aleksandra Apolinarska Date: Mon, 27 Jan 2025 13:31:13 +0100 Subject: [PATCH] #60 wip, not tested --- docs/documentation.rst | 2 -- src/aixd_ara/components/ara_DataBool/code.py | 5 +---- src/aixd_ara/components/ara_DataBool/metadata.json | 7 ------- src/aixd_ara/components/ara_DataCat/code.py | 4 +--- src/aixd_ara/components/ara_DataCat/metadata.json | 6 ------ 5 files changed, 2 insertions(+), 22 deletions(-) diff --git a/docs/documentation.rst b/docs/documentation.rst index 1d4ac52..16d7241 100644 --- a/docs/documentation.rst +++ b/docs/documentation.rst @@ -21,7 +21,6 @@ Defines a boolean variable (`True` or `False`). **Inputs** - **name** *(str)* -- Name of the variable. -- **dim** *(int)* -- Dimension of the variable. **Outputs** @@ -40,7 +39,6 @@ Defines a categorical variable (for example, represening labels or classes). **Inputs** - **name** *(str)* -- Name of the variable. -- **dim** *(int)* -- Dimension of the variable. - **options** *[List of (str)]* -- Options: list of possible categories, as strings. **Outputs** diff --git a/src/aixd_ara/components/ara_DataBool/code.py b/src/aixd_ara/components/ara_DataBool/code.py index 7adc1a0..cb717ab 100644 --- a/src/aixd_ara/components/ara_DataBool/code.py +++ b/src/aixd_ara/components/ara_DataBool/code.py @@ -1,11 +1,8 @@ # flake8: noqa from aixd_ara.wrappers import WrapperShallowDataObject -if not dim or dim < 1: - dim = 1 - -dobj = {"datatype": "DataBool", "name": name, "dim": dim} +dobj = {"datatype": "DataBool", "name": name, "dim": 1} dataobject = WrapperShallowDataObject(dobj) diff --git a/src/aixd_ara/components/ara_DataBool/metadata.json b/src/aixd_ara/components/ara_DataBool/metadata.json index 8ed10bb..a2c470d 100644 --- a/src/aixd_ara/components/ara_DataBool/metadata.json +++ b/src/aixd_ara/components/ara_DataBool/metadata.json @@ -14,14 +14,7 @@ "description": "Name of the variable.", "typeHintID": "str", "scriptParamAccess": 0 - }, - { - "name": "dim", - "description": "Dimension of the variable.", - "typeHintID": "int", - "scriptParamAccess": 0 } - ], "outputParameters": [ diff --git a/src/aixd_ara/components/ara_DataCat/code.py b/src/aixd_ara/components/ara_DataCat/code.py index 5fd82df..7c9af8e 100644 --- a/src/aixd_ara/components/ara_DataCat/code.py +++ b/src/aixd_ara/components/ara_DataCat/code.py @@ -1,8 +1,6 @@ # flake8: noqa from aixd_ara.wrappers import WrapperShallowDataObject -if not dim or dim < 1: - dim = 1 if not options: options = None @@ -10,6 +8,6 @@ options = [str(x) for x in options] -dobj = {"datatype": "DataCategorical", "name": name, "dim": dim, "domain": options} +dobj = {"datatype": "DataCategorical", "name": name, "dim": 1, "domain": options} dataobject = WrapperShallowDataObject(dobj) diff --git a/src/aixd_ara/components/ara_DataCat/metadata.json b/src/aixd_ara/components/ara_DataCat/metadata.json index 2bcba62..1c0205f 100644 --- a/src/aixd_ara/components/ara_DataCat/metadata.json +++ b/src/aixd_ara/components/ara_DataCat/metadata.json @@ -15,12 +15,6 @@ "typeHintID": "str", "scriptParamAccess": 0 }, - { - "name": "dim", - "description": "Dimension of the variable.", - "typeHintID": "int", - "scriptParamAccess": 0 - }, { "name": "options", "description": "Options: list of possible categories, as strings.",