From 1d95619ec743f59344365b519330a0e74a1af759 Mon Sep 17 00:00:00 2001 From: SamMarkowitz Date: Tue, 10 May 2016 16:36:09 +0300 Subject: [PATCH] updated operation heirarchy Signed-off-by: SamMarkowitz --- cloudslang_content.rst | 2 +- cloudslang_dsl_reference.rst | 414 +++++++++--------- cloudslang_examples.rst | 48 +- code/examples_code/examples/async.zip | Bin 706 -> 706 bytes .../examples/async/print_branch.sl | 4 +- code/examples_code/examples/defaultnav.zip | Bin 1227 -> 1227 bytes .../defaultnav/produce_default_navigation.sl | 4 +- .../examples/defaultnav/send_email_mock.sl | 4 +- .../examples/defaultnav/something.sl | 4 +- code/examples_code/examples/divide.zip | Bin 1294 -> 1294 bytes code/examples_code/examples/divide/divide.sl | 4 +- code/examples_code/examples/divide/print.sl | 4 +- code/examples_code/examples/hello_world.zip | Bin 482 -> 482 bytes .../examples/hello_world/print.sl | 4 +- code/examples_code/examples/loops.zip | Bin 1191 -> 1191 bytes code/examples_code/examples/loops/custom3.sl | 4 +- code/examples_code/examples/loops/fail3.sl | 4 +- code/examples_code/examples/loops/print.sl | 4 +- code/examples_code/examples/paths.zip | Bin 1522 -> 1522 bytes .../examples/paths/folder_a/op2.sl | 4 +- .../examples/paths/folder_b/folder_c/op4.sl | 4 +- .../examples/paths/folder_b/op3.sl | 4 +- code/examples_code/examples/paths/op1.sl | 4 +- .../io/cloudslang/base/mail/send_mail.sl | 9 +- code/tutorial_code/tutorials_02.zip | Bin 472 -> 472 bytes code/tutorial_code/tutorials_02/base/print.sl | 4 +- code/tutorial_code/tutorials_03.zip | Bin 743 -> 743 bytes code/tutorial_code/tutorials_03/base/print.sl | 4 +- code/tutorial_code/tutorials_04.zip | Bin 1112 -> 1112 bytes code/tutorial_code/tutorials_04/base/print.sl | 4 +- .../tutorials_04/hiring/check_availability.sl | 4 +- code/tutorial_code/tutorials_05.zip | Bin 1214 -> 1214 bytes code/tutorial_code/tutorials_05/base/print.sl | 4 +- .../tutorials_05/hiring/check_availability.sl | 4 +- code/tutorial_code/tutorials_06.zip | Bin 1264 -> 1264 bytes code/tutorial_code/tutorials_06/base/print.sl | 4 +- .../tutorials_06/hiring/check_availability.sl | 4 +- code/tutorial_code/tutorials_07.zip | Bin 1294 -> 1293 bytes code/tutorial_code/tutorials_07/base/print.sl | 4 +- .../tutorials_07/hiring/check_availability.sl | 4 +- code/tutorial_code/tutorials_08.zip | Bin 1854 -> 1854 bytes code/tutorial_code/tutorials_08/base/print.sl | 4 +- .../tutorials_08/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- code/tutorial_code/tutorials_09.zip | Bin 2279 -> 2278 bytes code/tutorial_code/tutorials_09/base/print.sl | 4 +- .../tutorials_09/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- code/tutorial_code/tutorials_10.zip | Bin 2316 -> 2316 bytes code/tutorial_code/tutorials_10/base/print.sl | 4 +- .../tutorials_10/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- code/tutorial_code/tutorials_11.zip | Bin 2947 -> 2946 bytes code/tutorial_code/tutorials_11/base/print.sl | 4 +- .../tutorials_11/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- .../tutorials_11/hiring/order.sl | 4 +- code/tutorial_code/tutorials_12.zip | Bin 3082 -> 3082 bytes code/tutorial_code/tutorials_12/base/print.sl | 4 +- .../tutorials_12/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- .../tutorials_12/hiring/order.sl | 4 +- code/tutorial_code/tutorials_13.zip | Bin 3513 -> 3513 bytes code/tutorial_code/tutorials_13/base/print.sl | 4 +- .../tutorials_13/hiring/check_availability.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- .../tutorials_13/hiring/order.sl | 4 +- code/tutorial_code/tutorials_14.zip | Bin 3905 -> 3906 bytes code/tutorial_code/tutorials_14/base/print.sl | 4 +- .../tutorials_14/hiring/check_availability.sl | 4 +- .../tutorials_14/hiring/fancy_text.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- .../tutorials_14/hiring/order.sl | 4 +- code/tutorial_code/tutorials_15.zip | Bin 4871 -> 4870 bytes code/tutorial_code/tutorials_15/base/print.sl | 4 +- .../tutorials_15/hiring/check_availability.sl | 4 +- .../tutorials_15/hiring/fancy_text.sl | 4 +- .../hiring/generate_user_email.sl | 4 +- .../tutorials_15/hiring/order.sl | 4 +- developer_cloudslang.rst | 4 +- hello_world.rst | 8 +- tutorial/02_lesson.rst | 16 +- tutorial/04_lesson.rst | 8 +- tutorial/07_lesson.rst | 4 +- tutorial/08_lesson.rst | 8 +- tutorial/11_lesson.rst | 8 +- tutorial/12_lesson.rst | 6 - tutorial/13_lesson.rst | 4 +- tutorial/14_lesson.rst | 10 +- yaml_overview.rst | 4 +- 90 files changed, 387 insertions(+), 386 deletions(-) diff --git a/cloudslang_content.rst b/cloudslang_content.rst index 8e4fcef..3a907b5 100644 --- a/cloudslang_content.rst +++ b/cloudslang_content.rst @@ -40,7 +40,7 @@ Running Content Dependent on External Python Modules ==================================================== Some of the content is dependent on external python modules. To run this content -follow the instructions found in the :ref:`python_script` section of the DSL +follow the instructions found in the :ref:`python_action` section of the DSL Reference. Contributing Content diff --git a/cloudslang_dsl_reference.rst b/cloudslang_dsl_reference.rst index 025bc44..db9b25b 100644 --- a/cloudslang_dsl_reference.rst +++ b/cloudslang_dsl_reference.rst @@ -126,7 +126,15 @@ and concepts are explained in detail below. - `default <#default>`__ - `private <#private>`__ - - `action <#action>`__ + - `python_action <#python-action>`__ + + - `script <#script>`__ + + - `java_action <#java-action>`__ + + - `class_name <#class_name>`__ + - `method_name <#method_name>`__ + - `outputs <#outputs>`__ - `results <#results>`__ @@ -292,22 +300,13 @@ context labeled as **P0** overrides the context labeled as **P1**. Keywords (A-Z) ============== -.. _action: - -action ------- - -The key ``action`` is a property of an `operation <#operation>`__. It is -mapped to a property that defines the type of action, which can be a -`java_action <#java-action>`__ or `python_script <#python-script>`__. - .. _java_action: java_action -~~~~~~~~~~~~ +----------- -The key ``java_action`` is a property of `action <#action>`__. -It is mapped to the properties ``className`` and ``methodName`` that define the +The key ``java_action`` is a property of an `operation <#operation>`__. It is +mapped to the properties ``className`` and ``methodName`` that define the class and method where an annotated Java @Action resides. **Example - CloudSlang call to a Java action** @@ -327,17 +326,16 @@ class and method where an annotated Java @Action resides. - subject - body - action: - java_action: - className: io.cloudslang.content.mail.actions.SendMailAction - methodName: execute + java_action: + className: io.cloudslang.content.mail.actions.SendMailAction + methodName: execute results: - SUCCESS: ${ returnCode == '0' } - FAILURE Existing Java Actions -^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~ There are many existing Java actions which are bundled with the :doc:`CloudSlang CLI `. The source code for these Java actions @@ -345,7 +343,7 @@ can be found in the `score-actions `__ repository. Adding a New Java Action -^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~ To add a new Java action: @@ -354,7 +352,7 @@ To add a new Java action: - `Add the Jar to the lib folder in the CLI <#add-the-jar-to-the-lib-folder-in-the-cli>`__ Write an Annotated Java Method -****************************** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Create a Java method that conforms to the signature ``public Map doSomething(paramaters)`` and use the following @@ -427,7 +425,7 @@ that matches a CloudSlang output. } Package the Method in a Jar -*************************** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use Maven to package the class containing the Java action method. Below is an example **pom.xml** file that can be used for your Maven project. @@ -466,169 +464,12 @@ example **pom.xml** file that can be used for your Maven project. Add the Jar to the lib Folder in the CLI -**************************************** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Place the Jar created by Maven in the **cslang/lib** folder and restart the CLI. You can now call the Java action from a CloudSlang operation as explained `above <#java-action>`__. -.. _python_script: - -python_script -~~~~~~~~~~~~~ - -The key ``python_script`` is a property of `action <#action>`__. -It is mapped to a value containing a Python script. - -All variables in scope at the conclusion of the Python script must be -serializable. If non-serializable variables are used, remove them from -scope by using the ``del`` keyword before the script exits. - -.. note:: - - CloudSlang uses the `Jython `__ - implementation of Python 2.7. For information on Jython's limitations, - see the `Jython FAQ `__. - -**Example - action with Python script that divides two numbers** - -.. code-block:: yaml - - name: divide - - inputs: - - dividend - - divisor - - action: - python_script: | - if divisor == '0': - quotient = 'division by zero error' - else: - quotient = float(dividend) / float(divisor) - - outputs: - - quotient - - results: - - ILLEGAL: ${quotient == 'division by zero error'} - - SUCCESS - -.. note:: - - Single-line Python scripts can be written inline with the - ``python_script`` key. Multi-line Python scripts can use the YAML pipe - (``|``) indicator as in the example above. - -Importing External Python Packages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -There are three approaches to importing and using external Python -modules: - -- Installing packages into the **python-lib** folder -- Editing the executable file -- Adding the package location to ``sys.path`` - -**Installing packages into the python-lib folder:** - -Prerequisites: Python 2.7 and pip. - -You can download Python (version 2.7) from `here `__. -Python 2.7.9 and later include pip by default. If you already have Python but -don't have pip, see the pip -`documentation `__ for -installation instructions. - -1. Edit the **requirements.txt** file in the **python-lib** folder, - which is found at the same level as the **bin** folder that contains - the CLI executable. - - - If not using a pre-built CLI, you may have to create the - **python-lib** folder and **requirements.txt** file. - -2. Enter the Python package and all its dependencies in the requirements - file. - - - See the **pip** - `documentation `__ - for information on how to format the requirements file (see - example below). - -3. Run the following command from inside the **python-lib** folder: - ``pip install -r requirements.txt -t``. - - .. note:: - - If your machine is behind a proxy you will need to specify - the proxy using pip's ``--proxy`` flag. - -4. Import the package as you normally would in Python from within the - action's ``python_script``: - -.. code-block:: yaml - - action: - python_script: | - from pyfiglet import Figlet - f = Figlet(font='slant') - print f.renderText(text) - -**Example - requirements file** - -:: - - pyfiglet == 0.7.2 - setuptools - -.. note:: - - If you have defined a ``JYTHONPATH`` environment variable, you - will need to add the **python-lib** folder's path to its value. - -**Editing the executable file** - -1. Open the executable found in the **bin** folder for editing. -2. Change the ``Dpython.path`` key's value to the desired path. -3. Import the package as you normally would in Python from within the - action's ``python_script``. - -**Adding the package location to sys.path:** - -1. In the action's Pyton script, import the ``sys`` module. -2. Use ``sys.path.append()`` to add the path to the desired module. -3. Import the module and use it. - -**Example - takes path as input parameter, adds it to sys.path and -imports desired module** - -.. code-block:: yaml - - inputs: - - path - action: - python_script: | - import sys - sys.path.append(path) - import module_to_import - print module_to_import.something() - -Importing Python Scripts -~~~~~~~~~~~~~~~~~~~~~~~~ - -To import a Python script in a ``python_script`` action: - -1. Add the Python script to the **python-lib** folder, which is found at - the same level as the **bin** folder that contains the CLI - executable. -2. Import the script as you normally would in Python from within the - action's ``python_script``. - -.. note:: - - If you have defined a ``JYTHONPATH`` environment variable, you - will need to add the **python-lib** folder's path to its value. - .. _aggregate: aggregate @@ -915,9 +756,9 @@ For a list of which contexts are available in the arguments section of a inputs: - text - punctuation: "." - action: - python_script: | - print text + punctuation + python_action: + script: | + print text + punctuation .. _extensions: @@ -1402,22 +1243,23 @@ operation The key ``operation`` is mapped to the properties which make up the operation contents. -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ -| Property | Required | Default | Value Type | Description | More Info | -+=============+==========+=============+========================+======================+==========================+ -| ``name`` | yes | -- | string | | name of the | `name <#name>`__ | -| | | | | | operation | | -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ -| ``inputs`` | no | -- | list | operation inputs | `inputs <#inputs>`__ | -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ -| ``action`` | yes | -- | | ``python_script`` or | operation logic | `action <#action>`__ | -| | | | | ``java_action`` | | | -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ -| ``outputs`` | no | -- | list | operation outputs | `outputs <#outputs>`__ | -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ -| ``results`` | no | ``SUCCESS`` | list | | possible operation | `results <#results>`__ | -| | | | | | results | | -+-------------+----------+-------------+------------------------+----------------------+--------------------------+ ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| Property | Required | Default | Value Type | Description | More Info | ++===================+==========+=============+================+======================+====================================+ +| ``name`` | yes | -- | string | | name of the | `name <#name>`__ | +| | | | | | operation | | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| ``inputs`` | no | -- | list | operation inputs | `inputs <#inputs>`__ | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| ``python_action`` | no | -- | ``script`` key | operation logic | `python_action <#python-action>`__ | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| ``java_action`` | | | map | operation logic | `java_action <#java-action>`__ | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| ``outputs`` | no | -- | list | operation outputs | `outputs <#outputs>`__ | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ +| ``results`` | no | ``SUCCESS`` | list | | possible operation | `results <#results>`__ | +| | | | | | results | | ++-------------------+----------+-------------+----------------+----------------------+------------------------------------+ **Example - operation that adds two inputs and outputs the answer** @@ -1429,8 +1271,8 @@ operation contents. - left - right - action: - python_script: ans = left + right + python_action: + script: ans = left + right outputs: - out: ${ans} @@ -1609,6 +1451,14 @@ received from finished branches, allowing for aggregation. aggregate: - name_list: ${map(lambda x:str(x['name']), branches_context)} +.. _python_action: + +python_action +------------- + +The key ``python_action`` is a property of an `operation <#operation>`__. It is +mapped to a ``script`` property that contains the actual Python script. + .. _results: results @@ -1704,6 +1554,166 @@ receive a value or declare a `default <#default>`__ value. - input2: required: false +.. _script: + +script +------ + +The key ``script`` is a property of `python_action <#python-action>`__. +It is mapped to a value containing a Python script. + +All variables in scope at the conclusion of the Python script must be +serializable. If non-serializable variables are used, remove them from +scope by using the ``del`` keyword before the script exits. + +.. note:: + + CloudSlang uses the `Jython `__ + implementation of Python 2.7. For information on Jython's limitations, + see the `Jython FAQ `__. + +**Example - action with Python script that divides two numbers** + +.. code-block:: yaml + + name: divide + + inputs: + - dividend + - divisor + + python_action: + script: | + if divisor == '0': + quotient = 'division by zero error' + else: + quotient = float(dividend) / float(divisor) + + outputs: + - quotient + + results: + - ILLEGAL: ${quotient == 'division by zero error'} + - SUCCESS + +.. note:: + + Single-line Python scripts can be written inline with the + ``script`` key. Multi-line Python scripts can use the YAML pipe + (``|``) indicator as in the example above. + +Importing External Python Packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are three approaches to importing and using external Python +modules: + +- Installing packages into the **python-lib** folder +- Editing the executable file +- Adding the package location to ``sys.path`` + +Installing Packages into the python-lib Folder +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Prerequisites: Python 2.7 and pip. + +You can download Python (version 2.7) from `here `__. +Python 2.7.9 and later include pip by default. If you already have Python but +don't have pip, see the pip +`documentation `__ for +installation instructions. + +1. Edit the **requirements.txt** file in the **python-lib** folder, + which is found at the same level as the **bin** folder that contains + the CLI executable. + + - If not using a pre-built CLI, you may have to create the + **python-lib** folder and **requirements.txt** file. + +2. Enter the Python package and all its dependencies in the requirements + file. + + - See the **pip** + `documentation `__ + for information on how to format the requirements file (see + example below). + +3. Run the following command from inside the **python-lib** folder: + ``pip install -r requirements.txt -t``. + + .. note:: + + If your machine is behind a proxy you will need to specify + the proxy using pip's ``--proxy`` flag. + +4. Import the package as you normally would in Python from within the + action's ``script``: + +.. code-block:: yaml + + python_action: + script: | + from pyfiglet import Figlet + f = Figlet(font='slant') + print f.renderText(text) + +**Example - requirements file** + +:: + + pyfiglet == 0.7.2 + setuptools + +.. note:: + + If you have defined a ``JYTHONPATH`` environment variable, you + will need to add the **python-lib** folder's path to its value. + +Editing the Executable File +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Open the executable found in the **bin** folder for editing. +2. Change the ``Dpython.path`` key's value to the desired path. +3. Import the package as you normally would in Python from within the + action's ``script``. + +Adding the Package Location to sys.path +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. In the action's Pyton script, import the ``sys`` module. +2. Use ``sys.path.append()`` to add the path to the desired module. +3. Import the module and use it. + +**Example - takes path as input parameter, adds it to sys.path and +imports desired module** + +.. code-block:: yaml + + inputs: + - path + python_action: + script: | + import sys + sys.path.append(path) + import module_to_import + print module_to_import.something() + +Importing Python Scripts +~~~~~~~~~~~~~~~~~~~~~~~~ + +To import a Python script in a ``python_action``: + +1. Add the Python script to the **python-lib** folder, which is found at + the same level as the **bin** folder that contains the CLI + executable. +2. Import the script as you normally would in Python from within the + action's ``script``. + +.. note:: + + If you have defined a ``JYTHONPATH`` environment variable, you + will need to add the **python-lib** folder's path to its value. + .. _step: step @@ -1941,8 +1951,8 @@ value associated with ``expression2``. name: operation inputs: - in1 - action: - python_script: | + python_action: + script: | out1 = 'not x' if in1 != 'x' else None outputs: - out1 diff --git a/cloudslang_examples.rst b/cloudslang_examples.rst index a465d9a..3f09632 100644 --- a/cloudslang_examples.rst +++ b/cloudslang_examples.rst @@ -84,8 +84,8 @@ user-defined result of ``ILLEGAL``. - dividend - divisor - action: - python_script: | + python_action: + script: | if divisor == '0': quotient = 'division by zero error' else: @@ -110,8 +110,8 @@ user-defined result of ``ILLEGAL``. inputs: - text - action: - python_script: print text + python_action: + script: print text results: - SUCCESS @@ -178,8 +178,8 @@ the success of its first step. inputs: - navigation_type - action: - python_script: | + python_action: + script: | print 'Default navigation based on input of - ' + navigation_type results: @@ -195,8 +195,8 @@ the success of its first step. operation: name: something - action: - python_script: | + python_action: + script: | print 'Doing something important' **Operation - send_email_mock.sl** @@ -212,8 +212,8 @@ the success of its first step. - recipient - subject - action: - python_script: | + python_action: + script: | print 'Email sent to ' + recipient + ' with subject - ' + subject Example 3 - Subflow @@ -356,8 +356,8 @@ looped on and various methods for handling loop breaks. inputs: - text - action: - python_script: print text + python_action: + script: print text results: - CUSTOM: ${int(text) == 3} @@ -375,8 +375,8 @@ looped on and various methods for handling loop breaks. inputs: - text - action: - python_script: print text + python_action: + script: print text outputs: - out: ${text} @@ -440,8 +440,8 @@ aggregation. inputs: - ID - action: - python_script: | + python_action: + script: | name = 'branch ' + str(ID) print 'Hello from ' + name @@ -520,8 +520,8 @@ This example uses the following folder structure: inputs: - text - action: - python_script: print text + python_action: + script: print text **Operation - op2.sl** @@ -535,8 +535,8 @@ This example uses the following folder structure: inputs: - text - action: - python_script: print text + python_action: + script: print text **Operation - op3.sl** @@ -550,8 +550,8 @@ This example uses the following folder structure: inputs: - text - action: - python_script: print text + python_action: + script: print text **Operation - op4.sl** @@ -565,5 +565,5 @@ This example uses the following folder structure: inputs: - text - action: - python_script: print text + python_action: + script: print text diff --git a/code/examples_code/examples/async.zip b/code/examples_code/examples/async.zip index 4b39518142c4a06f32ba629ccc565e87fb9d4be1..79f2cb69ac0e717329dc3b7576deb56c5e5b4f4f 100644 GIT binary patch delta 192 zcmX@adWdyH6eGvo+*KZx!i=hulNgoj9k~t}2)KT4yz@}MMJtG3px}C|t!t;^B?n{4 zNg`2KcHcI0oqN^b^RvH-Z*!A!*EG%D^8DbkZa-s5%_ST;i_hszn8dVzHT1y?jq>j+ zPJYp5ws>T?oHufn+wCcq=Xdg7$^2}}aMI;?0xf+NX((wlsGw`rE=?h9*peuw?lq|Uz0hq9LkCKbAdDg{35neupJuAhCHwrlC; r!%_ktIu7RFc%>7Xc&6U|%I;0?7l&Ke+g|s*Eruy6jrIvJFLLdc3=4^U)c8R?-(o(tZS4g zG`iLx*tRYB>hAMfR8AX(-V$&+^zY68>2J3>^W92duehe?b3)&i&&vPg>*U*8&Kg`? znJvwrpP~LfaB6@jV}yLsqiCsw_(^3~PEHDcY5YLOZTZ_JN>b7~ze@CN18sEna*HZ` zy}4l3r&qfpUF%Q1%>3H8|EkT0GWK~3uB~HO=-#CA{jO2LAqJr*IXp(^%c_HX_*g$a zPHxVAvcIX>NB4MYSJECgu~u7yUvY^&BB7F>_}})5uK18E*>@&!vhLeyvZWttZmxOz zOZxerZ;fsb?yk-$GTW0qTOSbs&vRFK6v;9)Zf9VaY{qD;dz$Nzfq?7x)_;d%Ibu8N z91gT*upXRxw6ybO2y?EK(MpY1`=z6|D!qGF_->BjwN9m`y*MxSLD{_?$xaZ%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z0VY8y?XxNqi<7Q*X(>!C?RKg`~z!%HzSh>1FE+sbF-9zjGElS;*2oqJc~U5MZR)r delta 263 zcmeC<>f;g$@MdNaVPIh3U~p>5^Ef`q`RPORb%@ z-iybaG&&Kr%~dG)`HTGL8D#Q&WXZ?@a^aS<_a{s)V9qvJaHXE*#qoIG yd12P8=l?zWHsy8A&L@Qua+b$Gum*TDGKnytdTTN_OBu+h$t^6-2$RmU*aHAPD|1Q! diff --git a/code/examples_code/examples/divide/divide.sl b/code/examples_code/examples/divide/divide.sl index 2b33cdd..2fe3d62 100644 --- a/code/examples_code/examples/divide/divide.sl +++ b/code/examples_code/examples/divide/divide.sl @@ -8,8 +8,8 @@ operation: - dividend - divisor - action: - python_script: | + python_action: + script: | if divisor == '0': quotient = 'division by zero error' else: diff --git a/code/examples_code/examples/divide/print.sl b/code/examples_code/examples/divide/print.sl index c9048f8..04559ed 100644 --- a/code/examples_code/examples/divide/print.sl +++ b/code/examples_code/examples/divide/print.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: print text + python_action: + script: print text results: - SUCCESS diff --git a/code/examples_code/examples/hello_world.zip b/code/examples_code/examples/hello_world.zip index da85f3545085d605deb3ec8da947562b117946ed..6192bd4a58db992c7a329823629981fedb931aa2 100644 GIT binary patch delta 45 vcmaFF{D^tNN)C>^RUR`WIi^qCSju^!KmSnn%E@xIll2+X;WCrwF}eT%tb7r+ delta 45 ucmaFF{D^tNN)D%%JdZPLHziHnSjwqUnzZ;rfBvED$@+}xaGA;T7+nC_p%fzk diff --git a/code/examples_code/examples/hello_world/print.sl b/code/examples_code/examples/hello_world/print.sl index 0b02c7f..a2673b7 100644 --- a/code/examples_code/examples/hello_world/print.sl +++ b/code/examples_code/examples/hello_world/print.sl @@ -7,8 +7,8 @@ operation: inputs: - text - action: - python_script: print text + python_action: + script: print text results: - SUCCESS diff --git a/code/examples_code/examples/loops.zip b/code/examples_code/examples/loops.zip index 27dcc7cc8afcb6dd0cc314fd0e417287340990b5..bf4bfff0af49b3de026547f2538e273dd0cc4b0e 100644 GIT binary patch delta 149 zcmZ3^xtvodz?+#xgn@y9gMlw^l}GC|rh5~GN;y9`zgNBQ^k+Te#0iERB0z~EhuSL> zPZo1A+dq*zeD&LZ-3gQ37>$@WhA!G%&DhS!Aq7;Ucx36r$z05NoKF&!uUDViue)G! gBeNC<%-qSFna$v4P5#Ji0@6KMgT)e|Ig`Z>09fWZzyJUM delta 149 zcmZ3^xtvodz?+#xgn@y9gP|(A&*PBKfyjwMrJOB4<}?1eP<_&T;siquki_gTC!2{U zi@BQL{#S00FY13dYqA@o5pz`Z)Xmk5?Tj2wEqNX%F3sYc%*C9?8T7B0q4LIwuj?i^ gGHZdggUp@0nb{0(*5r@OCLrCDHCQYWnloAK0GZJ_y8r+H diff --git a/code/examples_code/examples/loops/custom3.sl b/code/examples_code/examples/loops/custom3.sl index 191346d..21f3f88 100644 --- a/code/examples_code/examples/loops/custom3.sl +++ b/code/examples_code/examples/loops/custom3.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: print text + python_action: + script: print text results: - CUSTOM: ${int(text) == 3} diff --git a/code/examples_code/examples/loops/fail3.sl b/code/examples_code/examples/loops/fail3.sl index 4555828..34a0c9e 100644 --- a/code/examples_code/examples/loops/fail3.sl +++ b/code/examples_code/examples/loops/fail3.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: print text + python_action: + script: print text results: - FAILURE: ${int(text) == 3} diff --git a/code/examples_code/examples/loops/print.sl b/code/examples_code/examples/loops/print.sl index 07f9841..981592b 100644 --- a/code/examples_code/examples/loops/print.sl +++ b/code/examples_code/examples/loops/print.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: print text + python_action: + script: print text outputs: - out: ${text} diff --git a/code/examples_code/examples/paths.zip b/code/examples_code/examples/paths.zip index 236c7791636a5431b9868d4b3ef3897bd894f5bc..380ea08bb66103bfdcf35c505fcddc159c2f98ea 100644 GIT binary patch delta 199 zcmeyw{f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jK75OdXgTf+(icJ-In=^0l&GvIL5_S3ee%Ud--OCN$*Y25Iz-U)*6S7~C;hoaj zr&b#NeqK9NP1#D$RWbJ8xsfN*&K;&-XlZlgQ{0({$!1FFAtydHC2VR+Dp{t-=h?Zk z{q58GlUoiQiOjz~rPx2^&Ar+7PxAKK&*{6}=soq3`S*)!{AQosw(8RxMwqKP7-WI2 z{p7kgwiOsgw}4oFvM$qR7EmZoe!^tKixP~Jb(yUpQaQ|a2!C#3_GbYZGntho7yzxQ BqT2uf diff --git a/code/tutorial_code/tutorials_04/base/print.sl b/code/tutorial_code/tutorials_04/base/print.sl index a76ac19..022b555 100644 --- a/code/tutorial_code/tutorials_04/base/print.sl +++ b/code/tutorial_code/tutorials_04/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_04/hiring/check_availability.sl b/code/tutorial_code/tutorials_04/hiring/check_availability.sl index 2cffecb..6464464 100644 --- a/code/tutorial_code/tutorials_04/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_04/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_05.zip b/code/tutorial_code/tutorials_05.zip index bb33f9f9ffc995d79c259e2089d5c69897e7f70b..c23b09b11f152529cd368bc7dffa31725457b9ed 100644 GIT binary patch delta 392 zcmdnTxsQ`Cz?+#xgaHJcTJk(5^6Bu-$y?=dqab#E98j!bqPs!t$z{^<$5yxrIBIcw zH$M56+5Ga?S&iBoy;9;w6Kpg))HMy#$Ri>b2^UkGX~y1oX;%B zVW)OOGW)vM+y6}W+9J->Zxcte@roYD5}=J19vTNHb1_=zXCHD9Xno)Kr(Ljm#R4I& zy(~5z8XWU@<{d8CY~pOb`Sd#%fv@{_7y4%UA3pQD;`8J}M%(&JcU+@Ro34u2Z&+Ys zsrhi)wTugvuUT!1l6QZ!$k|XOJN>Z2wC_oL@|y)M7duT8XPGQ2ve>9}qeqdCWsd%T z=VfAQ*Q$1_&97EU{&w$=V)^U84@>Uw#dL|>zvI5qD%b4xs#BZUVb10N2UK*6^Ssx< t08(ILV36Oe%OuIj0t&y$Ud%SA0XTUwvo%EO60;q`rxGmw5YcRwU;t5znmhmi delta 392 zcmdnTxsQ`Cz?+#xgaHH$dmG&+^6Bte0O{E|e>>uUVs#VU4PsxYNyi^s;U?gy&F$Ux z0$-4t(^dj~idHO-%bhTl7|ILm$fr_WOn@)0dU7WegLPd3%+_vfe zRWEZ1r|*poK4&{|V|D(&3A?}kE3nFA*9+~sf5&~ZRj%3XRi`$y!<@~*-~n`Qbc^%6 y*T4W$U}9j9->l0d$;bicIUUFN83S)0&S#e6 zuv5DsnSI^s?SH0wZ4qbcw~3?Kctww61JK5h>}`i8b1^0}eRwuGpV2{Kp0#)OPPec1 z+zJ~0eqK9NB>79uRWbJ8xseye$F=Qo(d6@tek>p-Z&qXqX9Tk**D%|lx_rT_o{ diff --git a/code/tutorial_code/tutorials_06/base/print.sl b/code/tutorial_code/tutorials_06/base/print.sl index 1399987..9a486ee 100644 --- a/code/tutorial_code/tutorials_06/base/print.sl +++ b/code/tutorial_code/tutorials_06/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_06/hiring/check_availability.sl b/code/tutorial_code/tutorials_06/hiring/check_availability.sl index 59d1f65..d2b2789 100644 --- a/code/tutorial_code/tutorials_06/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_06/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_07.zip b/code/tutorial_code/tutorials_07.zip index f904a48b4465a5331950f55fb42091282bc7663c..756a1a32a7ceb0b412bee5edc8fd45c37d44644d 100644 GIT binary patch delta 428 zcmeC<>gAeX#k)Okl}Fom)4DhY28M=-?glX@*F88bag{^KBQ;TT!X3L@gV_C&OZj&P zK5n|Pn1A8f*Pp8PowQs&XV=FC6V|D!JM1rQLlj6b?uy+^&*!nzggL zWSVry`B(Mr|9pA4J|8QdM+vm?B98FElA3N)uPU3yPdgh!!#nUYbfsTg$ zaWOV7Y7-{iaQt`Nr+h}mjn}3Jt0x)$P55`>?>f6H_iz6y{%v|oM5nH7{=woo>HA?G z<^XwkvpmywM$|B#{FvFA87MVbk;NV>f@SV#p~3P=i&IaVPYHu14G?JcLV!FzOZj&P zK5m+EvHimB*Tu1MPv!*s-K_}lxIRgE!T((c+A?G~I&SgU^HwNS>~FYb%lNH#ZT45Q zBaeQa|HeK+YT^SWPLM4>b)NWLp3Kc?THo)Oeb|7f^?lBIzuPtgOM~^R4_OCg!*=Dm} zwaBKJXOax=`&h1KmS%nEN%_#ub23$hvE#17Lq?`OjN8^;S5)D@`kA9)w@3O;&Qp^o z3*~tx^s-l_?`?3;%eC)*%yv~J@0g>`=_KCwt0gTLJ5A$ka%DaGX3vfY7c~Xdjm>}h zXI9OKc=L7Efoi4XUkCpve&78opg#Zg`M1|kEKB%!vzBdM*}T6@0p83kBETTzV3?cK zvssR5J0ohyPJYB}J$Wj#z+_z(Bc#yCVDV!HYM8u}MVd*7X>vV_*yJ}X(rjJKK%*D{ Dm9)H7 diff --git a/code/tutorial_code/tutorials_07/base/print.sl b/code/tutorial_code/tutorials_07/base/print.sl index 57dc786..c1ed932 100644 --- a/code/tutorial_code/tutorials_07/base/print.sl +++ b/code/tutorial_code/tutorials_07/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_07/hiring/check_availability.sl b/code/tutorial_code/tutorials_07/hiring/check_availability.sl index 37197d5..4acf203 100644 --- a/code/tutorial_code/tutorials_07/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_07/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_08.zip b/code/tutorial_code/tutorials_08.zip index 4f7926ffeb8d98eb45d07c8ac3fc1dc5fac1e0f8..b7bd41ccef99412b03e19ec584012975db379385 100644 GIT binary patch delta 788 zcmV+v1MB?04!#bMIuXNesz`7u3B_Ij004jh000`3%>^BiXb)V;viLGaHG&9ISy&1r zw@({P*KbDY!*0~LAol1(X!E+fo^Nu_DW`5cD5Pu23D9p{U_&&12#DGqejD&W@G-&8 zSi4qg{}=E!#A5!ly#P>40|XQR00000u~njx(=Q0hZmLLdHF@8Y3IR5M&%tWLFboFZ zdm!(ivK?CJO4w-xa>!tZLFui%2F)>zs3RL&DU`PFKBrE~b~2JaP@bHWa7$%vT+ln~1w3+V`?)z*P)*Iv_z=soSi}2jCTCR0G9g%0P|TAT z7Y~sMq$GBb|1r}YCLZ>BP4J#%Oh1@Ea=)t&_4l^^+ z!6(O_L`rCGw?Lc5d4;CRL zqNkyk(#BZRyxQ5lDcsFx)>0^(eYVGKL-$8NEj|75;put#G9M7bBM`EUgvD|;n=ck= z@(oZ+0|b-d1{$-*1Ly$_!)~fba4HGKUH||9fRnogI|H#*qLcXrKM2Zhsz`7(dEb*j S22TjkZmLKSyXdBqmjg83VkTSww*5GcZ&|_f5R4&jGUd-*>O`lerkp>iZqD4;%2bzHj`) zKK1Pdr|?65$`hQ~ta-fh-wdN`?{3l zr1MuBrU!bLBJ-L)Jz3Hc9hCdH@m{3^Jbp!- zlV^&dKI^H#An zCO4nt?GcMQ5jty$=h^^c?JUpBEDlxk4soS&Bt7GK#iOlus)31PD&PM0u3FLYv~=l=J3W8P zuP}Rc^Y5?DkKFCo7TG;@Q!oFt@;=*r8(&AIsaOJua}5f8w!}D+h|=|32gY8hZaw?0)4d`Hh}- zdn_$xGASPaCL{9i`qG2Vz8swwFBeR|bS$R0a_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d0l@EZ6(5_+hGp#7Rlh^vt8~R+%NsO z^!U@`^ULaWF#y9QFt(4tay6eXmdiBx2D20e>;VlzglCb2ttHzNKG%E4U>`wr3qSFl}LQEcq2oTKnQID6$O#u7L&yY8wRxo00000>%n0$ diff --git a/code/tutorial_code/tutorials_09/base/print.sl b/code/tutorial_code/tutorials_09/base/print.sl index b6c8663..ce5fa8e 100644 --- a/code/tutorial_code/tutorials_09/base/print.sl +++ b/code/tutorial_code/tutorials_09/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_09/hiring/check_availability.sl b/code/tutorial_code/tutorials_09/hiring/check_availability.sl index 4bf899f..dc4b651 100644 --- a/code/tutorial_code/tutorials_09/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_09/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_09/hiring/generate_user_email.sl b/code/tutorial_code/tutorials_09/hiring/generate_user_email.sl index 09ef6dc..f874157 100644 --- a/code/tutorial_code/tutorials_09/hiring/generate_user_email.sl +++ b/code/tutorial_code/tutorials_09/hiring/generate_user_email.sl @@ -13,8 +13,8 @@ operation: private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/code/tutorial_code/tutorials_10.zip b/code/tutorial_code/tutorials_10.zip index b00fa72689ea2314bd88a90e72ce12ea5e51a081..cf3ccaa16e3a0b5bdb7d434e710ded02dab45754 100644 GIT binary patch delta 756 zcmV{{_4a zv6%mCFHlPZ1QY-O00027Rics7F9-l{sz^iGz%7#r0XBcn!D_=W39Mgz8vayvyY5VST>ZEKZBk4o_#n|iMQ0Wq65bFs|Xx@uWN1phY zXL)9w_9$ez%rgLvz68~2b!za8WblU!$z_xP#BPxAfBRiY344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IfocQ!~QDnre2vFHl(_>Q((<*u;Oc-QY})GA=+tE21o?;^uHF^{ zFkAv-`v@#o^Z8=AOp_l_O9KRxuLv5E;}nzY2n(}O1=Rr!LWFKe$Bz$aT>t<8ev>l? mI|F)Kj+1c*KL|pEZb;1=^F5Qe2c-yFTa`$>a%Q%ZWeBG{Mq@Jo diff --git a/code/tutorial_code/tutorials_10/base/print.sl b/code/tutorial_code/tutorials_10/base/print.sl index f02fe63..6a2a47f 100644 --- a/code/tutorial_code/tutorials_10/base/print.sl +++ b/code/tutorial_code/tutorials_10/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_10/hiring/check_availability.sl b/code/tutorial_code/tutorials_10/hiring/check_availability.sl index 5a3da78..e9f55e5 100644 --- a/code/tutorial_code/tutorials_10/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_10/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_10/hiring/generate_user_email.sl b/code/tutorial_code/tutorials_10/hiring/generate_user_email.sl index b24445e..dbbc672 100644 --- a/code/tutorial_code/tutorials_10/hiring/generate_user_email.sl +++ b/code/tutorial_code/tutorials_10/hiring/generate_user_email.sl @@ -13,8 +13,8 @@ operation: private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/code/tutorial_code/tutorials_11.zip b/code/tutorial_code/tutorials_11.zip index ff285d8b978acac9ed790103aaa65caa843b8bec..3acd341c5157f0c94e0d77157b8654f1432e4134 100644 GIT binary patch delta 1027 zcmZn`ZxWwi#mkew%0s^B$$?k~28M=-?#lJvT!#&KTrciCSY09Qp%9#ZOv5d}QJLGj zt>pXP1S`AmTCs23dbyL_n=sC3$QI` zWO;hhlkxw`9`300y$$Z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cI#N;>B$WIj3N|98Uu_n>b zDpG^Gc?&VdPv38%&Q~t1FGau6= zMvjf4i#(L=bUG)mVE$3Bwn>kP{r<&mL3h&JvabKP=Ge+JW4BDkop)*vL)KLvkXgp8 zu5_L^>UBkJ!u#@|w_AO-f!M0)@AO1l7eD*7YF6K|PX-(IwEp;+IsG@=yJ>mrs(y%He*F3L z?bk&NUnC8-@i$z(owPA#?V}g$o6T55nFXt&`#cs~RNwjwjQfv_3=A?8ABs=@&%-f! zH-|3Um6Ch?-|tO+$6;KbFW5$18vgXHYHEuuIF-7Yg z>zUs#<|YJ4b2{m)di5r3?t)`mkDua>^pk$~=8gx?_d?tM){hrm>C9&9s-3)mQ;9h{ zbkXFaoW@}KH|Hl_l(akf7gsGJWz};pMMQ!Q&s+|eKPO-0aRM74#_J5GV|Zf$GF5Go diff --git a/code/tutorial_code/tutorials_13/base/print.sl b/code/tutorial_code/tutorials_13/base/print.sl index 6d27056..e8cc0cd 100644 --- a/code/tutorial_code/tutorials_13/base/print.sl +++ b/code/tutorial_code/tutorials_13/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_13/hiring/check_availability.sl b/code/tutorial_code/tutorials_13/hiring/check_availability.sl index fab6da5..865f3cf 100644 --- a/code/tutorial_code/tutorials_13/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_13/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_13/hiring/generate_user_email.sl b/code/tutorial_code/tutorials_13/hiring/generate_user_email.sl index bcb2d7a..d27d1c7 100644 --- a/code/tutorial_code/tutorials_13/hiring/generate_user_email.sl +++ b/code/tutorial_code/tutorials_13/hiring/generate_user_email.sl @@ -13,8 +13,8 @@ operation: private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/code/tutorial_code/tutorials_13/hiring/order.sl b/code/tutorial_code/tutorials_13/hiring/order.sl index 3882cd2..69de571 100644 --- a/code/tutorial_code/tutorials_13/hiring/order.sl +++ b/code/tutorial_code/tutorials_13/hiring/order.sl @@ -7,8 +7,8 @@ operation: - item - price - action: - python_script: | + python_action: + script: | print 'Ordering: ' + item import random rand = random.randint(0, 2) diff --git a/code/tutorial_code/tutorials_14.zip b/code/tutorial_code/tutorials_14.zip index 89e645c03413c497491c3fc89176cbd9f160a0a7..c8b23aaf293e6caa78a43626dfbf8ccbbd84e4f3 100644 GIT binary patch delta 1012 zcmX>ocSvr66>n7jDi2@F4=dvs7#JERx*PZ_UYM$%9HQKzFtv55L(%Uo2TT5@O|g69 z*2|sLZ`WeB{`BjgYR~5sy*k$Hv}@WNhQHTX&0HS0H>`O3a62PEi@flgo~_wSztuD5 zJL^2Nzs)`Im<>lF&<@`1g%c)oF`Ct%KiGB1K!EK*^}_cCkK|%*h=$vU+LRnT+*A?0 zKGmmL)@*J|idM(3ce7`OeGy4}mi&o7d3Ce%QtkwjAYq^;;pI^V*3$4{p|s`7l~D$9Vmtrky~iPjqAuH1WK<~)}RVqXqT7g>4k z`;~X%tKItzUhZ!@y?@gW#sF_-77<_saxmlq9kN?e-8Yhvoq@rRnSnuT;zRMtS6Ob> z?_KJ<)M#G0C&P_99&dluvoD;+Xgr;{_x4?tIj2JTXB;ef(88T~A?o;R=IZ^P%jF9= zbrRp*UHVX)f8V7YTv8D-tM30>c#l&)v!dybY=LT9IcK_Y!ka70m><>WM%mnI*%)A3 zUcOR8#&ml4)e?hgzZ=g+bm)V4O}@#c#QZX5>EwT0#$ein`x9#ZnQY8ci%9J| zc$Oj(Mk=p6Cp>Z{Z{^Kpa$%cX$R`H$w75LXzkh*o_>qx;K?X>J03(9}kla1FfKMB2 z;XFQRrcYdx8TqBO1H2iTL>M5E4s?^p${b6UT%h80K&%18AOO*>F^S)r?KU?^004eM BwYdNQ delta 1010 zcmX>kcTjGE6|Zwko=0)dm#8=f28Ozc?gst~CQQ{&4pHt{Ftt_Hx$3u>V#?pNDRyt% zdbyL_ zXYA(V&w`scZNHWQl~=$=FJf)@XhkK zxnT90)ut%-cHkTH2>wTV*BX!LTW?8rnaLmd}4K!m?uoS;TM;@OioR# zdbi4lX(wjvGxmS-e%+nv_P0M(?|ykxM8|G-?}5Xc`Isg%f_?Z;?cvhNE14si&P<-n z!eUZCKk-+oa7X!G)^|brc3I8u+qo<_lg;Mt=L>syT*Bq!HXrS#%j<)79;jMmA`!MK zyq<50WY*#v#)-_^g-_29yH`9di!UTyk#A?FtGrKimVVJPb-^vHdq1eUuKH}Z_4m^& zi`{2@i9h@_KJpJkfHyOX2rvRU7&eA3@`#Sv*B!yg&cNWu%)p>E@uB$St1LI`=amau z{Fr7o^;AyYlCr=1n*&Za%skzA>}{Tq-_up>XA-Om4z(I&tbP2oaqs;lm-%;?D3f~th_pWSM&b|yl?3@v2pyzw?pXg?v~Ax24z{789(kf)0N9T6tQC7?%g3G zeX~xl&a#p?{r5nc?veBUyYHA5Y%eLkdU(E+-2C`^apKGi&Npm~Wzf0*?DNqgNq2jY z%P0Tmm74fOWU@6M_vS`67iNyC=su6-rsi>z&vJ&bUaqviS3OyS%ea1Tt-&ldua`F& zKg8D*Z0od=I4@*>SY+mQo{y8x2JdJ&aP^QuYUw>zw}7(u&l3L~PLo;pNquKb$n_n& z=LmdV>9hJ?l$7P1+yLK2rFUe$FU*A-l$f(a7ft@pWelcGxj&(1pUEaXwTQ&NlV>R+ zU8M24bHd|h@;2UFCTF(E7kR{ho)(vf`S&j{3O_P3FvtLD5MX3b0Ft{V7xHO?Eu7CM x&GeCLG9R~$CL@yw10=?QF7jBJW66>WRJsm`HGmidAez-DGxA%r-Qos`0073btpxx8 diff --git a/code/tutorial_code/tutorials_14/base/print.sl b/code/tutorial_code/tutorials_14/base/print.sl index c22e6de..115d919 100644 --- a/code/tutorial_code/tutorials_14/base/print.sl +++ b/code/tutorial_code/tutorials_14/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_14/hiring/check_availability.sl b/code/tutorial_code/tutorials_14/hiring/check_availability.sl index 1d6fcb4..d679765 100644 --- a/code/tutorial_code/tutorials_14/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_14/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_14/hiring/fancy_text.sl b/code/tutorial_code/tutorials_14/hiring/fancy_text.sl index d5c427b..14781c0 100644 --- a/code/tutorial_code/tutorials_14/hiring/fancy_text.sl +++ b/code/tutorial_code/tutorials_14/hiring/fancy_text.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: | + python_action: + script: | from pyfiglet import Figlet f = Figlet(font='slant') fancy = '
' + f.renderText(text).replace('\n','
').replace(' ', ' ') + '
' diff --git a/code/tutorial_code/tutorials_14/hiring/generate_user_email.sl b/code/tutorial_code/tutorials_14/hiring/generate_user_email.sl index 4d9cce0..eca4778 100644 --- a/code/tutorial_code/tutorials_14/hiring/generate_user_email.sl +++ b/code/tutorial_code/tutorials_14/hiring/generate_user_email.sl @@ -13,8 +13,8 @@ operation: private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/code/tutorial_code/tutorials_14/hiring/order.sl b/code/tutorial_code/tutorials_14/hiring/order.sl index 476356c..001ec80 100644 --- a/code/tutorial_code/tutorials_14/hiring/order.sl +++ b/code/tutorial_code/tutorials_14/hiring/order.sl @@ -7,8 +7,8 @@ operation: - item - price - action: - python_script: | + python_action: + script: | print 'Ordering: ' + item import random rand = random.randint(0, 2) diff --git a/code/tutorial_code/tutorials_15.zip b/code/tutorial_code/tutorials_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sl index ff484ed..9d7b1f1 100644 --- a/code/tutorial_code/tutorials_15/base/print.sl +++ b/code/tutorial_code/tutorials_15/base/print.sl @@ -6,5 +6,5 @@ operation: inputs: - text - action: - python_script: print text \ No newline at end of file + python_action: + script: print text diff --git a/code/tutorial_code/tutorials_15/hiring/check_availability.sl b/code/tutorial_code/tutorials_15/hiring/check_availability.sl index 5a3e40a..e1f474f 100644 --- a/code/tutorial_code/tutorials_15/hiring/check_availability.sl +++ b/code/tutorial_code/tutorials_15/hiring/check_availability.sl @@ -6,8 +6,8 @@ operation: inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/code/tutorial_code/tutorials_15/hiring/fancy_text.sl b/code/tutorial_code/tutorials_15/hiring/fancy_text.sl index 374e80d..ccca142 100644 --- a/code/tutorial_code/tutorials_15/hiring/fancy_text.sl +++ b/code/tutorial_code/tutorials_15/hiring/fancy_text.sl @@ -6,8 +6,8 @@ operation: inputs: - text - action: - python_script: | + python_action: + script: | from pyfiglet import Figlet f = Figlet(font='slant') fancy = '
' + f.renderText(text).replace('\n','
').replace(' ', ' ') + '
' diff --git a/code/tutorial_code/tutorials_15/hiring/generate_user_email.sl b/code/tutorial_code/tutorials_15/hiring/generate_user_email.sl index a31b22e..d25e0b9 100644 --- a/code/tutorial_code/tutorials_15/hiring/generate_user_email.sl +++ b/code/tutorial_code/tutorials_15/hiring/generate_user_email.sl @@ -13,8 +13,8 @@ operation: private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/code/tutorial_code/tutorials_15/hiring/order.sl b/code/tutorial_code/tutorials_15/hiring/order.sl index 782c83d..2cd5e11 100644 --- a/code/tutorial_code/tutorials_15/hiring/order.sl +++ b/code/tutorial_code/tutorials_15/hiring/order.sl @@ -7,8 +7,8 @@ operation: - item - price - action: - python_script: | + python_action: + script: | print 'Ordering: ' + item import random rand = random.randint(0, 2) diff --git a/developer_cloudslang.rst b/developer_cloudslang.rst index 3900e78..fe88c2f 100644 --- a/developer_cloudslang.rst +++ b/developer_cloudslang.rst @@ -176,8 +176,8 @@ Code inputs: - text - action: - python_script: print text + python_action: + script: print text results: - SUCCESS diff --git a/hello_world.rst b/hello_world.rst index 53ca3be..55be2fc 100644 --- a/hello_world.rst +++ b/hello_world.rst @@ -66,8 +66,8 @@ Copy the code below into the corresponding files. inputs: - text - action: - python_script: print text + python_action: + script: print text results: - SUCCESS @@ -109,8 +109,8 @@ The :ref:`flow` named ``hello_world`` begins its :ref:`workflow`. The :ref:`workflow` has one :ref:`step` named ``sayHi`` which calls the ``print`` :ref:`operation`. The :ref:`flow` passes the string ``"Hello, World"`` to the ``text`` :ref:`input ` of the ``print`` -:ref:`operation`. The print :ref:`operation` performs its :ref:`action`, which -is a simple Python script that prints the :ref:`input `, and then +:ref:`operation`. The print :ref:`operation` performs its :ref:`python_action`, +which is a simple Python script that prints the :ref:`input `, and then returns a :ref:`result ` of ``SUCCESS``. Since the flow does not contain any more :ref:`steps ` the :ref:`flow` finishes with a :ref:`result ` of ``SUCCESS``. diff --git a/tutorial/02_lesson.rst b/tutorial/02_lesson.rst index 6e33bcd..95536ed 100644 --- a/tutorial/02_lesson.rst +++ b/tutorial/02_lesson.rst @@ -92,15 +92,13 @@ two types of actions in CloudSlang, Python-based actions and Java-based actions. We'll start off by creating a Python action that simply prints the text -that was input. To do so, we add an ``action`` key that maps to the -action contents. Since our action is a python script we add a key:value -pair with ``python_script`` as the key and the script itself as the -value. +that was input. To do so, we add ``python_action`` and ``script`` keys that map +to the action contents. .. code-block:: yaml - action: - python_script: print text + python_action: + script: print text .. note:: @@ -112,7 +110,7 @@ Python scripts that need 3rd party packages may import them using the procedures described in lesson :doc:`14 - 3rd Party Python Packages <14_lesson>`. -For more information, see :ref:`action` in the DSL reference. +For more information, see :ref:`python_action` in the DSL reference. The usage of Java-based actions is beyond the scope of this tutorial. For more information, see the :ref:`java_action` in the DSL reference. @@ -162,5 +160,5 @@ New Code - Complete inputs: - text - action: - python_script: print text + python_action: + script: print text diff --git a/tutorial/04_lesson.rst b/tutorial/04_lesson.rst index a5f2aef..a7d915d 100644 --- a/tutorial/04_lesson.rst +++ b/tutorial/04_lesson.rst @@ -43,8 +43,8 @@ during testing to see that our operation is working as expected. .. code-block:: yaml - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 @@ -151,8 +151,8 @@ New Code - Complete inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/tutorial/07_lesson.rst b/tutorial/07_lesson.rst index 63856ac..72cc71c 100644 --- a/tutorial/07_lesson.rst +++ b/tutorial/07_lesson.rst @@ -133,8 +133,8 @@ New Code - Complete inputs: - address - action: - python_script: | + python_action: + script: | import random rand = random.randint(0, 2) vacant = rand != 0 diff --git a/tutorial/08_lesson.rst b/tutorial/08_lesson.rst index 65479ae..2e32193 100644 --- a/tutorial/08_lesson.rst +++ b/tutorial/08_lesson.rst @@ -35,8 +35,8 @@ it as a starting point for a discussion on input properties. - domain - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain @@ -357,8 +357,8 @@ New Code - Complete private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/tutorial/11_lesson.rst b/tutorial/11_lesson.rst index b2ea6d4..e0bf4ca 100644 --- a/tutorial/11_lesson.rst +++ b/tutorial/11_lesson.rst @@ -39,8 +39,8 @@ output. - item - price - action: - python_script: | + python_action: + script: | print 'Ordering: ' + item import random rand = random.randint(0, 2) @@ -280,8 +280,8 @@ New Code - Complete - item - price - action: - python_script: | + python_action: + script: | print 'Ordering: ' + item import random rand = random.randint(0, 2) diff --git a/tutorial/12_lesson.rst b/tutorial/12_lesson.rst index d0408fe..6098440 100644 --- a/tutorial/12_lesson.rst +++ b/tutorial/12_lesson.rst @@ -85,12 +85,6 @@ content folder or by running ``inspect`` on the flow. When calling the operation, we'll need to pass values for all the arguments listed in the documentation that are not optional. -You might have noticed that operation and flow inputs are generally -named using snake_case. This is in keeping with Python conventions, -especially when using an operation that has a ``python_script`` type -action. The ``send_mail`` operation though, uses a ``java_action`` so -its inputs follow the Java camelCase convention. - Imports ------- diff --git a/tutorial/13_lesson.rst b/tutorial/13_lesson.rst index 895933e..94bb66f 100644 --- a/tutorial/13_lesson.rst +++ b/tutorial/13_lesson.rst @@ -254,8 +254,8 @@ New Code - Complete private: true - attempt - action: - python_script: | + python_action: + script: | attempt = int(attempt) if attempt == 1: address = first_name[0:1] + '.' + last_name + '@' + domain diff --git a/tutorial/14_lesson.rst b/tutorial/14_lesson.rst index 0e90070..11377bc 100644 --- a/tutorial/14_lesson.rst +++ b/tutorial/14_lesson.rst @@ -5,7 +5,7 @@ Goal ---- In this lesson we'll learn how to import 3rd party Python packages to -use in an operation's ``python_script`` action. +use in an operation's ``python_action``. Get Started ----------- @@ -106,8 +106,8 @@ email. inputs: - text - action: - python_script: | + python_action: + script: | from pyfiglet import Figlet f = Figlet(font='slant') fancy = '
' + f.renderText(text).replace('\n','
').replace(' ', ' ') + '
' @@ -301,8 +301,8 @@ New Code - Complete inputs: - text - action: - python_script: | + python_action: + script: | from pyfiglet import Figlet f = Figlet(font='slant') fancy = '
' + f.renderText(text).replace('\n','
').replace(' ', ' ') + '
' diff --git a/yaml_overview.rst b/yaml_overview.rst index 026336a..91c1db5 100644 --- a/yaml_overview.rst +++ b/yaml_overview.rst @@ -187,8 +187,8 @@ Python script** .. code:: yaml - action: - python_script: | + python_action: + script: | if divisor == '0': quotient = 'division by zero error' else: