23 Installation |
23 Installation |
24 ------------ |
24 ------------ |
25 |
25 |
26 The easiest way to install this module is from the python package index using pip:: |
26 The easiest way to install this module is from the python package index using pip:: |
27 |
27 |
28 pip install hg+https://bitbucket.org/iannis_b/scc-access#egg=scc-access |
28 pip install hg+https://repositories.imaa.cnr.it/public/scc_access/#egg=scc-access |
29 |
29 |
30 You can also use the script by cloning this mercurial repository. |
30 You can also use the script by cloning this mercurial repository. |
31 |
31 |
32 |
32 |
33 Settings |
33 Settings |
34 -------- |
34 -------- |
35 You will need to provide some user-defined settings in a .yaml format. You |
35 You will need to provide some user-defined settings in a .yaml format. You |
36 can rename the settings_sample.yaml file to settings.yaml and follow the instructions |
36 can rename the config_sample.yaml file to e.g. config.yaml and follow the instructions |
37 there. |
37 inside the file. |
38 |
38 |
39 Specifically, you will need to: |
39 Specifically, you will need to: |
40 |
40 |
41 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials. |
41 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials. |
42 2. Change the OUTPUT_DIR to the location were the results will be stored. |
42 2. Change the OUTPUT_DIR to the location were the results will be stored. |
43 |
43 |
44 Please not that it's not a good idea to store your stations management credentials in the settings |
44 Please not that it's not a good idea to store your stations management credentials in the settings |
45 file. The standard user has "Station Management" privileges and if the credentials |
45 file. The standard user has "Station Management" privileges and if the credentials |
46 are stolen, someone could change/delete the stations settings from the SCC database. |
46 are stolen, someone could change/delete the stations settings from the SCC database. |
47 For this, it is better to use a used account with minimum access settings, that |
47 For this, it is better to use a user account with minimum access settings, i.e. that |
48 can only upload files and measurements. |
48 can only upload files and measurements. |
49 |
49 |
50 |
50 |
51 Usage |
51 Usage |
52 ----- |
52 ----- |
53 |
53 |
54 You can upload a file specifying the username and the system id:: |
54 You can upload a file specifying the username and the system id:: |
55 |
55 |
56 scc_access 20110101po01.nc 125 |
56 scc_access ./config.yaml ./20110101po01.nc 125 |
57 |
57 |
58 If you want to wait for the processing to finish and download the resulting files |
58 If you want to wait for the processing to finish and download the resulting files |
59 you need to define the -p flag:: |
59 you need to define the -p flag:: |
60 |
60 |
61 scc_access 20110101po01.nc 125 -p |
61 scc_access ./config.yaml ./20110101po01.nc 125 -p |
62 |
62 |
63 If you want to delete an existing measurement id from the database use the -d flag and |
63 If the provieded measurement ID is already registerd on the SCC, the upload will be rejected. You can |
|
64 instruct the script to first delete the existing measurement using the --force_upload flag:: |
|
65 |
|
66 scc_access ./config.yaml ./20110101po01.nc 125 --force_upload -p |
|
67 |
|
68 You can restart the processing chain on a particular measurements using either the --rerun-all or |
|
69 --rerun-elpp options and specifying an existing measurement ID. E.g:: |
|
70 |
|
71 scc_access ./config.yaml --rerun-elpp 20110101po02 |
|
72 |
|
73 If you want to delete an existing measurement from the database use the --delete option and |
64 the measurement id:: |
74 the measurement id:: |
65 |
75 |
66 scc_access -d 20110101po01 |
76 scc_access --delete 20110101po01 |
67 |
77 |
68 For more information on the syntax type:: |
78 For more information on the syntax type:: |
69 |
79 |
70 scc_access -h |
80 scc_access -h |