Skip to content

Conversation

@VisLab
Copy link
Member

@VisLab VisLab commented Jan 19, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request resolves issue #1183 by implementing placeholder validation improvements and adds a new HED string validation script with corresponding CLI command. The changes include test enhancements for better error reporting, refactoring of common script utilities, and updates to dependencies.

Changes:

  • Added validate_hed_string script and CLI command for validating individual HED annotation strings against a schema
  • Improved placeholder validation logic in validators to properly handle placeholders with units (e.g., "Acceleration/# m-per-s^2")
  • Refactored common logging and formatting utilities into script_utils.py for code reuse across scripts
  • Enhanced spec test error reporting with test counters, better tracking, and more detailed failure information

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
hed/scripts/validate_hed_string.py New script for validating HED strings with support for definitions, multiple schemas, and various output formats
hed/cli/cli.py Added validate hed-string command with comprehensive options for validation
hed/scripts/script_utils.py Extracted common utility functions for logging setup and validation result formatting
hed/scripts/validate_bids.py Refactored to use new shared utilities from script_utils.py, added --no-log option
hed/validator/hed_validator.py Enhanced placeholder validation logic to handle placeholders followed by units
hed/validator/util/class_util.py Added allow_placeholders parameter to properly validate placeholders with units
tests/validator/test_tag_validator.py Updated test for placeholder validation and added comprehensive test for placeholders with units
tests/scripts/test_validate_hed_string.py New comprehensive test suite for validate_hed_string script
tests/test_cli_parameter_parity.py Added test to verify CLI parameter parity for validate_hed_string command
spec_tests/test_errors.py Enhanced test reporting with counters, test location tracking, and better failure diagnostics
pyproject.toml Added validate_hed_string entry point for legacy command compatibility
requirements-dev.txt Updated Sphinx version constraint to support newer versions
hed/errors/init.py Exported iter_errors function for use in formatting utilities

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@VisLab VisLab merged commit 0ed25b8 into hed-standard:main Jan 20, 2026
21 checks passed
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.

1 participant