_dag_list.py 799 Bytes
Newer Older
BO ZHANG's avatar
tweaks  
BO ZHANG committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
import glob

DAG_LIST = [
    "csst-msc-l1-mbi",
    "csst-msc-l1-qc0",
]

EXISTENCE_MAPPING = {True: "✅", False: "❌"}

print("      DAG      \t definition   task")
print("--------------------------------------------")
for this_dag_id in DAG_LIST:
    this_dag_definition_file = os.path.join(
        os.path.dirname(os.path.dirname(__file__)),
        "dag_config",
        f"{this_dag_id}.yml",
    )
    this_dag_task_template_file = os.path.join(
        os.path.dirname(os.path.dirname(__file__)),
        "dag_config",
        f"{this_dag_id}.json",
    )
    status_def = EXISTENCE_MAPPING[os.path.exists(this_dag_definition_file)]
    status_task = EXISTENCE_MAPPING[os.path.exists(this_dag_task_template_file)]
    print(f"{this_dag_id} \t {status_def}        {status_task}")