# HG changeset patch # User ioannis@ioannis-VirtualBox # Date 1610210773 -7200 # Node ID 3c0b9e97b442f1919ffa49972b9a46a84e2a3bda # Parent 6e0e113068f27c97ee2a065de4f5479fcc7d80c2 Updated readme file. diff -r 6e0e113068f2 -r 3c0b9e97b442 README.rst --- a/README.rst Sat Jan 09 17:30:02 2021 +0200 +++ b/README.rst Sat Jan 09 18:46:13 2021 +0200 @@ -19,38 +19,39 @@ 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 + pip install hg+https://repositories.imaa.cnr.it/public/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 + pip install https://repositories.imaa.cnr.it/public/scc_access/archive/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. +The required user-defined settings need to be specified in a .yaml file. + +The following parameters should be specified:: -Specifically, you will need to: + basic_credentials: ['username', 'password'] # The HTTP user name and password that is needed to access the SCC site. + website_credentials: ['username', 'password'] # The user name and password that is needed to log in to the SCC site. + output_dir: /path/to/files/scc_output/ # The directory to download the files + base_url: https://scc.imaa.cnr.it/ # SCC base URL. Normally you shouldn't need to change that. -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. + +The repository includes a `settings_sample.yaml` file that you can use as a starting point. Rename the file, e.g. to +`settings.yaml` and input the required parameters. If you don't want to specify the file path every time +your run the `scc_access` script, you can name the file `.scc_access.yaml` and place it in your home directory. -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 +Please note 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 +For this, it is better to use a user account with minimum access settings, i.e. that can only upload files and measurements. @@ -59,12 +60,22 @@ You can upload a file specifying the username and the system id:: - scc_access upload-file 20110101po01.nc 125 + 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 :: +you can use add the `-p` or `--process` flag:: - scc_access process-file 20110101po01.nc 125 + scc_access upload-file 20110101po01.nc 125 -p + +The two command above assume that you have placed your setting file in the default location. You can specify a +custom location using the -c flag:: + + scc_access -c ./path/to/settings.yaml upload-file 20110101po01.nc 125 + +By default, the SCC will reject an uploaded file, if the specified measurement id already exists on the server. You +can instruct the script to delete any existing measurement before uploading using the `--force_upload` flag:: + + scc_access upload-file 20110101po01.nc 125 -p --force_upload If you want to delete an existing measurement id from the database use the `delete` command and the measurement id:: @@ -75,6 +86,59 @@ scc_access list +.. note:: + The `list` command needs to be updated. Cross-check the results before using them. + For more information on the syntax type:: scc_access -h + +This will produce the following help text:: + + usage: scc_access [-h] [-d] [-s] [-c CONFIG] + {delete,rerun-all,rerun-elpp,upload-file,list,download} ... + + positional arguments: + {delete,rerun-all,rerun-elpp,upload-file,list,download} + delete Deletes a measurement. + rerun-all Rerun all processing steps for the provided + measurement IDs. + rerun-elpp Rerun low-resolution processing steps for the provided + measurement ID. + upload-file Submit a file and, optionally, download the output + products. + list List measurements registered on the SCC. + download Download selected measurements. + + optional arguments: + -h, --help show this help message and exit + -d, --debug Print debugging information. + -s, --silent Show only warning and error messages. + -c CONFIG, --config CONFIG + Path to the config file. + +You can find out more information about each command e.g. like this:: + + scc_access upload-file -h + +In this case, the help text will give more details about the `upload-file` command:: + + usage: scc_access upload-file [-h] [-p] [--force_upload] + [--radiosounding RADIOSOUNDING] + [--overlap OVERLAP] [--lidarratio LIDARRATIO] + filename system + + positional arguments: + filename Measurement file name or path. + system Processing system id. + + optional arguments: + -h, --help show this help message and exit + -p, --process Wait for the processing results. + --force_upload If measurement ID exists on SCC, delete before + uploading. + --radiosounding RADIOSOUNDING + Radiosounding file name or path + --overlap OVERLAP Overlap file name or path + --lidarratio LIDARRATIO + Lidar ratio file name or path