dayrize-usecase/pipeline/dags/utils.py

13 lines
317 B
Python
Raw Normal View History

2023-06-21 19:12:03 +02:00
"""
Misc helper functions
"""
import pathlib
def load_docs(caller_path, fname="README.md"):
"""Load the README.md file for the DAG's docs"""
caller_wd = pathlib.Path(caller_path).parent
with pathlib.Path(caller_wd, fname).open(encoding="utf-8") as docs_fh:
docs = docs_fh.read()
return docs