From 5690c0e806bea6c5c1b7af519c6a1d22248453dc Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Tue, 11 Feb 2025 14:17:17 +0100 Subject: [PATCH] Update readme and import common-definitions (#1) --- README.md | 48 +++-------------------------- definitions/{region => }/.gitkeep | 0 definitions/region/common.yaml | 2 -- definitions/variable/.gitkeep | 0 definitions/variable/variables.yaml | 3 -- nomenclature.yaml | 17 ++++++++++ nomenclature_template.yaml | 8 ----- 7 files changed, 21 insertions(+), 57 deletions(-) rename definitions/{region => }/.gitkeep (100%) delete mode 100644 definitions/region/common.yaml delete mode 100644 definitions/variable/.gitkeep delete mode 100644 definitions/variable/variables.yaml create mode 100644 nomenclature.yaml delete mode 100644 nomenclature_template.yaml diff --git a/README.md b/README.md index 3f81ba6..2615c8d 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,10 @@ -# Scenario Explorer Workflow Template +# Scenario Compass Initiative - Workflow Repository -Copyright 2022-2024 IIASA +Copyright 2025 IIASA [![Code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) ## Overview -This is a template for project-specific scenario processing workflows. - -To use this template for a project, do the following: -- Create a new repository from this template -- Update the title and overview section of this Readme -- Start adding definitions and mappings -- If you want to use the [common-definitions](https://github.com/IAMconsortium/common-definitions) - developed and maintained by the IAMC, rename the file `nomenclature_template.yaml` - to `nomenclature.yaml`. - -### Project nomenclature - -The folder `definitions` can contain the project nomenclature, i.e., list of allowed -variables and regions, for use in the validation workflow. See the **nomenclature** -package for more information ([link](https://github.com/iamconsortium/nomenclature)). - -The folder `mappings` can contain model mappings that are used to register models and -define how results should be processed upon upload to a Scenario Explorer. - -### Model registration - -This is the step-by-step guide to registering your model: - -1. Fork this repository -2. Follow the instructions from the nomenclature documentation here: . -Please make sure to follow the instructions completely, both the _Model mapping_ and the _Region definitions_ part. You'll have to end up with two files. -3. Open a pull request into this repository. Make sure that the tests run through and correct any potential issues. If the tests are failing you can view the details by clicking on the failed test run. - -4. Set [@danielhuppmann](https://github.com/danielhuppmann) and [@phackstock](https://github.com/phackstock) as reviewers. -5. Once everything is in order we will merge your pull request and your model will be registered. - -### Workflow - -The module `workflow.py` has a function `main(df: pyam.IamDataFrame) -> pyam.IamDataFrame:`. - -Per default, this function takes an **IamDataFrame** and returns it without -modifications. [Read the docs](https://pyam-iamc.readthedocs.io) for more information -about the **pyam** package for scenario analysis and data visualization. - -**Important**: Do not change the name of the module `workflow.py` or the function `main` -as they are called like this by the Job Execution Service. Details can be found -[here](https://wiki.ece.iiasa.ac.at/wiki/index.php/Scenario_Explorer/Setup#Job_Execution_Service). +This is the workflow repository for the Scenario Compass Initiative. +Visit https://scenariocompass.org for more information. diff --git a/definitions/region/.gitkeep b/definitions/.gitkeep similarity index 100% rename from definitions/region/.gitkeep rename to definitions/.gitkeep diff --git a/definitions/region/common.yaml b/definitions/region/common.yaml deleted file mode 100644 index 19895e7..0000000 --- a/definitions/region/common.yaml +++ /dev/null @@ -1,2 +0,0 @@ -- common: - - World diff --git a/definitions/variable/.gitkeep b/definitions/variable/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/definitions/variable/variables.yaml b/definitions/variable/variables.yaml deleted file mode 100644 index e422375..0000000 --- a/definitions/variable/variables.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- Emissions|CO2: - description: Total net emissions of carbon dioxide (CO2) - unit: Mt CO2/yr diff --git a/nomenclature.yaml b/nomenclature.yaml new file mode 100644 index 0000000..8df602f --- /dev/null +++ b/nomenclature.yaml @@ -0,0 +1,17 @@ +dimensions: + - variable + - region +repositories: + common-definitions: + url: https://github.com/IAMconsortium/common-definitions.git/ +definitions: + variable: + repository: common-definitions + region: + repository: + name: common-definitions + include: + - hierarchy: common + - hierarchy: R5 + - hierarchy: R9 + - hierarchy: R10 diff --git a/nomenclature_template.yaml b/nomenclature_template.yaml deleted file mode 100644 index c344d80..0000000 --- a/nomenclature_template.yaml +++ /dev/null @@ -1,8 +0,0 @@ -repositories: - common-definitions: - url: https://github.com/IAMconsortium/common-definitions.git/ -definitions: - variable: - repository: common-definitions - region: - repository: common-definitions