Skip to content

Commit

Permalink
Merge f5040f6 into 04ab438
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego committed Aug 10, 2018
2 parents 04ab438 + f5040f6 commit 8d7efdb
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 68 deletions.
20 changes: 20 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,26 @@
Changes
=======

Version 0.3.0 (2018-08-10)
--------------------------

- Adds support for
`serial workflows <http://reana-workflow-engine-serial.readthedocs.io/en/latest/>`_.
- CLI refactored to a flat design:
- ``inputs``/``outputs``/``code`` removed, everything is a file managed
with upload/download/list commands.
- Removes ``workflow`` command, workflows are managed with
``create``/``start``/``status``.
- Removes ``analyes`` command, now ``validate`` is first level command.
- ``status`` now shows the selected workflow progress and current command on
verbose mode.
- Requires the usage of an access token to talk to REANA Server.
- Fixes bug when uploading binary files.
- Supports addition of workflow engine parameters when using ``start`` for
serial workflows.
- Improves error messages.


Version 0.2.0 (2018-04-20)
--------------------------

Expand Down
5 changes: 2 additions & 3 deletions docs/developerguide.rst
Expand Up @@ -11,6 +11,5 @@ cloning it from GitHub, you can use:

.. code-block:: console
$ mkvirtualenv reana-client-latest -p /usr/bin/python2.7
$ pip install \
'git+https://github.com/reanahub/reana-client.git@master#egg=reana-client'
$ mkvirtualenv reana-client-latest
$ pip install reana-client
72 changes: 39 additions & 33 deletions docs/gettingstarted.rst
Expand Up @@ -12,25 +12,28 @@ environment:

.. code-block:: console
$ mkvirtualenv reana-client -p /usr/bin/python2.7
$ mkvirtualenv reana-client
$ pip install reana-client
Select REANA cloud
------------------

You can now select the REANA cloud instance where to run your analyses by
setting the ``REANA_SERVER_URL`` variable appropriately. For example:
setting the ``REANA_SERVER_URL`` variable appropriately and providing a valid
access token through the environment variable ``REANA_ACCESS_TOKEN``. For
example:

.. code-block:: console
$ export REANA_SERVER_URL=http://reana.cern.ch
$ export REANA_ACCESS_TOKEN=<ACCESS_TOKEN>
Note that if you are trying to run REANA cluster locally on your laptop (and not
only the client!), you can use:

.. code-block:: console
$ eval $(reana-cluster env)
$ eval $(reana-cluster env --all)
see the `REANA-Cluster getting started guide
<http://reana-cluster.readthedocs.io/en/latest/gettingstarted.html>`_.
Expand Down Expand Up @@ -59,7 +62,7 @@ We can now create a new computational workflow:

.. code-block:: console
$ reana-client workflow create
$ reana-client create
workflow.1
This created a workflow with the default name "workflow" and run number "1".
Expand All @@ -69,16 +72,16 @@ the ``-n`` argument:

.. code-block:: console
$ reana-client workflow create -n myfirstdemo
$ reana-client create -n myfirstdemo
myfirstdemo.1
We can check the status of our previously created workflow:

.. code-block:: console
$ reana-client workflow status -w workflow.1
NAME RUN_NUMBER ID USER ORGANIZATION STATUS
workflow 1 91797125-012c-498d-8a92-b4f7e3598513 00000000-0000-0000-0000-000000000000 default created
$ reana-client status -w workflow.1
NAME RUN_NUMBER CREATED STATUS PROGRESS
workflow 1 2018-08-10T07:27:15 created -/-
Note that instead of passing ``-w`` argument with the workflow name every time,
we can define a new environment variable ``REANA_WORKON`` which specifies the
Expand All @@ -92,79 +95,82 @@ Let us upload our code:

