Skip to content

Commit

Permalink
fix a few bugs in new wrapper creator due to refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Sep 17, 2024
1 parent e2f5751 commit be06d78
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bfabric/wrapper_creator/bfabric_wrapper_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def get_application_section(self, output_resource: Resource) -> dict[str, Any]:
output_url = f"bfabric@{self._application.storage.data_dict['host']}:{self._application.storage.data_dict['basepath']}{output_resource.data_dict['relativepath']}"
inputs = defaultdict(list)
for resource in Resource.find_all(self.workunit_definition.execution.resources, client=self._client).values():
inputs[resource.application.name].append(f"bfabric@{resource.storage.scp_address}")
inputs[resource.workunit.application["name"]].append(
f"bfabric@{resource.storage.scp_prefix}{resource.data_dict['relativepath']}"
)
return {
"parameters": self.workunit_definition.execution.raw_parameters,
"protocol": "scp",
Expand All @@ -104,15 +106,15 @@ def get_job_configuration_section(
inputs = defaultdict(list)
for resource in Resource.find_all(self.workunit_definition.execution.resources, client=self._client).values():
web_url = Resource({"id": resource.id}, client=self._client).web_url
inputs[resource.storage.name].append({"resource_id": resource.id, "resource_url": web_url})
inputs[resource.workunit.application["name"]].append({"resource_id": resource.id, "resource_url": web_url})

return {
"executable": str(self.workunit_definition.execution.executable),
"external_job_id": self._external_job_id,
"fastasequence": self._fasta_sequence,
"input": dict(inputs),
"inputdataset": None,
"order_id": self._order.id,
"order_id": self._order.id if self._order is not None else None,
"project_id": self._project.id,
"output": {
"protocol": "scp",
Expand Down

0 comments on commit be06d78

Please sign in to comment.