SummarizeDefinitionsOp

class SummarizeDefinitionsOp(parameters)[source]

Summarize the definitions used in the dataset based on Def and Def-expand.

Required remodeling parameters:
  • summary_name (str): The name of the summary.

  • summary_filename (str): Base filename of the summary.

Optional remodeling parameters:
  • append_timecode (bool): If False (default), the timecode is not appended to the summary filename.

The purpose is to produce a summary of the definitions used in a dataset.

Methods

SummarizeDefinitionsOp.__init__(parameters)

Constructor for the summary of definitions used in the dataset.

SummarizeDefinitionsOp.do_op(dispatcher, df, ...)

Create summaries of definitions.

SummarizeDefinitionsOp.validate_input_data(...)

Additional validation required of operation parameters not performed by JSON schema validator.

Attributes

SummarizeDefinitionsOp.NAME

SummarizeDefinitionsOp.PARAMS

SummarizeDefinitionsOp.SUMMARY_TYPE

SummarizeDefinitionsOp.__init__(parameters)[source]

Constructor for the summary of definitions used in the dataset.

Parameters:

parameters (dict) – Dictionary with the parameter values for required and optional parameters.

SummarizeDefinitionsOp.do_op(dispatcher, df, name, sidecar=None)[source]

Create summaries of definitions.

Parameters:
  • dispatcher (Dispatcher) – Manages the operation I/O.

  • df (DataFrame) – The DataFrame to be remodeled.

  • name (str) – Unique identifier for the dataframe – often the original file path.

  • sidecar (Sidecar or file-like) – Only needed for HED operations.

Returns:

a copy of df

Return type:

DataFrame

Side effect:

Updates the relevant summary.

static SummarizeDefinitionsOp.validate_input_data(parameters)[source]

Additional validation required of operation parameters not performed by JSON schema validator.

SummarizeDefinitionsOp.NAME = 'summarize_definitions'
SummarizeDefinitionsOp.PARAMS = {'additionalProperties': False, 'properties': {'append_timecode': {'description': 'If true, the timecode is appended to the base filename so each run has a unique name.', 'type': 'boolean'}, 'summary_filename': {'description': 'Name to use for the summary file name base.', 'type': 'string'}, 'summary_name': {'description': 'Name to use for the summary in titles.', 'type': 'string'}}, 'required': ['summary_name', 'summary_filename'], 'type': 'object'}
SummarizeDefinitionsOp.SUMMARY_TYPE = 'type_defs'