Skip to content

TODO: Fully test and document iter_errors #1053

Open
@VisLab

Description

@VisLab

This generator has been added (by request) PR #1052 and preliminary testing passes, but needs more extensive testing before release.

The iter_errors is a generator that converts HED issues (which are nested dictionaries into flat dictionaries that include the context). The standard context keys are:

    CUSTOM_TITLE = 'ec_title'
    FILE_NAME = 'ec_filename'
    SIDECAR_COLUMN_NAME = 'ec_sidecarColumnName'
    SIDECAR_KEY_NAME = 'ec_sidecarKeyName'
    ROW = 'ec_row'
    COLUMN = 'ec_column'
    LINE = "ec_line"
    HED_STRING = 'ec_HedString'
    SCHEMA_SECTION = 'ec_section'
    SCHEMA_TAG = 'ec_schema_tag'
    SCHEMA_ATTRIBUTE = 'ec_attribute'

The standard error keys are:

  • 'code' -- the standard HED error code
  • 'message' -- the error message
  • 'severity' -- 1 is error and 10 is warning.
  • 'url' -- the web page in the HED Specification corresponding to the error (has explanation of how can occur).
  • 'source_tag' -- the source tag that caused the error if application.

Note: #candleindark con/validation#1 It is available in hed/errors/error_reporter.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationAn error in the documentation or something is missingtesting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions