@@ -472,13 +472,15 @@ def copy_job_order(job, job_order_object):
472
472
process_run_id = None
473
473
research_obj = runtimeContext .research_obj
474
474
assert research_obj is not None
475
+ research_obj .make_fs_access = make_fs_access
475
476
if not hasattr (process , "steps" ):
476
477
# record provenance of an independent commandline tool execution
477
478
self .prospective_prov (job )
478
479
customised_job = copy_job_order (job , job_order_object )
480
+ self .used_artefacts (customised_job , self .workflow_run_uri )
479
481
inputs = research_obj .create_job (
480
- customised_job , make_fs_access )
481
- self .used_artefacts (inputs , self .workflow_run_uri )
482
+ customised_job )
483
+ # self.used_artefacts(inputs, self.workflow_run_uri)
482
484
name = ""
483
485
if hasattr (job , "name" ):
484
486
name = str (job .name )
@@ -487,9 +489,10 @@ def copy_job_order(job, job_order_object):
487
489
elif hasattr (job , "workflow" ): # record provenance for the workflow execution
488
490
self .prospective_prov (job )
489
491
customised_job = copy_job_order (job , job_order_object )
492
+ self .used_artefacts (customised_job , self .workflow_run_uri )
490
493
inputs = research_obj .create_job (
491
- customised_job , make_fs_access )
492
- self .used_artefacts (inputs , self .workflow_run_uri )
494
+ customised_job )
495
+ # self.used_artefacts(inputs, self.workflow_run_uri)
493
496
else : # in case of commandline tool execution as part of workflow
494
497
name = ""
495
498
if hasattr (job , "name" ):
@@ -1524,15 +1527,13 @@ def _add_to_bagit(self, rel_path, **checksums):
1524
1527
1525
1528
def create_job (self ,
1526
1529
job , # type: Dict
1527
- make_fs_access , # type: Callable[[Text], StdFsAccess]
1528
1530
): # type: (...) -> Dict
1529
1531
#TODO customise the file
1530
1532
'''
1531
1533
This function takes the dictionary input object and generates
1532
1534
a json file containing the relative paths and link to the associated
1533
1535
cwl document
1534
1536
'''
1535
- self .make_fs_access = make_fs_access
1536
1537
relativised_input_objecttemp = {} # type: Dict[Any,Any]
1537
1538
self ._relativise_files (job )
1538
1539
@@ -1572,8 +1573,8 @@ def _relativise_files(self, structure):
1572
1573
with fsaccess .open (structure ["location" ], "rb" ) as relative_file :
1573
1574
relative_path = self .add_data_file (relative_file )
1574
1575
ref_location = structure ["location" ]
1575
- ## FIXME: This might break something else
1576
- ## structure["location"] = "../"+relative_path
1576
+ ## FIXME: might this break something else while running wf?
1577
+ structure ["location" ] = "../" + relative_path
1577
1578
if "path" in structure :
1578
1579
del structure ["path" ]
1579
1580
if "checksum" not in structure :
0 commit comments