ES-DOC / pyessv

Python Earth Science Standard Vocabularies
Other
8 stars 7 forks source link

Custom Collection for non-enumeration Terms #1

Closed asladeofgreen closed 2 years ago

asladeofgreen commented 7 years ago

Some DRS facets are not an enumeration of allowed values but refers to a “pattern” or a combination of other facets: Examples: CMIP6 Ensemble -> r[0-9]i[0-9]p[0-9]f[0-9]
CORDEX RCM Model -> [institute]-[rcm_name]

Add a custom RegExCollection instance that would not have term files but rather a regular expression to constrain term names within the collection. Add a custom CombineCollection instance that would not have term files but rather a collections uid pattern to build term names from other collections. Those custom collection should be able to propagate the validation/check methods depending on the RegEx or the terms from the other collections.

glevava commented 5 years ago

First case is supported by term_regex. Second case of "composed" collection is more tricky because it needs combinations restrictions. e.g., IPSL-HIRCHAM5 doesn't yet exist.