From 9719131969eafde10a412b2582a297358d2761b1 Mon Sep 17 00:00:00 2001 From: "ivan.kondov" <ivan.kondov@kit.edu> Date: Fri, 14 Jul 2017 16:43:13 +0200 Subject: [PATCH] adapted to template for Problem 2.1 --- docs/exercise2.rst | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/exercise2.rst b/docs/exercise2.rst index b6f0bc5..0535a1f 100644 --- a/docs/exercise2.rst +++ b/docs/exercise2.rst @@ -2,17 +2,30 @@ Exercise 2: Managing data flow ============================== The purpose of this exercise is to learn how to pass data between fireworks and -describe data dependencies using the custom firetask ``PythonFunctionTask``. +describe data dependencies using the custom firetask ``PythonFunctionTask``:: + + - _fw_name: PythonFunctionTask + function: any_module.any_function + inputs: + - first argument + - second argument + outputs: + - data to forward + +The keys specified in the ``inputs`` list must be available in the firework +``spec`` at task run time. These are passed as positional arguments to the +function. The returned outputs will be stored in the specs of the current firework +and of the child fireworks under the keys specified in the ``outputs`` list. Problem 2.1 ----------- Change to folder **exercises/work/2_data_flow**. Copy the provided template -**exercises/inputs/2_data_flow/template.json** and complete it so that the script -**exercises/problems/recruiting-script.py** is implemented as a workflow. Check -the workflow, add it to LaunchPad and run it in singleshot mode watching the -changes in the fireworks with the workflow run. +**exercises/inputs/2_data_flow/template.[json|yaml]** and complete it so that +the script **exercises/problems/recruiting-script.py** is implemented as a +workflow. Check the workflow, add it to LaunchPad and run it in singleshot mode +watching the changes in the fireworks with the workflow run. Problem 2.2 -- GitLab