Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
FAIR Data Austria DB Repository
DBRepo
Commits
0db3fef5
Commit
0db3fef5
authored
Dec 3, 2021
by
Cornelia Michlits
Browse files
Options
Downloads
Patches
Plain Diff
#104 modified validate.py
parent
7eaa3d18
No related branches found
No related tags found
4 merge requests
!81
New stable release
,
!43
Merge dev to master
,
!33
Draft: merge dev to master
,
!32
Add units-service to dev
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fda-units-service/validate.py
+3
-3
3 additions, 3 deletions
fda-units-service/validate.py
with
3 additions
and
3 deletions
fda-units-service/validate.py
+
3
−
3
View file @
0db3fef5
...
...
@@ -16,7 +16,7 @@ def validator(value):
#input str
tmp
=
str
(
om
)
+
value
t_uri
=
rdflib
.
term
.
URIRef
(
tmp
)
if
next
(
g
.
triples
((
t_uri
,
None
,
None
)),
_exhausted
)
is
_exhausted
:
return
'
invalid
unit
'
if
next
(
g
.
triples
((
t_uri
,
None
,
om
.
Unit
)),
_exhausted
)
is
_exhausted
and
next
(
g
.
triples
((
t_uri
,
None
,
om
.
PrefixedUnit
)),
_exhausted
)
is
_exhausted
and
next
(
g
.
triples
((
t_uri
,
None
,
om
.
UnitDivision
)),
_exhausted
)
is
_exhausted
:
return
'
invalid
'
else
:
return
'
valid unit
'
\ No newline at end of file
return
'
valid
'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Cornelia Michlits
@cornelia.michlits
mentioned in commit
2c296dba
·
Feb 20, 2022
mentioned in commit
2c296dba
mentioned in commit 2c296dba9b400843d6bd1be073cf353bf8c08d01
Toggle commit list
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