SummarizeHedValidationOp

class SummarizeHedValidationOp(parameters)[source]

Validate the HED tags in a dataset and report errors.

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

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

  • check_for_warnings (bool): If true include warnings as well as errors.

Optional remodeling parameters:
  • append_timecode (bool): If true, the timecode is appended to the base filename when summary is saved.

The purpose of this op is to produce a summary of the HED validation errors in a file.

Methods

SummarizeHedValidationOp.__init__(parameters)

Constructor for the summarize HED validation operation.

SummarizeHedValidationOp.do_op(dispatcher, ...)

Validate the dataframe with the accompanying sidecar, if any.

SummarizeHedValidationOp.validate_input_data(...)

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

Attributes

SummarizeHedValidationOp.NAME

SummarizeHedValidationOp.PARAMS

SummarizeHedValidationOp.SUMMARY_TYPE

SummarizeHedValidationOp.__init__(parameters)[source]

Constructor for the summarize HED validation operation.

Parameters:

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

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

Validate the dataframe with the accompanying sidecar, if any.

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

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

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

  • sidecar (Sidecar or file-like) – Usually needed unless only HED tags in HED column of event file.

Returns:

A copy of df

Return type:

DataFrame

Side effect:

Updates the relevant summary.

static SummarizeHedValidationOp.validate_input_data(parameters)[source]

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

SummarizeHedValidationOp.NAME = 'summarize_hed_validation'
SummarizeHedValidationOp.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'}, 'check_for_warnings': {'description': 'If true warnings as well as errors are reported.', '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', 'check_for_warnings'], 'type': 'object'}
SummarizeHedValidationOp.SUMMARY_TYPE = 'hed_validation'