Skip to content

Commit

Permalink
changed notes to use sphinx note syntax
Browse files Browse the repository at this point in the history
Signed-off-by: SamMarkowitz <[email protected]>
  • Loading branch information
SamMarkowitz committed Mar 28, 2016
1 parent 7abb909 commit abae8ac
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 97 deletions.
8 changes: 8 additions & 0 deletions _static/css/cloudslang_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
background-color: #6DC692;
border-color: #6DC692;
}

.rst-content .note{
background-color: #6DC692;
}

.rst-content .admonition .admonition-title{
background: #69917B;
}
6 changes: 3 additions & 3 deletions cloudslang_best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CloudSlang Content Best Practices

- Assign only relevant default values. For example, 8080 is a good candidate
for a port number, but john_doe is probably not a good candidate for a user
name.
name.
- 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>`__).
Expand All @@ -53,8 +53,8 @@ CloudSlang Tests Best Practices
**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
required by the CloudSlang compiler.
.. note::
In future releases some of the above best practices may be required by the CloudSlang compiler.

CloudSlang Inputs Files Best Practices
======================================
Expand Down
24 changes: 14 additions & 10 deletions cloudslang_build_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ following arguments:
| -cov | false | whether or not test coverage data should be output |
+------------+--------------------------+-----------------------------------------------------------------------------------------------------+

**Note:** To skip tests not included in a test suite when using Linux,
the exclamation mark (``!``) needs to be escaped with a preceding
backslash (``\``). So, to ignore default tests, pass ``\!default``.

**Note:** Test coverage is calculated as a percentage of flows and
operations for which tests exist, regardless of how much of each flow or
operation is covered by the test. Additionally, a flow or operation will
be considered covered even if its test's suite did not run during the
current build. The mere existence of a test for a flow or operation is
enough to consider it as covered.
.. note::

To skip tests not included in a test suite when using Linux,
the exclamation mark (``!``) needs to be escaped with a preceding
backslash (``\``). So, to ignore default tests, pass ``\!default``.

.. note::

Test coverage is calculated as a percentage of flows and
operations for which tests exist, regardless of how much of each flow or
operation is covered by the test. Additionally, a flow or operation will
be considered covered even if its test's suite did not run during the
current build. The mere existence of a test for a flow or operation is
enough to consider it as covered.
8 changes: 5 additions & 3 deletions cloudslang_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ requires a system properties file that is not loaded automatically, use the
host: 'localhost'
port: 8080
**Note:** System property values that are non-string types (numeric, list, map,
etc.) are converted to string representations. A system property may have a
value of ``null``.
.. note::

System property values that are non-string types (numeric, list, map,
etc.) are converted to string representations. A system property may have a
value of ``null``.

An empty system properties file can be defined using an empty map.

Expand Down
8 changes: 5 additions & 3 deletions cloudslang_content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ Alternatively, you can build the CLI from source and download the content
separately. To build the CLI yourself and for more information on using the CLI,
see the :doc:`CLI <cloudslang_cli>` section.

**Note:** When using a locally built CLI you may need to include a classpath to
properly reference ready-made content. For information on using classpaths, see
:ref:`Run with Dependencies <run_with_dependencies>`.
.. note::

When using a locally built CLI you may need to include a classpath to
properly reference ready-made content. For information on using classpaths, see
:ref:`Run with Dependencies <run_with_dependencies>`.

Running Content Dependent on External Python Modules
====================================================
Expand Down
80 changes: 50 additions & 30 deletions cloudslang_dsl_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ quoted.
literal_single_quoted_string: 'cloudslang'
literal_double_quoted_string: "cloudslang"
**Note:** Where expressions are allowed as values (input defaults, output and
result values, etc.) and a literal string value is being used, you are
encouraged to use a quoted style of literal string.
.. note::

Where expressions are allowed as values (input defaults, output and
result values, etc.) and a literal string value is being used, you are
encouraged to use a quoted style of literal string.

**Example: recommended style for literal strings**

Expand Down Expand Up @@ -420,9 +422,11 @@ 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 <http://www.jython.org/>`__
implementation of Python 2.7. For information on Jython's limitations,
see the `Jython FAQ <https://wiki.python.org/jython/JythonFaq>`__.
.. note::

CloudSlang uses the `Jython <http://www.jython.org/>`__
implementation of Python 2.7. For information on Jython's limitations,
see the `Jython FAQ <https://wiki.python.org/jython/JythonFaq>`__.