.. code-block:: console
$ reana-client code upload ./code/helloworld.py
/home/simko/private/project/reana/src/reana-demo-helloworld/code/helloworld.py was uploaded successfully.
$ reana-client upload ./code/helloworld.py
File code/helloworld.py was successfully uploaded.
and check whether it indeed appears seeded in our workspace:

.. code-block:: console
$ reana-client code list
NAME SIZE LAST-MODIFIED
helloworld.py 2905 2018-04-20 13:20:01.471120+00:00
$ reana-client list
NAME SIZE LAST-MODIFIED
code/helloworld.py 2905 2018-08-10 07:29:54.034067+00:00
Similarly, let us now upload the input data file:

.. code-block:: console
$ reana-client inputs upload ./inputs/names.txt
File /home/simko/private/project/reana/src/reana-demo-helloworld/inputs/names.txt was successfully uploaded.
$ reana-client upload ./inputs/names.txt
File inputs/names.txt was successfully uploaded.
and check whether it was well seeded into our input workspace:

.. code-block:: console
$ reana-client inputs list
NAME SIZE LAST-MODIFIED
names.txt 18 2018-04-20 13:20:28.834120+00:00
$ reana-client list
NAME SIZE LAST-MODIFIED
inputs/names.txt 18 2018-08-10 07:31:15.986705+00:00
code/helloworld.py 2905 2018-08-10 07:29:54.034067+00:00
Now that the input data and code was uploaded, we can start the workflow execution:

.. code-block:: console
$ reana-client workflow start
$ reana-client start
workflow.1 has been started.
Let us enquire about its running status; we may see that it is still in the
"running" state:

.. code-block:: console
$ reana-client workflow status
NAME RUN_NUMBER ID USER ORGANIZATION STATUS
workflow 1 91797125-012c-498d-8a92-b4f7e3598513 00000000-0000-0000-0000-000000000000 default running
$ reana-client status
NAME RUN_NUMBER CREATED STATUS PROGRESS
workflow 1 2018-08-10T07:27:15 running 0/1
After a few minutes, the workflow should be finished:

.. code-block:: console
$ reana-client workflow status
NAME RUN_NUMBER ID USER ORGANIZATION STATUS
workflow 1 91797125-012c-498d-8a92-b4f7e3598513 00000000-0000-0000-0000-000000000000 default finished
$ reana-client status
NAME RUN_NUMBER CREATED STATUS PROGRESS
workflow 1 2018-08-10T07:27:15 finished 1/1
We can now check the list of output files:

.. code-block:: console
$ reana-client outputs list
$ reana-client list
NAME SIZE LAST-MODIFIED
helloworld/greetings.txt 32 2018-04-20 13:22:38.460119+00:00
_yadage/yadage_snapshot_backend.json 590 2018-04-20 13:22:38.460119+00:00
_yadage/yadage_snapshot_workflow.json 9267 2018-04-20 13:22:38.460119+00:00
_yadage/yadage_template.json 1099 2018-04-20 13:22:38.460119+00:00
helloworld/greetings.txt 32 2018-08-10 07:33:51.885092+00:00
_yadage/yadage_snapshot_backend.json 576 2018-08-10 07:33:59.698738+00:00
_yadage/yadage_snapshot_workflow.json 9163 2018-08-10 07:33:59.698738+00:00
_yadage/yadage_template.json 1099 2018-08-10 07:32:26.684325+00:00
inputs/names.txt 18 2018-08-10 07:31:15.986705+00:00
code/helloworld.py 2905 2018-08-10 07:29:54.034067+00:00
and retrieve the resulting output file:

.. code-block:: console
$ reana-client outputs download helloworld/greetings.txt
File helloworld/greetings.txt downloaded to ./outputs/
$ reana-client download helloworld/greetings.txt
File helloworld/greetings.txt downloaded to /home/reana/reanahub/reana-demo-helloworld.
Let us see whether we got the expected output:

.. code-block:: console
$ cat outputs/helloworld/greetings.txt
$ cat helloworld/greetings.txt
Hello John Doe!
Hello Jane Doe!
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Expand Up @@ -18,5 +18,4 @@
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.

