Skip to content
This repository has been archived by the owner on Jun 23, 2018. It is now read-only.

Commit

Permalink
Merge pull request #45 from nstack/nml-rename
Browse files Browse the repository at this point in the history
Update `workflow.nml` to `module.nml`
  • Loading branch information
rjmk committed May 10, 2017
2 parents 576a64b + 8e75cbb commit c0cc661
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Modules in NStack are versioned with a 3-digit suffix that is intended to follow
Demo:0.0.1
This is specified in the ``nstack.yaml`` for code-based modules, and in ``workflow.nml`` for workflow modules.
This is specified in the ``nstack.yaml`` for code-based modules, and in ``module.nml`` for workflow modules.
A module of a specific version is completely immutable, and it's not possible to build another copy of the module with the same version without deleting it first.

Snapshots
Expand Down
2 changes: 1 addition & 1 deletion in_depth_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Next, let's download our training data into this directory so we can use it in o
Defining our API
----------------

As we know what the input and output of our classifier is going to look like, let's edit ``workflow.nml`` to define our API (i.e. the entry-point into our module). By default, a new module contains a sample function ``numChars``, which we replace with our definition. We're going to call the function we write in Python ``predict``, which means we write our ``workflow.nml`` as follows:
As we know what the input and output of our classifier is going to look like, let's edit ``module.nml`` to define our API (i.e. the entry-point into our module). By default, a new module contains a sample function ``numChars``, which we replace with our definition. We're going to call the function we write in Python ``predict``, which means we write our ``module.nml`` as follows:

::

Expand Down
8 changes: 4 additions & 4 deletions quick_start/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ A successful ``init`` will have created some files.
.. code:: bash
~/Demo.NumChars> ls
nstack.yaml requirements.txt service.py setup.py workflow.nml
nstack.yaml requirements.txt service.py setup.py module.nml
This is the skeleton of an NStack module. ``nstack.yaml`` is the configuration file for your module, ``workflow.nml`` describes the functions and types defined in your module, and ``service.py`` is where the code of your module lives (in this case, it's a Python class). ``requirements.txt`` and ``setup.py`` are both standard files for configuring Python.
This is the skeleton of an NStack module. ``nstack.yaml`` is the configuration file for your module, ``module.nml`` describes the functions and types defined in your module, and ``service.py`` is where the code of your module lives (in this case, it's a Python class). ``requirements.txt`` and ``setup.py`` are both standard files for configuring Python.

We're going to be concerned with ``workflow.nml`` and ``service.py``. For a more in-depth look at all these files, refer to :doc:`Module Structure </reference/module_structure>`.
We're going to be concerned with ``module.nml`` and ``service.py``. For a more in-depth look at all these files, refer to :doc:`Module Structure </reference/module_structure>`.

In ``service.py``, there is a ``Service`` class. This is where we write the functions we want to use on NStack. It is pre-populated with a sample function, ``numChars``, that counts the number of characters in some text.

Expand All @@ -56,7 +56,7 @@ In ``service.py``, there is a ``Service`` class. This is where we write the func
return len(x)
``workflow.nml`` is where you tell NStack which of the functions in ``service.py`` you want to publish as functions on NStack,
``module.nml`` is where you tell NStack which of the functions in ``service.py`` you want to publish as functions on NStack,
and their input and output schemas (also known as types).

::
Expand Down
6 changes: 3 additions & 3 deletions quick_start/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Let's create a new directory called ``DemoWorkflow``, ``cd`` into the directory,
~/DemoWorkflow/ nstack init workflow
Module 'DemoWorkflow:0.0.1-SNAPSHOT' successfully initialised at /home/nstack/Demo/DemoWorkflow
``init`` has created a single file, ``workflow.nml``, which is where we write our workflow module using NStack's scripting language. If we look inside the file, we see that NStack has created an example module for us.
``init`` has created a single file, ``module.nml``, which is where we write our workflow module using NStack's scripting language. If we look inside the file, we see that NStack has created an example module for us.

.. note :: Just like Python modules, workflow modules are versioned.
Expand All @@ -55,7 +55,7 @@ Like the workflow we will create, this example workflow creates an HTTP endpoint
.. note ::
There is no need to create a separate module in order to define a
workflow. You could have included the definition of ``w`` in the
``workflow.nml`` of the original Python module ``Demo.NumChars``.
``module.nml`` of the original Python module ``Demo.NumChars``.
In that case, you would not need to prefix ``numChars`` with ``D.``,
as it is defined in the same module.
Expand All @@ -80,7 +80,7 @@ NStack uses the ``|`` operator to connect statements together, just like in a sh
Building our workflow
---------------------

Before we start our workflow, we need to build it in the cloud with NStack. We do this in the same way we build a Python module. We save our ``workflow.nml`` file and run:
Before we start our workflow, we need to build it in the cloud with NStack. We do this in the same way we build a Python module. We save our ``module.nml`` file and run:

.. code :: bash

Expand Down
2 changes: 1 addition & 1 deletion reference/module_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following files are created when you create an nstack module using:
.. _creating-structure-yaml:


workflow.nml
module.nml
------------

See :ref:`workflow_language`.
Expand Down
2 changes: 1 addition & 1 deletion reference/nstack_toolkit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ If you are creating a module in an existing programming language, such as Python
* ``service.py``, an application file (or service.js, etc.), where your business-logic lives
* an empty packages file (e.g. ``requirements.txt`` for Python, or ``package.json`` for Node, etc.).

``init`` is the command used to create a new workflow. In this case, NStack creates a skeleton ``workflow.nml`` file.
``init`` is the command used to create a new workflow. In this case, NStack creates a skeleton ``module.nml`` file.

``build``
^^^^^^^^^
Expand Down

0 comments on commit c0cc661

Please sign in to comment.