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.

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

Methods

hed.tools.remodeling.operations.summarize_hed_validation_op.SummarizeHedValidationOp.__init__(...)

Constructor for the summarize hed validation operation.

hed.tools.remodeling.operations.summarize_hed_validation_op.SummarizeHedValidationOp.check_parameters(...)

Verify that the parameters meet the operation specification.

hed.tools.remodeling.operations.summarize_hed_validation_op.SummarizeHedValidationOp.do_op(...)

Validate the dataframe with the accompanying sidecar, if any.

Attributes

hed.tools.remodeling.operations.summarize_hed_validation_op.SummarizeHedValidationOp.PARAMS

hed.tools.remodeling.operations.summarize_hed_validation_op.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.

Raises:
  • KeyError

    • If a required parameter is missing.

    • If an unexpected parameter is provided.

  • TypeError

    • If a parameter has the wrong type.

SummarizeHedValidationOp.check_parameters(parameters)

Verify that the parameters meet the operation specification.

Parameters:

parameters (dict) – Dictionary of parameters for this operation.

Raises:
  • KeyError

    • If a required parameter is missing.

    • If an unexpected parameter is provided.

  • TypeError

    • If a parameter has the wrong type.

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.

SummarizeHedValidationOp.PARAMS = {'operation': 'summarize_hed_validation', 'optional_parameters': {'append_timecode': <class 'bool'>, 'check_for_warnings': <class 'bool'>}, 'required_parameters': {'summary_filename': <class 'str'>, 'summary_name': <class 'str'>}}
SummarizeHedValidationOp.SUMMARY_TYPE = 'hed_validation'