From 87a738461cfc6bc3631527989a2ff6ec7acc41ae Mon Sep 17 00:00:00 2001 From: brb Date: Thu, 6 Jul 2023 15:54:20 +0200 Subject: [PATCH] defined runner script --- code/runner_script.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 code/runner_script.py diff --git a/code/runner_script.py b/code/runner_script.py new file mode 100644 index 0000000..371d0e1 --- /dev/null +++ b/code/runner_script.py @@ -0,0 +1,19 @@ +from pydantic import BaseModel +from typing import List, Dict +import yaml +from pathlib import Path + +class Pipeline(BaseModel): + name: str + requirements: str + script: List[str] + +class RunnerScript(BaseModel): + pipelines: List[Dict[str, Pipeline]] + +if __name__ == '__main__': + path = Path(__file__).parent.parent / 'runner_script.yml' + with open(path, 'r') as fh: + script = yaml.safe_load(fh) + runner_script = RunnerScript.parse_obj(script) + print(runner_script) \ No newline at end of file