Skip to content

Refactor MetaValidator#604

Draft
dc-almeida wants to merge 10 commits into
IAMconsortium:mainfrom
dc-almeida:feature/metavalidator
Draft

Refactor MetaValidator#604
dc-almeida wants to merge 10 commits into
IAMconsortium:mainfrom
dc-almeida:feature/metavalidator

Conversation

@dc-almeida

@dc-almeida dc-almeida commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Closes #597
This PR includes the following:

  • Refactors and expands MetaValidator
    • from_codelist: uses meta codelists to validate against allowed values
    • from_file: uses config files following a similar structure to DataValidator
      • Meta validation config files allow for a meta field that specifies the column(s) to validate, and name refers to the output column with validation results
    • apply follows a similar implementation to DataValidator, but for meta indicators
  • Updates MetaCode, keeping a field alias for backwards compatibility
    • If backwards compatibility is not necessary, best to remove the alias, as it has a small caveat with Code extra_attributes
  • Refactors DataValidator by extracting generic Validator and ValidatorCriteria parent classes from which meta and data validators inherit
  • Adds meta validation step in CLI command validate-project
  • Updates tests
  • Updates documentation

@dc-almeida dc-almeida added enhancement New feature or request refactor Refactoring or clean up labels Jul 23, 2026
@dc-almeida dc-almeida self-assigned this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor Refactoring or clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework the **MetaValidator** class

1 participant