Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python Unified Device Interface
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WZL-IQS-Public
Sensor Interfacing Language (SOIL)
Python Unified Device Interface
Commits
e434f386
Commit
e434f386
authored
1 year ago
by
Matthias Stefan Bodenbenner
Browse files
Options
Downloads
Patches
Plain Diff
- fixed missing licences of some semantic resources
- changed "schema.org" to http in instead of https
parent
8a0f1647
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+5
-1
5 additions, 1 deletion
README.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
src/soil/measurement.py
+5
-2
5 additions, 2 deletions
src/soil/measurement.py
src/soil/parameter.py
+4
-0
4 additions, 0 deletions
src/soil/parameter.py
with
15 additions
and
4 deletions
README.md
+
5
−
1
View file @
e434f386
[

](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/commits/master)
[

](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/commits/master)
# Python Unified Device Interface
# Python Unified Device Interface
Current stable version: 10.0.
7
Current stable version: 10.0.
8
## Installation
## Installation
1.
Install the WZL-UDI package via pip
1.
Install the WZL-UDI package via pip
...
@@ -69,6 +69,10 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
...
@@ -69,6 +69,10 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
## Recent changes
## Recent changes
**10.0.8**
- 2024-03-25
-
fixed missing licences of some semantic resources
-
changed "schema.org" to http in instead of https
**10.0.7**
- 2024-03-22
**10.0.7**
- 2024-03-22
-
fixed unit handling for the metadata provisioning
-
fixed unit handling for the metadata provisioning
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
e434f386
...
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
...
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
long_description
=
fh
.
read
()
long_description
=
fh
.
read
()
setup
(
name
=
'
wzl-udi
'
,
setup
(
name
=
'
wzl-udi
'
,
version
=
'
10.0.
7
'
,
version
=
'
10.0.
8
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python
'
,
project_urls
=
{
project_urls
=
{
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python/-/issues
"
,
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python/-/issues
"
,
...
...
This diff is collapsed.
Click to expand it.
src/soil/measurement.py
+
5
−
2
View file @
e434f386
...
@@ -215,6 +215,9 @@ class Measurement(Variable):
...
@@ -215,6 +215,9 @@ class Measurement(Variable):
elif
resource_type
==
ResourceType
.
metadata
:
elif
resource_type
==
ResourceType
.
metadata
:
result
=
self
.
_metadata
result
=
self
.
_metadata
result
.
add
((
Semantics
.
namespace
[
f
'
{
self
.
_semantic_name
}
Range
'
],
Namespaces
.
schema
.
license
,
Semantics
.
metadata_license
))
elif
resource_type
==
ResourceType
.
range
:
elif
resource_type
==
ResourceType
.
range
:
result
=
copy
.
deepcopy
(
self
.
_metadata
)
result
=
copy
.
deepcopy
(
self
.
_metadata
)
subjects
=
result
.
subjects
()
subjects
=
result
.
subjects
()
...
@@ -269,7 +272,7 @@ class Measurement(Variable):
...
@@ -269,7 +272,7 @@ class Measurement(Variable):
data_graph
.
bind
(
'
earl
'
,
Namespaces
.
earl
)
data_graph
.
bind
(
'
earl
'
,
Namespaces
.
earl
)
data_graph
.
add
((
uncertainty_subject
,
Namespaces
.
rdf
.
type
,
Namespaces
.
earl
.
NotApplicable
))
data_graph
.
add
((
uncertainty_subject
,
Namespaces
.
rdf
.
type
,
Namespaces
.
earl
.
NotApplicable
))
data_graph
.
add
((
uncertainty_subject
,
Namespaces
.
schema
.
license
,
Semantics
.
data_license
))
data_graph
.
add
((
uncertainty_subject
,
Namespaces
.
schema
.
license
,
Semantics
.
meta
data_license
))
result
=
data_graph
result
=
data_graph
elif
resource_type
==
ResourceType
.
observation
:
elif
resource_type
==
ResourceType
.
observation
:
...
@@ -292,7 +295,7 @@ class Measurement(Variable):
...
@@ -292,7 +295,7 @@ class Measurement(Variable):
(
measurement_subject
,
Namespaces
.
sosa
.
observedProperty
,
Semantics
.
namespace
[
self
.
_semantic_name
]))
(
measurement_subject
,
Namespaces
.
sosa
.
observedProperty
,
Semantics
.
namespace
[
self
.
_semantic_name
]))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
sosa
.
hasResult
,
result_subject
))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
sosa
.
hasResult
,
result_subject
))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
sosa
.
madeBySensor
,
sensor_triples
[
0
][
2
]))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
sosa
.
madeBySensor
,
sensor_triples
[
0
][
2
]))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
schema
.
license
,
Semantics
.
data_license
))
data_graph
.
add
((
measurement_subject
,
Namespaces
.
schema
.
license
,
Semantics
.
meta
data_license
))
result
=
data_graph
result
=
data_graph
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
src/soil/parameter.py
+
4
−
0
View file @
e434f386
...
@@ -149,6 +149,8 @@ class Parameter(Variable):
...
@@ -149,6 +149,8 @@ class Parameter(Variable):
for
subject
in
subjects
:
for
subject
in
subjects
:
if
subject
!=
Semantics
.
namespace
[
f
'
{
self
.
_semantic_name
}
Range
'
]:
if
subject
!=
Semantics
.
namespace
[
f
'
{
self
.
_semantic_name
}
Range
'
]:
range_graph
.
remove
((
subject
,
None
,
None
))
range_graph
.
remove
((
subject
,
None
,
None
))
range_graph
.
add
((
Semantics
.
namespace
[
f
'
{
self
.
_semantic_name
}
Range
'
],
Namespaces
.
schema
.
license
,
Semantics
.
metadata_license
))
return
range_graph
return
range_graph
elif
resource_type
==
ResourceType
.
metadata
:
elif
resource_type
==
ResourceType
.
metadata
:
result
=
copy
.
deepcopy
(
self
.
_metadata
)
result
=
copy
.
deepcopy
(
self
.
_metadata
)
...
@@ -161,6 +163,8 @@ class Parameter(Variable):
...
@@ -161,6 +163,8 @@ class Parameter(Variable):
try
:
try
:
rdf_value
=
self
.
serialize_value
(
result
,
self
.
__getitem__
(
'
value
'
,
0
))
rdf_value
=
self
.
serialize_value
(
result
,
self
.
__getitem__
(
'
value
'
,
0
))
result
.
add
((
Semantics
.
namespace
[
self
.
_semantic_name
],
Namespaces
.
qudt
[
'
value
'
],
rdf_value
))
result
.
add
((
Semantics
.
namespace
[
self
.
_semantic_name
],
Namespaces
.
qudt
[
'
value
'
],
rdf_value
))
result
.
add
((
Semantics
.
namespace
[
f
'
{
self
.
_semantic_name
}
Range
'
],
Namespaces
.
schema
.
license
,
Semantics
.
metadata_license
))
except
DeviceException
as
e
:
except
DeviceException
as
e
:
if
isinstance
(
e
.
_predecessor
,
NotImplementedException
):
if
isinstance
(
e
.
_predecessor
,
NotImplementedException
):
pass
pass
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment