_dag_list.py 912 Bytes
Newer Older
BO ZHANG's avatar
tweaks  
BO ZHANG committed
1
2
3
4
5
import os
import glob

DAG_LIST = [
    "csst-msc-l1-qc0",
BO ZHANG's avatar
BO ZHANG committed
6
    "csst-msc-l1-mbi",
BO ZHANG's avatar
BO ZHANG committed
7
    "csst-msc-l1-ast",
BO ZHANG's avatar
tweaks    
BO ZHANG committed
8
9
    "csst-msc-l1-sls",
    "csst-msc-l1-ooc",
BO ZHANG's avatar
BO ZHANG committed
10
11
    "csst-cpic-l1",
    "csst-cpic-l1-qc0",
BO ZHANG's avatar
tweaks  
BO ZHANG committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
]

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}")