From c248c9e0ad43ffc30e51d9f05f3f69762050af60 Mon Sep 17 00:00:00 2001 From: "ivan.kondov" <ivan.kondov@kit.edu> Date: Wed, 4 Dec 2019 18:12:11 +0100 Subject: [PATCH] fixed grammar and made more precise --- docs/basics.rst | 73 ++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/docs/basics.rst b/docs/basics.rst index 1664943..7c31ab4 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -41,36 +41,36 @@ specified. Further attributes are ``metadata`` and ``name``. Every Firetask includes the Firetask name ``_fw_name`` and definitions of its parameters. Firetask is *atomic* i.e. executed at once without further subdivisions. The Firetasks of one Firework are executed strictly one after -another in the order of their specification. The Firetasks of one Firework and -share the same job working directory, that is called launch directory (launchdir) -and the files in it. +another in the order of their specification. The Firetasks of one Firework share +the same job working directory, that is called launch directory (launchdir). The +files in the launchdir can be reused by subsequent FireTasks. Here is a short example for a workflow demonstrating the usage of the ``PyTask``:: - fws: - - fw_id: 1 - name: Grind coffee - spec: - _tasks: - - _fw_name: PyTask - func: auxiliary.print_func - inputs: [coffee beans] - outputs: [coffee powder] - coffee beans: best selection - - fw_id: 2 - name: Brew coffee - spec: - _tasks: - - _fw_name: PyTask - func: auxiliary.print_func - inputs: [coffee powder, water] - outputs: [pure coffee] - water: workflowing water - links: - '1': [2] - metadata: {} - name: Simple coffee workflow + fws: + - fw_id: 1 + name: Grind coffee + spec: + _tasks: + - _fw_name: PyTask + func: auxiliary.print_func + inputs: [coffee beans] + outputs: [coffee powder] + coffee beans: best selection + - fw_id: 2 + name: Brew coffee + spec: + _tasks: + - _fw_name: PyTask + func: auxiliary.print_func + inputs: [coffee powder, water] + outputs: [pure coffee] + water: workflowing water + links: + '1': [2] + metadata: {} + name: Simple coffee workflow Open a text editor, such as ``vi``, ``nano``, ``gedit`` or ``emacs``, and save the example above as **workflow.yaml**. To convert to JSON you can use the @@ -83,20 +83,23 @@ Add Fireworks to LaunchPad -------------------------- The LaunchPad is a database where the workflows are stored during their full -life cycle. It is hosted on a resource named FireServer. +life cycle. It is hosted on a resource called FireServer. **NOTE:** In tutorial settings the FireServer is sometimes on the same host on which you are logged on. When used productively the LaunchPad contains many workflows in different states. To distinguish between different workflows, the query commands can specify e.g. -the Firework ID from the relevant workflow on the LaunchPad or perform a -mongo-like queries. To avoid the need to apply filters to the queries, we will -clean up the LaunchPad from previous Fireworks at the beginning of each exercise -in this tutorial with this command:: +the Firework ID from the relevant workflow on the LaunchPad or perform ``pymongo`` +queries. To avoid the need to apply filters to the queries, we will clean up the +LaunchPad from previous Fireworks at the beginning of each exercise in this +tutorial with this command:: lpad reset +**NOTE:** Productively the *reset* command is usually not used because it deletes +all workflows, fireworks and launches on the LaunchPad. + To add a workflow to the LaunchPad:: lpad add workflow.yaml @@ -182,7 +185,7 @@ To query workflows available on the LaunchPad use the command lpad get_wflows [[-i <firework ID>]|[-q <query>]] [[-d <more|all>]|[-t]] The ID of any firework included in the workflow can be used to query a -specific workflow. Alternatively, workflows can be filtered using a pymongo +specific workflow. Alternatively, workflows can be filtered using a ``pymongo`` query after the *-q* flag. To query individual Fireworks use the command:: @@ -190,8 +193,10 @@ To query individual Fireworks use the command:: lpad get_fws [-i <firework ID>] [-d <more|all>] Adding the flag *-o yaml* after ``lpad`` will produce the output in YAML -instead of JSON. To obtain a more detailed help on a specifc lpad command you -can the online help:: +instead of JSON. + +To obtain a more detailed help on a specifc lpad command you +can use the online help:: lpad <lpad command> --help -- GitLab