diff --git a/src/sirocco/workgraph.py b/src/sirocco/workgraph.py index 52b27cb..fb76faa 100644 --- a/src/sirocco/workgraph.py +++ b/src/sirocco/workgraph.py @@ -176,6 +176,7 @@ def _add_aiida_task_node(self, task: graph_items.Task): msg = f"The command is None of task {task}." raise ValueError(msg) + # TODO: Add proper resolving of code/command to installed/portable code, etc., to think about command = task.command # ? Source file @@ -187,7 +188,6 @@ def _add_aiida_task_node(self, task: graph_items.Task): # we create the task. Instead, they are being updated via the WG internals when linking inputs/outputs to # tasks argument_list = task.cli_argument.split() - # breakpoint() workgraph_task = self._workgraph.tasks.new( "ShellJob", name=label, @@ -260,8 +260,6 @@ def _link_input_to_task(self, task: graph_items.Task, input_: graph_items.Data): msg = f"Workgraph task {workgraph_task.name!r} did not initialize arguments nodes in the workgraph before linking. This is a bug in the code, please contact devevlopers." raise ValueError(msg) # TODO think about that the yaml file should have aiida valid labels - # if (arg_option := task.input_arg_options.get(input_.name, None)) is not None: - # workgraph_task_arguments.value.append(f"{arg_option}") # Avoid appending the same argument twice argument_placeholder = f"{{{input_label}}}" diff --git a/workgraph-dev.py b/workgraph-dev.py deleted file mode 100644 index 55369cd..0000000 --- a/workgraph-dev.py +++ /dev/null @@ -1,40 +0,0 @@ -#%% - -from sirocco.core import Workflow -from sirocco.parsing import load_workflow_config -from sirocco.pretty_print import PrettyPrinter -from sirocco.vizgraph import VizGraph -from sirocco.workgraph import AiidaWorkGraph -from rich.pretty import pprint - -from aiida import orm, load_profile - -load_profile() - -config_test_files = [ - # "/home/geiger_j/aiida_projects/swiss-twins/git-repos/Sirocco/tests/files/configs/test_config_small.yml", - "/home/geiger_j/aiida_projects/swiss-twins/git-repos/Sirocco/tests/files/configs/test_config_small_no_icon.yml", - # "/home/geiger_j/aiida_projects/swiss-twins/git-repos/Sirocco/tests/files/configs/test_config_large_no_icon.yml", - # "/home/geiger_j/aiida_projects/swiss-twins/git-repos/Sirocco/tests/files/configs/test_config_parameters.yml", -] -# config_path = Path(config_test_files[0]) - -for config_path in config_test_files: - loaded_workflow_config = load_workflow_config(workflow_config=config_path) - # pprint(loaded_workflow_config) - - core_workflow = Workflow.from_yaml(config_path) - # pprint(core_workflow) - # pprint(wf_from_yaml) - - test_str = PrettyPrinter().format(core_workflow) - print(test_str) - - # vizgraph = VizGraph.from_yaml(config_path) - # # print(vizgraph) - # vizgraph.draw() - - aiida_wg = AiidaWorkGraph(core_workflow=core_workflow) - aiida_wg.run() - - # # break