**Example - action with Python script that divides two numbers**

Expand All @@ -448,9 +452,11 @@ see the `Jython FAQ <https://wiki.python.org/jython/JythonFaq>`__.
- 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.
.. 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -490,8 +496,10 @@ installation instructions.
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.
.. 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``:
Expand All @@ -511,8 +519,10 @@ installation instructions.
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.
.. 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**

Expand Down Expand Up @@ -552,8 +562,10 @@ To import a Python script in a ``python_script`` action:
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.
.. note::

If you have defined a ``JYTHONPATH`` environment variable, you
will need to add the **python-lib** folder's path to its value.

.. _aggregate:

Expand Down Expand Up @@ -1021,10 +1033,12 @@ representations.
`System properties <#properties>`__ are not enforced at compile time. They are
assigned at runtime.

**Note:** If multiple system properties files are being used and they
contain a `system property <#properties>`__ with the same fully qualified name,
the property in the file that is loaded last will overwrite the others with
the same name.
.. note::

If multiple system properties files are being used and they
contain a `system property <#properties>`__ with the same fully qualified name,
the property in the file that is loaded last will overwrite the others with
the same name.

**Example - system properties file**

Expand Down Expand Up @@ -1225,10 +1239,12 @@ For more information about choosing a file's namespace, see the
:ref:`CloudSlang Content Best Practices <cloudslang_content_best_practices>`
section.

**Note:** If the imported file resides in a folder that is different
from the folder in which the importing file resides, the imported file's
directory must be added using the ``--cp`` flag when running from the
CLI (see :ref:`Run with Dependencies <run_with_dependencies>`).
.. note::

If the imported file resides in a folder that is different
from the folder in which the importing file resides, the imported file's
directory must be added using the ``--cp`` flag when running from the
CLI (see :ref:`Run with Dependencies <run_with_dependencies>`).

.. _navigate:

Expand Down Expand Up @@ -1409,9 +1425,11 @@ underscores (_) and hyphens (-).

System property values are retrieved using the `get_sp() <#get-sp>`__ function.

**Note:** System property values that are non-string types (numeric, list, map,
etc.) are converted to string representations. A system property may have a
value of ``null``.
.. note::

System property values that are non-string types (numeric, list, map,
etc.) are converted to string representations. A system property may have a
value of ``null``.

**Example - system properties file**

Expand Down Expand Up @@ -1523,10 +1541,12 @@ The results of a `flow <#flow>`__ or `operation <#operation>`__ can be
used by the calling `task <#task>`__ for `navigation <#navigate>`__
purposes.

**Note:** The only results of an `operation <#operation>`__ or
`subflow <#flow>`__ called in an `async_loop <#async-loop>`__ that are
evaluated are ``SUCCESS`` and ``FAILURE``. Any other results will be
evaluated as ``SUCCESS``.
.. note::

The only results of an `operation <#operation>`__ or
`subflow <#flow>`__ called in an `async_loop <#async-loop>`__ that are
evaluated are ``SUCCESS`` and ``FAILURE``. Any other results will be
evaluated as ``SUCCESS``.

Flow results
~~~~~~~~~~~~
Expand Down
8 changes: 5 additions & 3 deletions cloudslang_editors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ Download, Install and Configure Atom
* From the Atom UI: **File > Settings > Install** and search for language-cloudslang
* From the command line: ``apm install language-cloudslang``

**Note:** If you are behind a proxy server you may need to configure Atom as
described in their `documentation
<https://atom.io/docs/v1.1.0/getting-started-installing-atom#setting-up-a-proxy>`__.
.. note::

If you are behind a proxy server you may need to configure Atom as
described in their `documentation
<https://atom.io/docs/v1.1.0/getting-started-installing-atom#setting-up-a-proxy>`__.

3. Reload (**View > Reload**) or restart Atom.
4. Files saved with the **.sl** extension will be recognized within Atom as
Expand Down
8 changes: 5 additions & 3 deletions cloudslang_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ the ``on_failure`` task and the flow ends with a result of ``FAILURE``.
If both divisions are successful, the ``on_failure`` task is skipped and
the flow ends with a result of ``SUCCESS``.

**Note:** To run this flow, the files from **Example 1** should be
placed in the same folder as this flow file or use the ``--cp`` flag at
the command line.
.. note::

To run this flow, the files from **Example 1** should be
placed in the same folder as this flow file or use the ``--cp`` flag at
the command line.

