Skip to content

Commit

Permalink
Merge pull request #1029 from hed-standard/develop
Browse files Browse the repository at this point in the history
Modified validator and EventManager to handle n/a in onset column
  • Loading branch information
VisLab authored Oct 11, 2024
2 parents db3f988 + bc8d750 commit 2159297
Show file tree
Hide file tree
Showing 32 changed files with 1,942 additions and 1,791 deletions.
12 changes: 6 additions & 6 deletions hed/errors/error_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def val_error_empty_group(tag):
return f"HED tags cannot be empty. Extra delimiters found: '{tag}'"


@hed_tag_error(TemporalErrors.HED_ONSET_WITH_NO_COLUMN, actual_code=ValidationErrors.TEMPORAL_TAG_ERROR)
def val_error_hed_onset_with_no_column(tag):
return f"Cannot have Temporal tags without an 'Onset' column. Found tag: '{tag}'"
@hed_tag_error(TemporalErrors.TEMPORAL_TAG_NO_TIME, actual_code=ValidationErrors.TEMPORAL_TAG_ERROR)
def val_error_temporal_tag_no_time(tag):
return f"Cannot have Temporal tags without an 'Onset' column and a time. Found tag: '{tag}'"


@hed_tag_error(ValidationErrors.TAG_EXTENDED, has_sub_tag=True, default_severity=ErrorSeverity.WARNING)
Expand Down Expand Up @@ -77,9 +77,9 @@ def val_error_CURLY_BRACE_UNSUPPORTED_HERE(tag, problem_tag):
f"Invalid character '{problem_tag}' in tag '{tag}'")


@hed_error(ValidationErrors.ONSETS_OUT_OF_ORDER, default_severity=ErrorSeverity.WARNING)
def val_error_ONSETS_OUT_OF_ORDER():
return "Onsets need to be temporally increasing for most downstream tools to work."
@hed_error(ValidationErrors.ONSETS_UNORDERED, default_severity=ErrorSeverity.WARNING)
def val_error_ONSETS_UNORDERED():
return "Onsets need to be temporally increasing and defined for many downstream tools to work."


@hed_error(ValidationErrors.COMMA_MISSING)
Expand Down
Loading

0 comments on commit 2159297

Please sign in to comment.