Sat, 09 Jan 2021 15:10:30 +0200
Multiple changes, based on wrong initial state.
README.rst | file | annotate | diff | comparison | revisions | |
config_sample.yaml | file | annotate | diff | comparison | revisions | |
settings_sample.yaml | file | annotate | diff | comparison | revisions | |
setup.py | file | annotate | diff | comparison | revisions |
--- a/README.rst Wed Jan 10 18:06:02 2018 +0200 +++ b/README.rst Sat Jan 09 15:10:30 2021 +0200 @@ -25,7 +25,7 @@ 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 You can also use the script by cloning this mercurial repository. @@ -33,8 +33,8 @@ Settings -------- You will need to provide some user-defined settings in a .yaml format. You -can rename the settings_sample.yaml file to settings.yaml and follow the instructions -there. +can rename the config_sample.yaml file to e.g. config.yaml and follow the instructions +inside the file. Specifically, you will need to: @@ -44,7 +44,7 @@ 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 +For this, it is better to use a user account with minimum access settings, i.e. that can only upload files and measurements. @@ -53,17 +53,27 @@ You can upload a file specifying the username and the system id:: - scc_access 20110101po01.nc 125 + 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 20110101po01.nc 125 -p + 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 -If you want to delete an existing measurement id from the database use the -d flag and +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 -d 20110101po01 + scc_access --delete 20110101po01 For more information on the syntax type::
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config_sample.yaml Sat Jan 09 15:10:30 2021 +0200 @@ -0,0 +1,9 @@ +# This file contains the user-specific settings for the scc_access script. +# +# You should rename the file settings_sample.yaml (e.g. to settings.yaml) and move it outside the module repository. Take care to set the +# minimum required permissions, as this file contains SCC access codes. For website login, it is recommended to +# use credential for a user without station-management privileges. +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. \ No newline at end of file
--- a/settings_sample.yaml Wed Jan 10 18:06:02 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -# This file contains the user-specific settings for the scc_access script. -# -# You should rename the file settings_sample.yaml (e.g. to settings.yaml) and move it outside the module repository. Take care to set the -# minimum required permissions, as this file contains SCC access codes. For website login, it is recommended to -# use credential for a user without station-management privileges. -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. \ No newline at end of file