:download:`Download code </code/examples_code/examples/divide.zip>`

Expand Down
16 changes: 10 additions & 6 deletions cloudslang_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ Tests declare which test suites they are a part of, if any, using the
If no test suites are defined for a given test case, the test will run
unless ``!default`` is passed to the :doc:`CloudSlang Build Tool <cloudslang_build_tool>`.

**Note:** When using Linux, the exclamation mark (``!``) needs to be
escaped with a preceding backslash (``\``). So, to ignore default tests,
pass ``\!default`` to the CloudSlang Build Tool.
.. note::

When using Linux, the exclamation mark (``!``) needs to be
escaped with a preceding backslash (``\``). So, to ignore default tests,
pass ``\!default`` to the CloudSlang Build Tool.

Test Case Syntax
================
Expand Down Expand Up @@ -65,10 +67,12 @@ name is mapped to the following test case properties:
| ``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.
.. note::

The ``outputs`` parameter does not need to test all of a flow
or operation's outputs.

**Example - test cases that test the match\_regex operation**
**Example - test cases that test the match_regex operation**

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion developer_contribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,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:** All patches from all contributors get reviewed.
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
4 changes: 3 additions & 1 deletion developer_score.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ 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:** The execution will not necessarily be stopped immediately.
.. note::

The execution will not necessarily be stopped immediately.

.. _triggering_properties:

Expand Down
6 changes: 4 additions & 2 deletions tutorial/01_lesson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ Your file structure will look like this:

- new_hire.sl

**Note:** If your editor requires it for syntax highlighting, you can
also use the **.sl.yaml** and **.sl.yml** extensions.
.. note::

If your editor requires it for syntax highlighting, you can
also use the **.sl.yaml** and **.sl.yml** extensions.

Up Next
-------
Expand Down
28 changes: 17 additions & 11 deletions tutorial/02_lesson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ operation must be the same as the name of the file it is stored in.
operation:
name: print
**YAML Note:** Indentation is **very** important in YAML. It is used to
indicate scope. In the example above, you can see that
``name: print`` is indented under the ``operation`` key to denote
that it belongs to the operation. **Always** use spaces to indent.
**Never** use tabs.
.. note::

**YAML Note:** Indentation is **very** important in YAML. It is used to
indicate scope. In the example above, you can see that
``name: print`` is indented under the ``operation`` key to denote
that it belongs to the operation. **Always** use spaces to indent.
**Never** use tabs.

For more information, see :ref:`operation` in the DSL reference.

Expand All @@ -65,9 +67,11 @@ to print. We'll name our input ``text``.
inputs:
- text
**YAML Note:** The ``inputs`` key maps to a list of inputs. In YAML, a
list is signified by prepending a hypen and a space (- ) to each
item.
.. note::

**YAML Note:** The ``inputs`` key maps to a list of inputs. In YAML, a
list is signified by prepending a hypen and a space (- ) to each
item.

The values for the inputs are either passed via the :doc:`CloudSlang
CLI <../cloudslang_cli>`, as we do below in this lesson, or from a
Expand Down Expand Up @@ -98,9 +102,11 @@ value.
action:
python_script: print text
**Note:** CloudSlang uses the `Jython <http://www.jython.org/>`__
implementation of Python 2.7. For information on Jython's limitations,
see the `Jython FAQ <https://wiki.python.org/jython/JythonFaq>`__.
.. note::

CloudSlang uses the `Jython <http://www.jython.org/>`__
implementation of Python 2.7. For information on Jython's limitations,
see the `Jython FAQ <https://wiki.python.org/jython/JythonFaq>`__.

Python scripts that need 3rd party packages may import them using the
procedures described in lesson :doc:`14 - 3rd Party Python
Expand Down
8 changes: 5 additions & 3 deletions tutorial/03_lesson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ following at the prompt.
run --f <folder path>/tutorials/hiring/new_hire.sl --cp <folder path>/tutorials/base
**Note:** The --cp flag is used to add folders where the flow's
dependencies are found to the classpath. For more information, see
:ref:`Run with Dependencies <run_with_dependencies>` in the DSL reference.
.. note::

The ``--cp`` flag is used to add folders where the flow's
dependencies are found to the classpath. For more information, see
:ref:`Run with Dependencies <run_with_dependencies>` in the DSL reference.


You should see the name of the task and the string sent to the print
Expand Down
Loading

0 comments on commit abae8ac

Please sign in to comment.