Module specs._types._summary

Type definitions for summary and condense specs.

Classes

class ReduceSpec (*args, **kwargs)

TypedDict defining the fields required in a summary_map entry.

Attributes

reduce : Callable
function to reduce a list of values to a single value
key_filters : list[str]
if the source table key contains a value in this list, exclude its value from consideration.
value_filters : list[Callable]
if any of these functions return True for for a candidate value, exclude it from consideration.
queries : dict[str, Callable]
collect candidate values by querying the source table for keys that match the regex defined in the query key and reduce the results using the function defined in the query value.

Ancestors

  • builtins.dict

Class variables

var key_filters : list[str]
var queries : dict[str, collections.abc.Callable[[list[str]], str | bool | list[typing.Any]]]
var reduce : collections.abc.Callable[[collections.abc.Sequence[typing.Any]], str | bool | list[typing.Any]] | str
var value_filters : list[collections.abc.Callable[..., bool]]
class SummarySpec (*args, **kwargs)

Typed dict for required summary spec keys.

Attributes

summary_func : str
must be a valid summary function name from TableTransformer()
summary_args : dict[str, Any]
kwargs for summary_func
summary_key_addendum : list[str]
list of valid output keys not appearing in summary_map
summary_map : CondenseSpec
map of output keys to ReduceSpecs
summary_meets_claimmaker_standard : bool
enables "claimmaker only" operations. See aws_s3_batch.py for more information.

Ancestors

  • builtins.dict

Class variables

var summary_args : dict[str, typing.Any]
var summary_func : str
var summary_key_addendum : list[str]
var summary_map : dict[str, ReduceSpec]
var summary_meets_claimmaker_standard : bool