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
96588bb1
Commit
96588bb1
authored
2 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
DOC: added information on how to reuse properties in yaml files
parent
326bd556
No related branches found
No related tags found
2 merge requests
!107
Release v0.11.0
,
!57
FIX: if multiple updates for one entity exist, the retrieve would result in an...
Pipeline
#29018
failed
2 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/doc/yaml_interface.rst
+35
-0
35 additions, 0 deletions
src/doc/yaml_interface.rst
with
35 additions
and
0 deletions
src/doc/yaml_interface.rst
+
35
−
0
View file @
96588bb1
...
@@ -74,6 +74,41 @@ If the data model depends on record types or properties which already exist in C
...
@@ -74,6 +74,41 @@ If the data model depends on record types or properties which already exist in C
added using the ``extern`` keyword: ``extern`` takes a list of previously defined names.
added using the ``extern`` keyword: ``extern`` takes a list of previously defined names.
Reusing Properties
==================
Properties defined once (either as a property of a Record or as a separate Property) can be reused
later in the yaml file. That requires that after the first occurrence of the property, the
attributes have to be empty. Otherwise the reuse of the property would be conflicting with its
original definition.
Example:
--------
.. code-block:: yaml
Project:
obligatory_properties:
projectId:
datatype: INTEGER
description: 'UID of this project'
date:
datetype: DATETIME
description: Date of a project or an experiment
Experiment:
obligatory_properties:
experimentId:
datatype: INTEGER
description: 'UID of this experiment'
date: # no further attributes here!
The above example defines two Records: Project and Experiment
The property ``date`` is defined upon its first occurrence as a property of ``Project``.
Later, the same property is also added to ``Experiment`` where no additional attributes are
allowed to specify.
Datatypes
Datatypes
=========
=========
...
...
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