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
18227c66
Verified
Commit
18227c66
authored
2 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Added `description` to the internal properties.
parent
4ead9298
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39
Release 0.4.0
,
!37
F extern name
Pipeline
#21042
passed
2 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integrationtests/test_yaml_parser.py
+10
-2
10 additions, 2 deletions
integrationtests/test_yaml_parser.py
src/caosadvancedtools/models/data_model.py
+1
-0
1 addition, 0 deletions
src/caosadvancedtools/models/data_model.py
with
11 additions
and
2 deletions
integrationtests/test_yaml_parser.py
+
10
−
2
View file @
18227c66
...
...
@@ -37,7 +37,7 @@ def teardown_module():
_delete_everything
()
def
test_
name
_in_extern
():
def
test_
internal_props
_in_extern
():
"""
Test adding the internal `name` property as a parent to an existing
property.
...
...
@@ -47,15 +47,23 @@ def test_name_in_extern():
extern:
- name
- test_name
- description
- unit
test_name:
inherit_from_suggested:
- name
- description
- unit
"""
db
.
Property
(
name
=
"
test_name
"
,
datatype
=
db
.
TEXT
).
insert
()
ents
=
parse_model_from_string
(
model
)
ents
.
sync_data_model
(
noquestion
=
True
)
test_prop
=
db
.
Property
(
name
=
"
test_name
"
).
retrieve
()
assert
len
(
test_prop
.
parents
)
==
3
desc_prop
=
db
.
Property
(
name
=
"
description
"
).
retrieve
()
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
assert
len
(
test_prop
.
parents
)
==
1
unit_prop
=
db
.
Property
(
name
=
"
unit
"
).
retrieve
()
assert
test_prop
.
has_parent
(
desc_prop
)
assert
test_prop
.
has_parent
(
name_prop
)
assert
test_prop
.
has_parent
(
unit_prop
)
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/models/data_model.py
+
1
−
0
View file @
18227c66
...
...
@@ -34,6 +34,7 @@ from caosdb.apiutils import compare_entities, describe_diff
CAOSDB_INTERNAL_PROPERTIES
=
[
"
description
"
,
"
name
"
,
"
unit
"
,
]
...
...
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