Skip to content
Snippets Groups Projects
Commit c8805c66 authored by Yan Sushchynski (EPAM)'s avatar Yan Sushchynski (EPAM)
Browse files

GONRG-5659: Add versioning to DAGs

parent 6ddb4ce3
No related branches found
No related tags found
No related merge requests found
Pipeline #142892 failed
0.18.0
\ No newline at end of file
import argparse
from multiprocessing.spawn import prepare
import os
from jinja2 import Environment, FileSystemLoader
import pathlib
from typing import Dict, List
from jinja2 import Environment, FileSystemLoader
from dag_version_creation.dag_version_creation import DAGVersionGenerator
class DAGFileRenderer:
......@@ -66,6 +69,11 @@ class DAGFileRenderer:
with open(self.file_path, "r") as f:
rendered_file_data = self._render_template(f)
rendered_file_data = DAGVersionGenerator(
rendered_file_data,
f"{pathlib.Path(__file__).parent.resolve()}/../../../VERSION"
).add_dag_version()
with open(output_path, "w") as f:
f.write(rendered_file_data)
......
Jinja2==2.10.1
markupsafe==2.0.1
--extra-index-url https://community.opengroup.org/api/v4/projects/163/packages/pypi/simple
osdu-dag-versioning
import argparse
import os
import pathlib
from jinja2 import Environment, FileSystemLoader
from dag_version_creation.dag_version_creation import DAGVersionGenerator
from typing import Dict, List
......@@ -54,6 +56,11 @@ class DAGFileRenderer:
with open(self.file_path, "r") as f:
rendered_file_data = self._render_template(f)
rendered_file_data = DAGVersionGenerator(
rendered_file_data,
f"{pathlib.Path(__file__).parent.resolve()}/../../../VERSION"
).add_dag_version()
with open(output_path, "w") as f:
f.write(rendered_file_data)
......
Jinja2==2.10.1
markupsafe==2.0.1
--extra-index-url https://community.opengroup.org/api/v4/projects/163/packages/pypi/simple
osdu-dag-versioning
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment