-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
In microbiomedata/nmdc-schema#2599, a storage_unit
annotation was added to slots with range QuantityValue
. This annotation contains a pipe-delimited list of permissible values from UnitEnum
(i.e. valid UCUM codes) that represent which unit(s) we expect when populating the QuantityValue.has_unit
slot.
Currently the submission-schema
build process replaces the range of QuantityValue
with string
and applies pattern
that looks like {number} {unit}
-- where unit is essentially any string. This task is to update the build process as follows:
- For any incoming
nmdc-schema
slot with arange
that isQuantityValue
, check for astorage_unit
annotation.- If the
storage_unit
annotation is a singleUnitEnum
permissible value- Change the
submission-schema
slot'srange
tofloat
- Set the
submission-schema
slot'sunit
with the annotation value and thetitle
of the permissible value, if available
- Change the
- If the
storage_unit
contains a pipe-separated list ofUnitEnum
permissible values:- Change the
submission-schema
slot'srange
tostring
- Set the
submission-schema
slot'spattern
to a regex incorporating the pipe-separated unit list (e.g. the value should like{number} unit_a|unit_b
)
- Change the
- Otherwise
- Change the
submission-schema
slot'srange
tostring
- Set the
submission-schema
slot'spattern
to the generic{number} {unit}
regex
- Change the
- If the
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress