README.rst

Fri, 20 Dec 2019 14:36:21 +0200

author
Iannis <i.binietoglou@impworks.gr>
date
Fri, 20 Dec 2019 14:36:21 +0200
changeset 40
8acea12976c4
parent 36
b51ba2647b41
child 49
3c0b9e97b442
permissions
-rw-r--r--

Bug fix: Handling of full paths in ancillary files.

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://bitbucket.org/iannis_b/scc-access#egg=scc-access

or, if you don't have mercurial on your system::

   pip install https://bitbucket.org/iannis_b/scc-access/get/tip.zip

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


Settings
--------
You will need to change some user-defined settings in a settings.yaml file. You
can copy the settings_sample.yaml file to settings.py and follow the instructions
there. You can copy the resulting file to your home directory as `.scc_access.yaml`.
This is the default location, `scc_access` will search there if no other location was
specified.

Specifically, you will need to:

1. Change the `basic_credentials` and `website_credentials` 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 used account with minimum access settings, that
can only upload files and measurements.


Usage
-----

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

If you want to wait for the processing to finish and download the resulting files
you need to define the `process-file` command ::
    
    scc_access process-file 20110101po01.nc 125

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

You can list available measurements with the `list` command::

    scc_access list

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

mercurial