-e git+git://github.com/reanahub/reana-commons.git#egg=reana-commons
-e .[all]
29 changes: 5 additions & 24 deletions docs/userguide.rst
Expand Up @@ -10,11 +10,12 @@ REANA_SERVER_URL
~~~~~~~~~~~~~~~~

You can set this environment variable in order to specify to which REANA cloud
instance your client should connect. For example:
instance your client should connect and a valid token. For example:

.. code-block:: console
$ export REANA_SERVER_URL=http://reana.cern.ch
$ export REANA_ACCESS_TOKEN=<ACCESS_TOKEN>
REANA_WORKON
~~~~~~~~~~~~
Expand Down Expand Up @@ -42,7 +43,7 @@ You can list all your workflow runs and their statuses by doing:

.. code-block:: console
$ reana-client workflow list
$ reana-client workflows
and set ``REANA_WORKON`` to the one you would like to work on.

Expand All @@ -52,32 +53,12 @@ Usage
Please see the :ref:`gettingstarted` section for a basic ``reana-client`` use
case scenario.

Status
------

You can use the ``reana-client status`` command to see the current status of
your REANA client session. The command prints an information to which REANA
cloud is the client connected, what is the current workflow the client is
working on, and what is the workflow status:

.. code-block:: console
$ reana-client status
User: 00000000-0000-0000-0000-000000000000
REANA cluster selected: http://192.168.39.238:30380
REANA cluster status: ready
Workflow selected: workflow.2
Workflow status: finished
Examples
--------

You can get inspiration on how to structure your REANA-compatible research data
analysis from several ``reana-demo-...`` examples provided on GitHub:

- `reana-demo-helloworld <https://github.com/reanahub/reana-demo-helloworld/>`_
- `reana-demo-worldpopulation <https://github.com/reanahub/reana-demo-worldpopulation/>`_
- `reana-demo-root6-roofit <https://github.com/reanahub/reana-demo-root6-roofit/>`_
analysis from several ``reana-demo-...`` examples
`provided on GitHub <https://github.com/reanahub?utf8=%E2%9C%93&q=reana-demo&type=&language=>`_.

Commands
--------
Expand Down
2 changes: 1 addition & 1 deletion reana_client/cli/ping.py
Expand Up @@ -29,7 +29,7 @@
from reana_client.decorators import with_api_client


@click.command('ping')
@click.command('ping', help='Health check REANA Server.')
@click.pass_context
@with_api_client
def ping(ctx):
Expand Down
2 changes: 1 addition & 1 deletion reana_client/version.py
Expand Up @@ -28,4 +28,4 @@

from __future__ import absolute_import, print_function

__version__ = "0.3.0.dev20180503"
__version__ = "0.3.0"
2 changes: 0 additions & 2 deletions requirements-dev.txt
Expand Up @@ -19,5 +19,3 @@
# In applying this license, CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.

-e git+git://github.com/reanahub/reana-commons.git#egg=reana-commons
9 changes: 6 additions & 3 deletions setup.py
Expand Up @@ -68,12 +68,13 @@
'bravado>=9.0.6',
'click>=6.7',
'cwltool==1.0.20180326152342',
'yadage-schemas==0.7.16',
'pyOpenSSL==17.3.0', # FIXME remove once yadage-schemas solves deps.
'reana-commons>=0.3.0',
'rfc3987==1.3.7', # FIXME remove once yadage-schemas solves deps.
'strict-rfc3339==0.7', # FIXME remove once yadage-schemas solves deps.
'tablib>=0.12.1',
'webcolors==1.7', # FIXME remove once yadage-schemas solves deps.
'yadage-schemas==0.7.16',
]

packages = find_packages()
Expand Down Expand Up @@ -109,12 +110,14 @@
tests_require=tests_require,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Expand Down

0 comments on commit 8d7efdb

Please sign in to comment.