Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
2445eddf
Commit
2445eddf
authored
5 years ago
by
mpukhliak
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-8837 add upper case for code in parser
parent
7f13cf70
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis_standard_technologies/dist/core-plugins/xls-import/1/as/services/xls-import-api/parsers/definition_to_creation_metadata/creation_metadata_parsers.py
+7
-8
7 additions, 8 deletions
...inition_to_creation_metadata/creation_metadata_parsers.py
with
7 additions
and
8 deletions
openbis_standard_technologies/dist/core-plugins/xls-import/1/as/services/xls-import-api/parsers/definition_to_creation_metadata/creation_metadata_parsers.py
+
7
−
8
View file @
2445eddf
...
...
@@ -3,7 +3,7 @@ from ..definition_to_creation import PropertyTypeDefinitionToCreationType, Vocab
SampleTypeDefinitionToCreationType
,
ExperimentTypeDefinitionToCreationType
,
DatasetTypeDefinitionToCreationType
,
\
SpaceDefinitionToCreationType
,
ProjectDefinitionToCreationType
,
ExperimentDefinitionToCreationType
,
\
SampleDefinitionToCreationType
,
ScriptDefinitionToCreationType
from
utils.openbis_utils
import
get_metadata_name_for
from
utils.openbis_utils
import
get_metadata_name_for
,
upper_case_code
from
ch.systemsx.cisd.common.exceptions
import
UserFailureException
from
utils.dotdict
import
dotdict
...
...
@@ -56,8 +56,7 @@ class PropertyTypeDefinitionToCreationMetadataParser(object):
for
prop
in
definition
.
properties
:
property_creation_metadata
=
dotdict
()
code
=
prop
.
get
(
u
'
code
'
)
code
=
code
.
upper
()
if
code
is
not
None
else
None
code
=
upper_case_code
(
prop
.
get
(
u
'
code
'
))
property_creation_metadata
.
code
=
code
property_creation_metadata
.
version
=
get_version
(
prop
.
get
(
u
'
version
'
,
1
))
creation_metadata
[
code
]
=
property_creation_metadata
...
...
@@ -72,12 +71,12 @@ class VocabularyDefinitionToCreationMetadataParser(object):
def
parse
(
self
,
definition
):
creation_metadata
=
dotdict
()
vocabulary_creation_metadata
=
dotdict
()
code
=
definition
.
attributes
.
get
(
u
'
code
'
)
code
=
upper_case_code
(
definition
.
attributes
.
get
(
u
'
code
'
)
)
vocabulary_creation_metadata
.
code
=
code
vocabulary_creation_metadata
.
version
=
get_version
(
definition
.
attributes
.
get
(
u
'
version
'
,
1
))
vocabulary_creation_metadata
.
terms
=
dotdict
()
for
prop
in
definition
.
properties
:
term_code
=
prop
.
get
(
u
'
code
'
)
term_code
=
upper_case_code
(
prop
.
get
(
u
'
code
'
)
)
creation_term_metadata
=
dotdict
()
creation_term_metadata
.
code
=
term_code
creation_term_metadata
.
version
=
get_version
(
prop
.
get
(
u
'
version
'
,
1
))
...
...
@@ -95,7 +94,7 @@ class SampleTypeDefinitionToCreationMetadataParser(object):
def
parse
(
self
,
definition
):
creation_metadata
=
dotdict
()
sample_type_creation_metadata
=
dotdict
()
code
=
definition
.
attributes
.
get
(
u
'
code
'
)
code
=
upper_case_code
(
definition
.
attributes
.
get
(
u
'
code
'
)
)
sample_type_creation_metadata
.
code
=
code
sample_type_creation_metadata
.
version
=
get_version
(
definition
.
attributes
.
get
(
u
'
version
'
,
1
))
creation_metadata
[
code
]
=
sample_type_creation_metadata
...
...
@@ -111,7 +110,7 @@ class ExperimentTypeDefinitionToCreationMetadataParser(object):
def
parse
(
self
,
definition
):
creation_metadata
=
dotdict
()
experiment_type_creation_metadata
=
dotdict
()
code
=
definition
.
attributes
.
get
(
u
'
code
'
)
code
=
upper_case_code
(
definition
.
attributes
.
get
(
u
'
code
'
)
)
experiment_type_creation_metadata
.
code
=
code
experiment_type_creation_metadata
.
version
=
get_version
(
definition
.
attributes
.
get
(
u
'
version
'
,
1
))
creation_metadata
[
code
]
=
experiment_type_creation_metadata
...
...
@@ -127,7 +126,7 @@ class DatasetTypeDefinitionToCreationMetadataParser(object):
def
parse
(
self
,
definition
):
creation_metadata
=
dotdict
()
dataset_type_creation_metadata
=
dotdict
()
code
=
definition
.
attributes
.
get
(
u
'
code
'
)
code
=
upper_case_code
(
definition
.
attributes
.
get
(
u
'
code
'
)
)
dataset_type_creation_metadata
.
code
=
code
dataset_type_creation_metadata
.
version
=
get_version
(
definition
.
attributes
.
get
(
u
'
version
'
,
1
))
creation_metadata
[
code
]
=
dataset_type_creation_metadata
...
...
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