IAMconsortium / common-definitions

Repository for definitions and mappings in model comparison projects
Creative Commons Zero v1.0 Universal
9 stars 18 forks source link

Guard against adding deprecated legacy variables #61

Closed danielhuppmann closed 4 months ago

danielhuppmann commented 4 months ago

This PR adds a test and GitHub Actions workflow to guard against mistakenly adding variables that were marked as being superseded by new variables.

The way that legacy variables are marked in the common-definitions repository is by having an attribute with the legacy project name, currently "navigate" and "engage".

- Final Energy|Carbon Removal|{Carbon Removal Option}|Electricity:
    description: Electricity use for carbon removal by {Carbon Removal Option}
    unit: EJ/yr
    notes: See `Secondary Energy|Electricity|...` for the power generation mix
    navigate: Final Energy|Carbon Removal|Electricity|{Carbon Removal Option}

The test workflow checks that all such attributes are not duplicates of variables in the VariableCodeList.

danielhuppmann commented 4 months ago

The validation can be seen "in action" here

danielhuppmann commented 4 months ago

Thanks @phackstock - I prefer to keep the requirements.txt file for now because this is an easy way for new users to quickly see what is required to run this project. We can add it to the Readme instead in a follow-up PR.