Commit 1eb1f01c authored by Zohreh MOSTAANI's avatar Zohreh MOSTAANI

[cmdline][doc] modification in introduction and configuration and other minor documentation

parent 2580eac2
......@@ -27,24 +27,22 @@ Configuration
-------------
The ``beat`` command-line utility can operate independently of any initial
configuration. By runnig for example the following command:
configuration. By runig for example the following command:
.. code-block:: sh
$ beat dataformats list --remote
By default, the ``beat`` application is pre-configured to access the `main BEAT
By default, ``beat`` is pre-configured to access the `main BEAT
website`_ anonymously, but it can be configured to use secret keys for any of
its users and/or access an alternative website installed somewhere else. This
allows users to push modified objects into the platform, completing the
development loop:
1. Pull objects of interest locally
2. Develop new objects based on existing ones or modify existing objects
3. Test locally, on an environment similar to the one available at the remote
platform
4. Push back modifications and then scale-up experiment running to explore more
databases and more parameter combinations
1. Pull objects of interest locally.
2. Develop new objects or modify existing ones.
3. Test locally, on an environment similar to the one available at the remote platform. (If the user wants to run the experiment locally without pushing it back to the platform they can use their own environment)
4. Push back modifications and then scale-up experiment running to explore more databases and more parameter combinations.
In order to properly configure a working prefix and memorize access options on
that directory, do the following from your shell:
......@@ -66,7 +64,7 @@ current working directory as your prefix. You can override this setting using th
.. code-block:: sh
$ ./bin/beat --prefix=/Users/myname/work/beat config show
$ beat --prefix=/Users/myname/work/beat config show
...
......@@ -121,8 +119,8 @@ like this:
Database Root Directories
=========================
When running an experiment via the ``beat`` application using the local
executor (the default executor, also behind the ``--local`` flag), ``beat``
When running an experiment in the BEAT ecosystem using the local
executor (the default executor, also behind the ``--local`` flag), ``beat``
will look into your configuration for any options set by the user that follow
the format ``database/<db name>/<db version>``. ``beat`` expects that this
option points to a string representing the path to the root folder of the
......@@ -137,7 +135,7 @@ Instead, you may override that path by setting the configuration option
``database/atnt/3`` to your local path to the database files.
Assuming your username is "user" and you extracted the database files to
``~/Downloads/atnt_db``, you can set ``database/atnt/3`` to
``/home/user/Downloads/atnt_db``, and ``beat`` will find the database files.
``/home/user/Downloads/atnt_db``, and BEAT will find the database files.
You may explore different configuration options with the ``--help`` flag of
``beat config``:
......
......@@ -45,9 +45,14 @@ be obtained by running the following command:
Creating a new database
=======================
To create a new database locally, create the necessary files (JSON declaration,
Python view and restructured text documentation) and place them on your prefix.
Once done, issue the following sequence of commands to upload it to the server:
To create a new database locally, create the necessary files (see :ref:`beat-new-database`) and place them on your prefix.
Once done, use the following command to index the database:
.. code-block:: sh
$ beat database index <db>/1
and if you wan to upload it to the web server issue the following command:
.. code-block:: sh
......@@ -91,3 +96,7 @@ Replace the string ``<db>`` with the name of your database. For example,
``mynewdatabase``. Replace ``<platform>`` by the address of the BEAT platform
you're trying to interact with. Replace ``<your-token>`` by your user token
(you can get that information via your settings window on the platform itself).
.. note::
At the moment only users with administrative privilege can push databases to the web serve however all users can create and modify databases locally.
......@@ -29,14 +29,14 @@ Experiments
The BEAT command-line utility called ``beat`` can perform a variety of actions
concerning experiments. These actions are grouped in two sets:
* local: Local actions allow the user to act on locally installed objects
* remote: Actions on the remote web platform
* local: Local actions allow the user to act on locally installed objects.
* remote: Actions on the remote web server.
Once you have setup your prefix directory as explained in
:ref:`beat-cmdline-configuration`, you're ready to start configuring new
experiments.
The commands available for experiments are:
The commands available for the experiments are:
.. command-output:: beat experiments --help
......@@ -113,7 +113,7 @@ The ``beat cache`` collection of commands interact with the cache:
How to plot output images from experiments?
...........................................
The command ``beat experiments plot <name>`` can be used to plot output images
The command ``beat experiments plot <experiment name>`` can be used to plot output images
for the various experiments.
There a two ways to plot data:
......@@ -122,14 +122,14 @@ There a two ways to plot data:
.. code-block:: sh
$ beat experiments plot --remote experimentname
$ beat experiments plot --remote <experiment name>
* using data from the cache of locally ran experiments
.. code-block:: sh
$ beat experiments plot experimentname
$ beat experiments plot <experiment name>
In both cases the 'outputfolder' option can be specified to save all the plots to a specific directory. By default, if nothing was specified, the plots will be saved under the experiment path.
In both cases the 'output folder' option can be specified to save all the plots to a specific directory. By default, if nothing was specified, the plots will be saved under the experiment path.
Take into account that some extra options are available such as '--show' which will pop out the generated plots on your screen.
......@@ -20,49 +20,25 @@
.. You should have received a copy of the GNU Affero Public License along ..
.. with the BEAT platform. If not, see http://www.gnu.org/licenses/. ..
.. _beat-core-introduction:
Introduction
============
The user objects (data formats, toolchains, experiments, etc) are stored
locally in a directory with specific structure that is commonly referred to as
a **prefix** (see :ref:`prefix`). The user objects on the web platform are
also stored in a similar directory structure. It is possible to extract a
representation from the objects on the BEAT web server and interact with them
locally. Local object copies contain the same amount of information that is
displayed through the web interface.
The BEAT command-line utility can be used for simple functionalities (e.g.
deleting an existing algorithm or making small modifications) or advanced
tasks (e.g. database development, experiment debugging) both for local objects
and remote objects. In order to make this possible for the remote objects, the
web platform provides a RESTful API which third-party applications can use to
list, query and modify existing remote objects.
Even though user objects (data formats, toolchains, experiments, etc) are
stored on a remote BEAT web server, it is possible to extract a representation
from such a website and, in a limited way, interact with such objects locally.
This functionality may be useful for simple (e.g. deleting an existing
algorithm on the platform or making small modifications) or advanced tasks
(e.g. database development, experiment debugging). In order to make this
possible, the web platform provides a RESTful API which third-party
applications can use to list, query and modify existing remote objects. Local
object copies contain the same amount of information that is displayed through
the web interface, and are stored following a precise directory organization.
The root of the object installation is commonly referred as a **prefix**. The
prefix is just a path to a known directory to which the user has write access,
so as to store objects which are downloaded from the web server. This is the
typical directory structure in a prefix directory:
.. code-block:: sh
../prefix/
├── algorithms
├── cache
├── databases
├── dataformats
├── experiments
├── libraries
├── plotterparameters
├── plotters
└── toolchains
Each of the subdirectories in the prefix keeps only objects of a given type.
For example, the ``dataformats`` subdirectory keeps only data format objects,
and so on. Inside each subdirectory, the user will find an organization that
resembles the naming convention of objects in the BEAT platform. For example,
you'd be able to find the data format ``my_dataformat``, belonging to user
``user``, version ``1``, under the directory
``<prefix>/dataformats/user/my_dataformat/1``. Objects are described by a JSON
file, an optional full-length description in reStructuredText format and,
depending on the object type, a program file containing user routines
programmed in one of the supported languages.
The ``beat`` command-line utility bridges user interaction with a remote BEAT
web platform and locally available objects in a seamless way:
......@@ -70,8 +46,8 @@ web platform and locally available objects in a seamless way:
.. command-output:: beat --help
The command-line interface is separated in subcommands, for acting on specific
objects in the platform. Actions can be driven to operate on locally installed
objects. Actions can be driven to operate on locally installed
or remotely available objects. You'll find detailed information about
sub-commands on specific sub-sections of this documentation dedicated to that
particular type of object. In this section, we cover basic usage and
particular type of object. In :ref:`beat-cmdline-configuration`, we cover basic usage and
configuration only.
.. _main beat website: https://wwww.beat-eu.org/platform
.. _main beat website: https://wwww.beat-eu.org/platform/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment