README.rst

Sat, 09 Jan 2021 15:10:30 +0200

author
ioannis@ioannis-VirtualBox
date
Sat, 09 Jan 2021 15:10:30 +0200
changeset 42
c95ee9720e7b
parent 15
93b6b945d939
child 51
a4ca2b6d67f5
permissions
-rw-r--r--

Multiple changes, based on wrong initial state.

Overview
========

This package provides a tool for interacting with the
Single Calculus Chain through the command line. Specifically, with the script you can:

* Upload a file to the SCC for processing
* Download the processed files and graphs
* Delete an existing measurement from the SCC (with appropriate privileges)

The main functions are implemented in a class (SCC) that you can also import 
and use in your custom scripts.

The script does not provide any feedback if a file upload fails. Before using
the script, you will need to upload some files manually and be confident that 
your SCC file format and processing settings are correct.

Please note that this is not part of the "official" SCC tools.

Any suggestions for improvements and new features are more than welcome.


Installation
------------

The easiest way to install this module is from the python package index using pip::
    
    pip install hg+https://repositories.imaa.cnr.it/public/scc_access/#egg=scc-access

You can also use the script by cloning this mercurial repository.


Settings
--------
You will need to provide some user-defined settings in a .yaml format. You
can rename the config_sample.yaml file to e.g. config.yaml and follow the instructions
inside the file.

Specifically, you will need to:

1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials.
2. Change the OUTPUT_DIR to the location were the results will be stored.

Please not that it's not a good idea to store your stations management credentials in the settings
file. The standard user has "Station Management" privileges and if the credentials 
are stolen, someone could change/delete the stations settings from the SCC database.
For this, it is better to use a user account with minimum access settings, i.e. that
can only upload files and measurements.


Usage
-----

You can upload a file specifying the username and the system id::
    
   scc_access ./config.yaml ./20110101po01.nc 125

If you want to wait for the processing to finish and download the resulting files
you need to define the -p flag::
    
   scc_access ./config.yaml ./20110101po01.nc 125 -p

If the provieded measurement ID is already registerd on the SCC, the upload will be rejected. You can
instruct the script to first delete the existing measurement using the --force_upload flag::

   scc_access ./config.yaml ./20110101po01.nc 125 --force_upload -p

You can restart the processing chain on a particular measurements using either the --rerun-all or
--rerun-elpp options and specifying an existing measurement ID. E.g::

   scc_access ./config.yaml --rerun-elpp 20110101po02

If you want to delete an existing measurement from the database use the --delete option and
the measurement id::
    
    scc_access --delete 20110101po01

For more information on the syntax type::
    
    scc_access -h

mercurial