Skip to content

Run full-string checks when no assembly follows - #1436

Merged
VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:validation_cleanup
Sep 30, 2026
Merged

VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:validation_cleanup

Conversation

@VisLab

@VisLab VisLab commented Sep 30, 2026

Copy link
Copy Markdown
Member

A ColumnSource whose as_base_input() returns None never reaches stage 4, so stage 3 now passes full_string=True to validate_hed_column for it. The group-level checks are otherwise lost for a caller that never assembles rows (ndx-hed assemble=False). A source that offers a BaseInput is unchanged: basic checks in stage 3, group-level checks once in stage 4.

A ColumnSource whose as_base_input() returns None never reaches stage 4, so stage 3 now passes full_string=True to validate_hed_column for it. The group-level checks are otherwise lost for a caller that never assembles rows (ndx-hed assemble=False). A source that offers a BaseInput is unchanged: basic checks in stage 3, group-level checks once in stage 4.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Cell-level checks can reject valid multi-column annotations, and the early assembly call can mask stage-3 errors.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

This PR adds full-string HED checks for column sources that cannot assemble rows, so those checks are not skipped.

Changes:

  • Run full-string checks in stage 3 when as_base_input() returns None.
  • Add tests for sources with and without assembly.
File Description
tests/​validator/​test_staged_validation.py Tests the new stage-3 behavior and existing assembly path.
hed/​validator/​spreadsheet_validator.py Selects where full-string checks run.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread hed/validator/spreadsheet_validator.py
Comment thread hed/validator/spreadsheet_validator.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Checking individual HED columns as complete annotations can report false errors when tags are split across columns.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@VisLab
VisLab merged commit 85347a3 into hed-standard:main Sep 30, 2026
18 checks passed
VisLab added a commit to VisLab/hed-python that referenced this pull request Sep 30, 2026
Copilot review of PR hed-standard#1436. as_base_input() is called only once stages 2 and 3 have passed, so a stage 3 error never costs a table conversion; a source with no BaseInput then gets the group-level checks on each distinct HED cell in a second pass. Those cell checks skip the required-tag and unique-tag rules (run_full_string_checks whole_row=False) unless the HED column is the row's only HED, since the sidecar may supply the missing tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants