@@ -386,6 +386,8 @@ def generate_workflow_experiment_records(
386386 jupyter_notebook_url = jupyter_notebook_url ,
387387 themes = osc_themes ,
388388 )
389+ if mode == "all" :
390+ link_builder .build_child_link_to_related_experiment ()
389391 # Convert to dictionary and cleanup
390392 workflow_dict = workflow_record .to_dict ()
391393 if "jupyter_notebook_url" in workflow_dict :
@@ -400,6 +402,13 @@ def generate_workflow_experiment_records(
400402 exp_record_properties .type = "experiment"
401403 exp_record_properties .osc_workflow = workflow_id
402404
405+ # Update base catalogs of workflows with links
406+ file_dict ["workflows/catalog.json" ] = self ._update_base_catalog (
407+ catalog_path = "workflows/catalog.json" ,
408+ item_id = workflow_id ,
409+ self_href = WORKFLOW_BASE_CATALOG_SELF_HREF ,
410+ )
411+
403412 if mode in ["all" ]:
404413 if not getattr (self , "collection_id" , None ):
405414 raise ValueError (
@@ -430,18 +439,13 @@ def generate_workflow_experiment_records(
430439 exp_file_path = f"experiments/{ workflow_id } /record.json"
431440 file_dict [exp_file_path ] = experiment_dict
432441
433- # Update base catalogs of experiments and workflows with links
442+ # Update base catalogs of experiments with links
434443 file_dict ["experiments/catalog.json" ] = self ._update_base_catalog (
435444 catalog_path = "experiments/catalog.json" ,
436445 item_id = workflow_id ,
437446 self_href = EXPERIMENT_BASE_CATALOG_SELF_HREF ,
438447 )
439448
440- file_dict ["workflows/catalog.json" ] = self ._update_base_catalog (
441- catalog_path = "workflows/catalog.json" ,
442- item_id = workflow_id ,
443- self_href = WORKFLOW_BASE_CATALOG_SELF_HREF ,
444- )
445449 # Write to files if testing
446450 if write_to_file :
447451 for file_path , data in file_dict .items ():
0 commit comments