Skip to content
Snippets Groups Projects
Commit 95a70e12 authored by Matthias Stefan Bodenbenner's avatar Matthias Stefan Bodenbenner
Browse files

fixed metadata provisioning of arguments and returns

parent 77b647c1
No related branches found
No related tags found
No related merge requests found
Pipeline #375143 passed
[![Build](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/badges/master/pipeline.svg)](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/commits/master)
# Python Unified Device Interface
Current stable version: 9.3.4
Current stable version: 9.3.5
## Installation
1. Install the WZL-UDI package via pip
......@@ -58,6 +58,9 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
## Recent changes
**9.3.5** - 2024-03-18
- fixed metadata provisioning of arguments and returns
**9.3.4** - 2024-03-16
- fixed semantic name resolution of range profiles
......
......@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(name='wzl-udi',
version='9.3.4',
version='9.3.5',
url='https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python',
project_urls={
"Bug Tracker": "https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python/-/issues",
......
......@@ -6,7 +6,7 @@ from typing import Dict, Callable, Any, List
import rdflib
from .datatype import Datatype
from .error import ReadOnlyException
from .error import ReadOnlyException, NotImplementedException
from .semantics import Semantics, Namespaces
from .variable import Variable
from ..utils import root_logger
......@@ -158,8 +158,15 @@ class Parameter(Variable):
assert (len(triples) == 1)
result.remove(triples[0])
try:
rdf_value = Variable.serialize_value(result, self.__getitem__('value', 0))
result.add((Semantics.namespace[self._semantic_name], Namespaces.qudt['value'], rdf_value))
except DeviceException as e:
if isinstance(e._predecessor, NotImplementedException):
pass
else:
raise e
return result
else:
raise DeviceException('The provided kind of semantic information cannot be returned.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment