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.

victor@7 1 Overview
i@15 2 ========
ioannis@0 3
i@15 4 This package provides a tool for interacting with the
victor@7 5 Single Calculus Chain through the command line. Specifically, with the script you can:
ioannis@0 6
ioannis@0 7 * Upload a file to the SCC for processing
ioannis@0 8 * Download the processed files and graphs
ioannis@0 9 * Delete an existing measurement from the SCC (with appropriate privileges)
ioannis@0 10
ioannis@0 11 The main functions are implemented in a class (SCC) that you can also import
ioannis@0 12 and use in your custom scripts.
ioannis@0 13
ioannis@0 14 The script does not provide any feedback if a file upload fails. Before using
ioannis@0 15 the script, you will need to upload some files manually and be confident that
ioannis@0 16 your SCC file format and processing settings are correct.
ioannis@0 17
i@12 18 Please note that this is not part of the "official" SCC tools.
ioannis@0 19
ioannis@0 20 Any suggestions for improvements and new features are more than welcome.
ioannis@0 21
ioannis@1 22
ioannis@0 23 Installation
ioannis@0 24 ------------
ioannis@0 25
victor@9 26 The easiest way to install this module is from the python package index using pip::
victor@8 27
ioannis@42 28 pip install hg+https://repositories.imaa.cnr.it/public/scc_access/#egg=scc-access
ioannis@0 29
i@15 30 You can also use the script by cloning this mercurial repository.
ioannis@1 31
ioannis@0 32
ioannis@0 33 Settings
ioannis@0 34 --------
i@15 35 You will need to provide some user-defined settings in a .yaml format. You
ioannis@42 36 can rename the config_sample.yaml file to e.g. config.yaml and follow the instructions
ioannis@42 37 inside the file.
ioannis@0 38
ioannis@0 39 Specifically, you will need to:
ioannis@0 40
ioannis@0 41 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials.
ioannis@0 42 2. Change the OUTPUT_DIR to the location were the results will be stored.
ioannis@0 43
i@15 44 Please not that it's not a good idea to store your stations management credentials in the settings
ioannis@0 45 file. The standard user has "Station Management" privileges and if the credentials
ioannis@0 46 are stolen, someone could change/delete the stations settings from the SCC database.
ioannis@42 47 For this, it is better to use a user account with minimum access settings, i.e. that
ioannis@0 48 can only upload files and measurements.
ioannis@0 49
ioannis@0 50
ioannis@0 51 Usage
ioannis@0 52 -----
ioannis@0 53
ioannis@0 54 You can upload a file specifying the username and the system id::
victor@8 55
ioannis@42 56 scc_access ./config.yaml ./20110101po01.nc 125
ioannis@0 57
ioannis@0 58 If you want to wait for the processing to finish and download the resulting files
ioannis@0 59 you need to define the -p flag::
victor@8 60
ioannis@42 61 scc_access ./config.yaml ./20110101po01.nc 125 -p
ioannis@42 62
ioannis@42 63 If the provieded measurement ID is already registerd on the SCC, the upload will be rejected. You can
ioannis@42 64 instruct the script to first delete the existing measurement using the --force_upload flag::
ioannis@42 65
ioannis@42 66 scc_access ./config.yaml ./20110101po01.nc 125 --force_upload -p
ioannis@0 67
ioannis@42 68 You can restart the processing chain on a particular measurements using either the --rerun-all or
ioannis@42 69 --rerun-elpp options and specifying an existing measurement ID. E.g::
ioannis@42 70
ioannis@42 71 scc_access ./config.yaml --rerun-elpp 20110101po02
ioannis@42 72
ioannis@42 73 If you want to delete an existing measurement from the database use the --delete option and
ioannis@0 74 the measurement id::
victor@8 75
ioannis@42 76 scc_access --delete 20110101po01
ioannis@0 77
ioannis@0 78 For more information on the syntax type::
victor@8 79
victor@9 80 scc_access -h

mercurial