Skip to content

Fixing assembly rules - #1437

Merged
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:validation_cleanup
Sep 30, 2026
Merged

VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:validation_cleanup

Conversation

@VisLab

@VisLab VisLab commented Sep 30, 2026

Copy link
Copy Markdown
Member

No description provided.

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.
A HED cell is part of a row, so the pass that runs the group-level checks on cells when no assembly follows never runs the required-tag or unique-tag checks; validate_hed_column(full_string=True) follows the same rule. The whole-row decision from the mapper's column map is gone. The sidecar stage is unchanged: hed-tests TAG_NOT_UNIQUE has a sidecar-only failing case.

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

Sidecar fragments still run whole-row required-tag checks before assembly.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Refines staged spreadsheet validation so row-wide checks occur after assembly.

Changes:

  • Defers BaseInput conversion until assembly.
  • Separates cell-level from whole-row validation.
  • Adds staged-validation regression tests.
File Description
hed/​validator/​hed_validator.py Adds whole-row check control.
hed/​validator/​spreadsheet_validator.py Reorders and separates validation stages.
tests/​validator/​test_staged_validation.py Covers deferred assembly and row-level checks.

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

Comment thread hed/validator/hed_validator.py
@VisLab
VisLab merged commit 3bbd435 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#1437. A sidecar string is a fragment of a row, so the sidecar stage no longer runs the required-tag check on it; required tags split between a sidecar string and the HED column validate clean. The unique-tag check still runs there, since a unique tag repeated inside a fragment is repeated in the row and hed-tests has a sidecar-only TAG_NOT_UNIQUE case. run_full_string_checks takes required_tags and unique_tags in place of whole_row; the HED-cell pass passes both False.
VisLab added a commit to VisLab/hed-python that referenced this pull request Sep 30, 2026
Copilot review of PR hed-standard#1438. required_tags and unique_tags on HedValidator.run_full_string_checks can no longer be passed positionally, so a positional call cannot silently change meaning. The whole_row flag they replace lived on main for one day between PRs hed-standard#1437 and hed-standard#1438 and never reached a release, so no compatibility parameter is kept for it.
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