From d08cc13941d8e4ef5fc27622e82df11279f64bbd Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Fri, 1 Mar 2024 10:55:42 +0100 Subject: [PATCH] Add `RegionCode` to region codelist --- workflow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow.py b/workflow.py index 0e7162e..3a00bfe 100644 --- a/workflow.py +++ b/workflow.py @@ -1,6 +1,7 @@ from pathlib import Path import pyam from nomenclature import DataStructureDefinition, RegionProcessor, process +from nomenclature.codelist import RegionCode here = Path(__file__).absolute().parent @@ -28,7 +29,7 @@ def main(df: pyam.IamDataFrame) -> pyam.IamDataFrame: elif len(r_split) == 2: if all([_r in dsd.region for _r in r_split]): # add the directional-region to the codelist (without attributes) - dsd.region[r] = None + dsd.region[r] = RegionCode(name=r, hierarchy="directional") # run the validation and region-processing df = process(df, dsd, processor=processor)