Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-advanced-user-tools
Commits
a37c5d80
Commit
a37c5d80
authored
3 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
DOC: added a new keyword role and some missing documentation
parent
7d0f66d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39
Release 0.4.0
,
!30
F extend yaml model
Pipeline
#19160
passed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosadvancedtools/models/parser.py
+9
-1
9 additions, 1 deletion
src/caosadvancedtools/models/parser.py
with
9 additions
and
1 deletion
src/caosadvancedtools/models/parser.py
+
9
−
1
View file @
a37c5d80
...
@@ -35,8 +35,10 @@ KEYWORDS = ["parent", # TODO: can we remove that, see: #36
...
@@ -35,8 +35,10 @@ KEYWORDS = ["parent", # TODO: can we remove that, see: #36
"
suggested_properties
"
,
"
suggested_properties
"
,
"
inherit_from_recommended
"
,
"
inherit_from_recommended
"
,
"
inherit_from_suggested
"
,
"
inherit_from_suggested
"
,
"
inherit_from_obligatory
"
,
]
"
inherit_from_obligatory
"
,
"
role
"
,
]
# TODO: check whether it's really ignored
# These KEYWORDS are not forbidden as properties, but merely ignored.
# These KEYWORDS are not forbidden as properties, but merely ignored.
KEYWORDS_IGNORED
=
[
KEYWORDS_IGNORED
=
[
"
unit
"
,
"
unit
"
,
...
@@ -109,6 +111,10 @@ def parse_model_from_string(string):
...
@@ -109,6 +111,10 @@ def parse_model_from_string(string):
class
Parser
(
object
):
class
Parser
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
"""
Initialize an empty parer object and initialize
the dictionary of entities and the list of treated elements.
"""
self
.
model
=
{}
self
.
model
=
{}
self
.
treated
=
[]
self
.
treated
=
[]
...
@@ -233,6 +239,8 @@ class Parser(object):
...
@@ -233,6 +239,8 @@ class Parser(object):
"""
adds names of Properties and RecordTypes to the model dictionary
"""
adds names of Properties and RecordTypes to the model dictionary
Properties are also initialized.
Properties are also initialized.
name is the key of the yaml element and definition the value.
"""
"""
if
name
==
"
__line__
"
:
if
name
==
"
__line__
"
:
...
...
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