hyrax.verbs.verb_registry#
Attributes#
Classes#
Base class for all hyrax verbs |
Functions#
|
Decorator to register a hyrax verb |
|
Returns all verbs that are currently registered |
|
Returns all verbs that are currently registered with a class-based implementation |
|
Returns true if the verb has a class based implementation |
|
Gives the class object for the named verb |
Module Contents#
- class Verb(config)[source]#
Bases:
abc.ABCBase class for all hyrax verbs
Overall initialization for all verbs that saves the config
- classmethod information()[source]#
Returns a string describing this verb. Includes the following: - Name of the verb - Required Data Groups - Optional Data Groups - One line description of what this verb does
If a data group is empty then it will be printed as an empty tuple.
- Returns:
<name>: Data Groups: Req. (<req1>, <req2>, …), Opt. (<opt1>, <opt2>, …). <Description>
- Return type:
str
- validate_data_request() None[source]#
Validate the data_request configuration for this verb’s known groups.
Reads
data_requestfrom the verb’s config and checks:All groups listed in
REQUIRED_DATA_GROUPSare present.Cross-group split_fraction constraints (sum ≤ 1.0, consistency) hold for the active groups only — groups outside
REQUIRED_DATA_GROUPS + OPTIONAL_DATA_GROUPSare ignored so that unrelated groups in a shared config do not cause false failures.
Verbs that define neither
REQUIRED_DATA_GROUPSnorOPTIONAL_DATA_GROUPSskip validation entirely.- Raises:
RuntimeError – If a required group is absent, or if cross-group split_fraction constraints are violated for the active groups.
- all_class_verbs() list[str][source]#
Returns all verbs that are currently registered with a class-based implementation