Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
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 Crawler
Commits
532042ab
Commit
532042ab
authored
7 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Add more explanations to value definitions
parent
4d5394ea
No related branches found
No related tags found
2 merge requests
!198
REL: Release 0.10.0
,
!187
F unit
Pipeline
#56403
passed with warnings
7 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/doc/cfood.rst
+40
-0
40 additions, 0 deletions
src/doc/cfood.rst
with
40 additions
and
0 deletions
src/doc/cfood.rst
+
40
−
0
View file @
532042ab
...
...
@@ -157,6 +157,46 @@ create lists or multi properties instead of single values:
Values and units
----------------
Property values can be specified as a simple strings (as above) or as
a dictionaries that may also specify the :ref:`collection mode <List
Mode>`. Strings starting with a "$" will be replaced by a
corresponding variable if there is any. See the :doc:`tutorials
chapter<tutorials/index>` of this documentation for more elaborate
examples on how the variable replacment works exactly. A simple
example could look the following.
.. code-block:: yaml
ValueElt:
type: TextElement
match_name: ^my_prop$
match_value: "(?P<value>.*)" # Anything in here is stored in the variable "value"
records:
MyRecord:
MyProp: $value # will be replace by whatever is stored in the "value" variable set above.
If not given explicitly, the collection mode will be determined from
the first character of the property value as explained above, and the
following three definitions are all equivalent:
.. code-block:: yaml
MyProp: +$value
.. code-block:: yaml
MyProp:
value: +$value
and
.. code-block:: yaml
MyProp:
value: $value
collection_mode: list
Units of numeric values can be set by providing a property value not
as a single string, but as a dictionary with a ``value`` and a
``unit`` key. Within a converter definition this could look the
...
...
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