Updated readme file with instructions on how to set compound attributes and delete them.

This commit is contained in:
2024-04-26 14:27:01 +02:00
parent 493be88f49
commit 4fd3bb1957

View File

@ -49,6 +49,37 @@ git push -uf origin main
## Metadata review workflow
- review through branches
- updating files with metadata in Openbis
### Specifying a compound attribute in yaml language.
Consider the compound attribute *relative_humidity*, which has subattributes *value*, *units*, *range*, and *definition*. The yaml description of
such an attribute is as follows:
```yaml
relative_humidity:
value: 65
units: percentage
range: '[0,100]'
definition: 'Relative humidity represents the amount of water vapor present in the air relative to the maximum amount of water vapor the air can hold at a given temperature.'
```
### Deleting or renaming a compound attribute in yaml language.
- When the attribute is existing, it should be displayed as follows with the subattribute *rename_as*, which can be modified as desired.
- deleting an attribute on the other hand requires to add a subattribute called *delete* with the value *true*. In the below example, the
attribute relative humidity is suggested to be removed. if *delete* is set as *false* it will have no effect.
```yaml
relative_humidity:
delete: true # we added this line in the review process
rename_as: relative_humidity
value: 65
units: percentage
range: '[0,100]'
definition: 'Relative humidity represents the amount of water vapor present in the air relative to the maximum amount of water vapor the air can hold at a given temperature.'
```
```
cd existing_repo
git remote add origin https://gitlab.psi.ch/5505/functionspython.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools