Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions wfcommons/wfgen/abstract_recipe.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020-2024 The WfCommons Team.
# Copyright (c) 2020-2025 The WfCommons Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -231,7 +231,6 @@ def _generate_task_files(self, task: Task) -> List[File]:
self._generate_files(task.task_id, task_recipe['input'], "input")
task.input_files = [ifile for ifile in self.tasks_input_files[task.task_id]]


return output_files_list

def _generate_files(self, task_id: str, recipe: Dict[str, Any], input_or_output: str) -> List[File]:
Expand All @@ -249,13 +248,17 @@ def _generate_files(self, task_id: str, recipe: Dict[str, Any], input_or_output:
:rtype: List[File]
"""

# Early return due to recursive behavior
if (input_or_output == "output") and (task_id not in self.tasks_output_files):
return []

files_list = []
extension_list: List[str] = []

if (input_or_output == "output") and (task_id not in self.tasks_output_files):
for extension in recipe:
if extension not in extension_list:
file = self._generate_file(extension, recipe, input_or_output)
files_list.append(file)
self.tasks_output_files[task_id] = files_list
return files_list

# Setup of references to relevant maps based in input/output
if input_or_output == "input":
task_files = self.tasks_input_files[task_id]
Expand Down