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.

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
i@15 28 pip install hg+https://bitbucket.org/iannis_b/scc-access#egg=scc-access
ioannis@0 29
i@36 30 or, if you don't have mercurial on your system::
i@36 31
i@36 32 pip install https://bitbucket.org/iannis_b/scc-access/get/tip.zip
i@36 33
i@15 34 You can also use the script by cloning this mercurial repository.
ioannis@1 35
ioannis@0 36
ioannis@0 37 Settings
ioannis@0 38 --------
moritz@29 39 You will need to change some user-defined settings in a settings.yaml file. You
moritz@29 40 can copy the settings_sample.yaml file to settings.py and follow the instructions
moritz@29 41 there. You can copy the resulting file to your home directory as `.scc_access.yaml`.
moritz@29 42 This is the default location, `scc_access` will search there if no other location was
moritz@29 43 specified.
ioannis@0 44
ioannis@0 45 Specifically, you will need to:
ioannis@0 46
moritz@29 47 1. Change the `basic_credentials` and `website_credentials` to your credentials.
moritz@29 48 2. Change the `output_dir` to the location were the results will be stored.
ioannis@0 49
i@15 50 Please not that it's not a good idea to store your stations management credentials in the settings
ioannis@0 51 file. The standard user has "Station Management" privileges and if the credentials
ioannis@0 52 are stolen, someone could change/delete the stations settings from the SCC database.
ioannis@0 53 For this, it is better to use a used account with minimum access settings, that
ioannis@0 54 can only upload files and measurements.
ioannis@0 55
ioannis@0 56
ioannis@0 57 Usage
ioannis@0 58 -----
ioannis@0 59
ioannis@0 60 You can upload a file specifying the username and the system id::
victor@8 61
moritz@29 62 scc_access upload-file 20110101po01.nc 125
ioannis@0 63
ioannis@0 64 If you want to wait for the processing to finish and download the resulting files
ioannis@33 65 you need to define the `process-file` command ::
victor@8 66
ioannis@33 67 scc_access process-file 20110101po01.nc 125
ioannis@0 68
moritz@29 69 If you want to delete an existing measurement id from the database use the `delete`
moritz@29 70 command and the measurement id::
victor@8 71
moritz@29 72 scc_access delete 20110101po01
moritz@29 73
moritz@29 74 You can list available measurements with the `list` command::
moritz@29 75
moritz@29 76 scc_access list
ioannis@0 77
ioannis@0 78 For more information on the syntax type::
victor@8 79
victor@9 80 scc_access -h

mercurial