Skip to content

Commit

Permalink
#60 wip, not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
funkchaser committed Feb 17, 2025
1 parent de8e00d commit 529fee4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 22 deletions.
2 changes: 0 additions & 2 deletions docs/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -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**
Expand Down
5 changes: 1 addition & 4 deletions src/aixd_ara/components/ara_DataBool/code.py
Original file line number Diff line number Diff line change
@@ -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)
7 changes: 0 additions & 7 deletions src/aixd_ara/components/ara_DataBool/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 1 addition & 3 deletions src/aixd_ara/components/ara_DataCat/code.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# flake8: noqa
from aixd_ara.wrappers import WrapperShallowDataObject

if not dim or dim < 1:
dim = 1

if not options:
options = None
else:
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)
6 changes: 0 additions & 6 deletions src/aixd_ara/components/ara_DataCat/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit 529fee4

Please sign in to comment.