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