Skip to content

Rework the **MetaValidator** class #597

Description

@danielhuppmann

For the ScenarioCompass Initiative processing, we need to extend the MetaValidator:

  1. Allow checking not just for a list of values but also value-ranges (upper_bound/lower_bound/range/value/rtol/atol) similar to the DataValidator

  2. Configuration from file with the structure like

    - name: Sustainability Concern|Exceeding Prudent Limit For Geological Carbon Storage|World
      meta: Emissions Diagnostics|Cumulative CCS [2020-2100, Gt CO2]
      validation:
        - warning_level: high
          upper_bound: 1490
        - warning_level: medium
          upper_bound: 1290
    # this is a a hard check that the Project meta-indicators must be one item from the list     
    - meta: Project
      values: [ECEMF, ENGAGE, NAVIGATE]
  3. Check that any files in the folder validate_meta can be parsed as MetaValidator (similar to the validate_data folder, I think?)

One problem that I see is that the pyam-method set_meta() uses the args name and meta differently.

  • pyam: meta is the values, name is the column in the IamDataFrame.meta dataframe
  • nomenclature.DataValidator: name is the column that will be assigned by the validation, so I chose meta as the arg-name of the column to be used for the validation (because that column can be accessed as df.meta["Project"]

Any thoughts @phackstock @dc-almeida?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions