Skip to content
Snippets Groups Projects
Commit 107598cf authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

DOC: Explain units

parent 695b27da
No related branches found
No related tags found
2 merge requests!198REL: Release 0.10.0,!187F unit
Checking pipeline status
......@@ -154,6 +154,28 @@ create lists or multi properties instead of single values:
*Measurement # Multi Property (properties are removed before run)
Measurement # Overwrite
Values and units
----------------
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
following.
.. code-block:: yaml
ValueWithUnitElt:
type: TextElement
match_name: ^my_prop$
match_value: "^(?P<number>\d+\.?\d*)\s+(?P<unit>.+)" # Extract value and unit from a string which
# has a number followed by at least one whitespace
# character followed by a unit.
records:
MyRecord:
MyProp:
value: $number
unit: $unit
File Entities
-------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment