Skip to content

Commit

Permalink
addressed jane's comments
Browse files Browse the repository at this point in the history
Signed-off-by: SamMarkowitz <[email protected]>
  • Loading branch information
SamMarkowitz committed Nov 30, 2015
1 parent b31c96a commit 198ab77
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 53 deletions.
36 changes: 18 additions & 18 deletions cloudslang_best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ CloudSlang Content Best Practices
=================================

- The namespace for a file matches the suffix of the file path in which
the file resides (e.g. the send\_mail operation is found in the
the file resides, for example, the send\_mail operation is found in the
**cloudslang-content/io/cloudslang/base** folder, so it uses the
namespace ``io.cloudslang.base.mail``).
namespace ``io.cloudslang.base.mail``.
- Namespaces should be comprised of only lowercase alphanumeric
characters (a-z and 0-9), underscores (_), periods(.) and hyphens
(-).
Expand All @@ -21,27 +21,27 @@ CloudSlang Content Best Practices
- Identifiers (flow names, operation names, input names, etc.) are
written:

- In snake_case, lowercase letters with underscores (_) between
words, in all cases other than inputs to a Java @Action.
- In camelCase, starting with a lowercase letter and each additional
word starting with an uppercase letter appended without a
delimiter, for inputs to a Java @Action.
- In snake_case, lowercase letters with underscores (_) between
words, in all cases other than inputs to a Java @Action.
- In camelCase, starting with a lowercase letter and each additional
word starting with an uppercase letter appended without a
delimiter, for inputs to a Java @Action.

- Flow and operation files begin with a commented description and list
of annotated inputs, outputs and results (see `CloudSlang Comments
Style Guide <#cloudslang-comments-style-guide>`__).

- Optional parameters and default values are noted.
- Optional parameters and default values are noted.

CloudSlang Tests Best Practices
===============================

- Tests are contained in a directory with a folder structure identical
to the structure of the directory they are testing.
- Tests for a particular CloudSlang file are written in a file with the
same name, but with the **.inputs.yaml** extension (e.g. the flow
same name, but with the **.inputs.yaml** extension, for example, the flow
**print\_text.sl** is tested by tests in
**print\_text.inputs.yaml**).
**print\_text.inputs.yaml**.
- Wrapper flows reside in the same folder as the tests call them.

**Note:** In future releases some of the above best practices may be
Expand Down Expand Up @@ -82,7 +82,7 @@ Description

- Written as a sentence, beginning with a capital letter and ending
with a period.
- Written in the present tense (e.g. "Prints text.").
- Written in the present tense, for example, "Prints text.".
- Does not include "This flow" or "This operation" or anything similar.

Prerequisites
Expand All @@ -103,20 +103,20 @@ Inputs, Outputs and Results
- Does not include "this flow", "this operation", "this field" or
anything similar.
- Proper names and acronyms that are normally capitalized are
capitalized (e.g. HTTP, Docker, ID).
capitalized, for example, HTTP, Docker, ID.

Inputs and Outputs
------------------

- Written in the present tense (e.g. "true if job exists").
- Written in the present tense, for example, "true if job exists".
- Non-required fields contain the "optional" label.
- Additional labels are "Default:", "Example:", "Valid:" and "Format:".

Results
-------

- Actions written in the past tense (e.g. "error occurred") and states
written in the present tense (e.g. "application is up").
- Actions written in the past tense, for example, "error occurred". States
written in the present tense, for example, "application is up".
- Results are always included, even if just listing the default results
without explanations.

Expand All @@ -128,6 +128,6 @@ Recurring Fields
meaning is specific to the flow or operation, the field description
may be different. Some examples are:

- FAILURE - otherwise
- error\_message - error message if error occurred
- command - command to execute
- FAILURE - otherwise
- error\_message - error message if error occurred
- command - command to execute
12 changes: 6 additions & 6 deletions cloudslang_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ higher is required.
3. Navigate to the folder ``cslang-cli\cslang\cslang\bin\``.
4. Run the executable:

- For Windows : ``cslang.bat``.
- For Linux : ``bash cslang``.
- For Windows : ``cslang.bat``.
- For Linux : ``bash cslang``.

Download, Build and Run CLI
===========================
Expand All @@ -39,8 +39,8 @@ higher and Maven version 3.0.3 or higher are required.
``cloudslang-cli\target\cloudslang\bin`` folder.
5. Run the executable:

- For Windows : ``cslang.bat``.
- For Linux : ``bash cslang``.
- For Windows : ``cslang.bat``.
- For Linux : ``bash cslang``.

Download and Install npm Package
================================
Expand All @@ -61,8 +61,8 @@ Docker Image
- Pull the image: ``docker pull cloudslang/cloudslang``.
- Run the CLI

- With prompt: ``docker run -it cloudslang/cloudslang``.
- Without prompt: ``docker run --rm -ti cloudslang run --f ../content/io/cloudslang/.../flow.sl --i input1=value1``
- With prompt: ``docker run -it cloudslang/cloudslang``.
- Without prompt: ``docker run --rm -ti cloudslang run --f ../content/io/cloudslang/.../flow.sl --i input1=value1``

.. _use_the_cli:

Expand Down
6 changes: 3 additions & 3 deletions cloudslang_dsl_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ signature: ``public Map<String, String> doSomething(paramaters)`` and
uses the following annotations from
``com.hp.oo.sdk.content.annotations``:

- required annotations:
- Required annotation:

- @Param: action parameter

- optional annotations:
- Optional annotations:

- @Action: specify action information
- @Output: action output
Expand Down Expand Up @@ -622,7 +622,7 @@ several ways:
- by referencing the `operation <#operation>`__ or `flow <#flow>`__ by
name when it is in the default namespace (the same namespace as the
calling `flow <#flow>`__)
- by using a fully qualified name (e.g. ``path.to.operation.op_name``)
- by using a fully qualified name, for example, ``path.to.operation.op_name``

- a path is recognized as a fully qualified name if the prefix
(before the first ``.``) is not a defined alias
Expand Down
38 changes: 19 additions & 19 deletions cloudslang_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@ extension and contain one or more test cases.
Each test case begins with a unique key that is the test case name. The
name is mapped to the following test case properties:

+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Required | Value Type | Description |
+============================+============+============================+===================================================================================================================================================================================================================================+
| ``inputs`` | no | list of key:value pairs | inputs to pass to the flow or operation being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``systemPropertiesFile`` | no | string | path to the system properties file for the flow or operation - ``${project_path}`` can be used for specifying a path relative to the project path (e.g. systemPropertiesFile: ``${project_path}\content\base\properties.yaml``) |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``description`` | no | string | description of test case |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``testFlowPath`` | yes | string | qualified name of the flow, operation or wrapper flow to test |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``testSuites`` | no | list | list of suites this test belongs to |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``outputs`` | no | list of key:value pairs | expected output values of the flow, operation or wrapper flow being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``result`` | no | flow or operation result | expected result of the flow, operation or wrapper flow being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``throwsException`` | no | boolean | whether or not to expect an exception |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Required | Value Type | Description |
+============================+============+============================+=========================================================================================================================================================================================================================================+
| ``inputs`` | no | list of key:value pairs | inputs to pass to the flow or operation being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``systemPropertiesFile`` | no | string | path to the system properties file for the flow or operation - ``${project_path}`` can be used for specifying a path relative to the project path, for example, systemPropertiesFile: ``${project_path}\content\base\properties.yaml`` |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``description`` | no | string | description of test case |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``testFlowPath`` | yes | string | qualified name of the flow, operation or wrapper flow to test |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``testSuites`` | no | list | list of suites this test belongs to |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``outputs`` | no | list of key:value pairs | expected output values of the flow, operation or wrapper flow being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``result`` | no | flow or operation result | expected result of the flow, operation or wrapper flow being tested |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``throwsException`` | no | boolean | whether or not to expect an exception |
+----------------------------+------------+----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

**Note:** The ``outputs`` parameter does not need to test all of a flow
or operation's outputs.
Expand Down
2 changes: 1 addition & 1 deletion developer_contribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ through GitHub: https://github.com/CloudSlang.
- If you want to raise an issue such as a defect, an enhancement
request or a general issue, please open a GitHub issue.

Note that all patches from all contributors get reviewed.
**Note:** All patches from all contributors get reviewed.

After a pull request is made, other contributors will offer feedback. If
the patch passes review, a maintainer will accept it with a comment.
Expand Down
2 changes: 1 addition & 1 deletion developer_overview.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Developer Overview
++++++++++++++++++

What follows is a brief overview of how CloudSlang and the CloudSlang
This section contains a brief overview of how CloudSlang and the CloudSlang
Orchestration Engine (Score) work. For more detailed information see the
:ref:`Score API <score_api>` and :ref:`Slang API <slang_api>` sections.

Expand Down
6 changes: 3 additions & 3 deletions developer_score.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ control action or navigation action method arguments:
public void doWithServices(ExecutionRuntimeServices executionRuntimeServices)
- **executionContext** - Score will populate this argument with the
context tied to the ExecutionPlan during its triggering through the
`TriggeringProperties <#triggeringproperties>`__.
context tied to the `ExecutionPlan <#executionplan>`__ during its triggering
through the `TriggeringProperties <#triggeringproperties>`__.

.. code-block:: java
Expand Down Expand Up @@ -291,7 +291,7 @@ The ``cancelExecution(Long executionId)`` method requests to cancel
(terminate) a given execution. It is passed the ID that was returned
when triggering the execution that is now to be canceled.

Note that the execution will not necessarily be stopped immediately.
**Note:** The execution will not necessarily be stopped immediately.

.. _triggering_properties:

Expand Down
2 changes: 1 addition & 1 deletion hello_world.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The output will look similar to this:
Explanation
===========

The CLI runs the :ref:`flow` in the file we have passed to it, namely
The CLI runs the :ref:`flow` contained in the file passed to it, namely
**hello\_world.sl**. The :ref:`flow` named ``hello_world`` begins its
:ref:`workflow`. The :ref:`workflow` has one :ref:`task` named ``sayHi`` which
calls the ``print`` :ref:`operation`. The :ref:`flow` passes the string
Expand Down
Binary file modified images/repo_dependencies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 198ab77

Please sign in to comment.