Skip to content

Commit

Permalink
Run the validation and region-processing by default (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Sep 6, 2023
1 parent 86fb4c9 commit 7201347
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Install requirements
run: pip install -r requirements.txt
Expand Down
11 changes: 10 additions & 1 deletion workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
from pathlib import Path
import pyam
from nomenclature import DataStructureDefinition, RegionProcessor, process


here = Path(__file__).absolute().parent


def main(df: pyam.IamDataFrame) -> pyam.IamDataFrame:
"""Project/instance-specific workflow for scenario processing"""
return df

# Run the validation and region-processing
dsd = DataStructureDefinition(here / "definitions")
processor = RegionProcessor.from_directory(path=here / "mappings", dsd=dsd)
return process(df, dsd, processor=processor)

0 comments on commit 7201347

Please sign in to comment.