@@ -81,11 +81,11 @@ def load_workflows_from_json():
8181 return db_wf
8282
8383
84- def format_table_name (description : str , subspec : int ):
85- """Format table description name, including potential versions."""
86- if not subspec :
87- return description
88- return f"{ description } _ { subspec :03d } "
84+ def format_table_name (description : str , subspec : int , origin : str ):
85+ """Format table description name, including origin and potential versions."""
86+ if subspec > 0 :
87+ description += f"_ { subspec :03d } "
88+ return f"{ origin } / { description } "
8989
9090
9191def get_devices (specs_wf : dict ):
@@ -101,7 +101,7 @@ def get_inputs(specs_wf: dict, device=""):
101101 if device and dev ["name" ] != device :
102102 continue
103103 list_inputs += [
104- format_table_name (i ["description" ], i ["subspec" ]) for i in dev ["inputs" ] if i ["origin" ] == "AOD"
104+ format_table_name (i ["description" ], i ["subspec" ], i [ "origin" ] ) for i in dev ["inputs" ] if i ["origin" ]. startswith ( "AOD" )
105105 ]
106106 return list (dict .fromkeys (list_inputs )) # Remove duplicities
107107
@@ -115,7 +115,7 @@ def get_outputs(specs_wf: dict, device=""):
115115 if device and dev ["name" ] != device :
116116 continue
117117 list_outputs += [
118- format_table_name (i ["description" ], i ["subspec" ]) for i in dev ["outputs" ] if i ["origin" ] == "AOD"
118+ format_table_name (i ["description" ], i ["subspec" ], i [ "origin" ] ) for i in dev ["outputs" ] if i ["origin" ]. startswith ( "AOD" )
119119 ]
120120 return list (dict .fromkeys (list_outputs )) # Remove duplicities
121121
@@ -323,9 +323,11 @@ def main():
323323 for t , reverse in zip ((tables , tables_rev ), (False , True )):
324324 if t :
325325 for table in t :
326- print (f"\n Table: { table } \n " )
327326 if not table :
328327 msg_fatal ("Bad table" )
328+ if "/" not in table :
329+ table = "AOD/" + table
330+ print (f"\n Table: { table } \n " )
329331 # producers = get_table_producers(table, dic_wf_all_simple, case_sensitive)
330332 # if not producers:
331333 # print("No producers found")
0 commit comments