Skip to content

Allow wildcard-items in Code #432

@danielhuppmann

Description

@danielhuppmann

To allow more flexibility for reporting of technical parameters, we want to allow "wildcard-codes" echoing the wildcard-implementation in pyam using *.

Concept: a VariableCode can be defined as

- Capital Cost|Electricity|Coal|*:
    description: Technology-specific capital cost of a newly installed plant to generate
      electricity from coal
    unit: USD_2010/kW

The validation-method should then accept any variable that matches the code-name including any string for the wildcard.

This can follow the implementation by @phackstock here

pattern = re.compile(escape_regexp(filter_value) + "$")

To be explicit, any of the following variables should pass validation:

  • Capital Cost|Electricity|Coal|1
  • Capital Cost|Electricity|Coal|Lignite
  • Capital Cost|Electricity|Coal|Super-Critical
  • Capital Cost|Electricity|Coal|really dirty stuff

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions