victor@7: Overview ioannis@0: ================= ioannis@0: victor@7: This package provides a script which permits interacting with the victor@7: Single Calculus Chain through the command line. Specifically, with the script you can: ioannis@0: ioannis@0: * Upload a file to the SCC for processing ioannis@0: * Download the processed files and graphs ioannis@0: * Delete an existing measurement from the SCC (with appropriate privileges) ioannis@0: ioannis@0: The main functions are implemented in a class (SCC) that you can also import ioannis@0: and use in your custom scripts. ioannis@0: ioannis@0: The script does not provide any feedback if a file upload fails. Before using ioannis@0: the script, you will need to upload some files manually and be confident that ioannis@0: your SCC file format and processing settings are correct. ioannis@0: ioannis@0: Please note that this is not part of the "official" SCC tools. I will update ioannis@0: it when I have time but I cannot guarantee to maintain it in the long run. ioannis@0: ioannis@0: Any suggestions for improvements and new features are more than welcome. ioannis@0: ioannis@1: ioannis@0: Installation ioannis@0: ------------ ioannis@0: victor@7: The easiest way to install this module is from the python package index using pip: victor@8: victor@8: pip install scc_access ioannis@0: ioannis@0: See http://docs.python-requests.org/en/latest/user/install/ for more details. ioannis@0: victor@7: You can also use the script by cloning this mercurial repository. Alternatively, you victor@7: can just copy the scc_access.py and and settings.sample.py files to a local ioannis@1: directory. ioannis@1: ioannis@0: ioannis@0: Settings ioannis@0: -------- ioannis@0: You will need to change some user-defined settings in a settings.py file. You ioannis@0: can rename the settings.sample.py file to settings.py and follow the instructions ioannis@0: there. ioannis@0: ioannis@0: Specifically, you will need to: ioannis@0: ioannis@0: 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials. ioannis@0: 2. Change the OUTPUT_DIR to the location were the results will be stored. ioannis@0: ioannis@0: Please not that it's not a good idea to store your own credentials in the settings ioannis@0: file. The standard user has "Station Management" privileges and if the credentials ioannis@0: are stolen, someone could change/delete the stations settings from the SCC database. ioannis@0: For this, it is better to use a used account with minimum access settings, that ioannis@0: can only upload files and measurements. ioannis@0: ioannis@0: ioannis@0: Usage ioannis@0: ----- ioannis@0: ioannis@0: You can upload a file specifying the username and the system id:: victor@8: victor@8: scc_access 20110101po01.nc 125 ioannis@0: ioannis@0: If you want to wait for the processing to finish and download the resulting files ioannis@0: you need to define the -p flag:: victor@8: victor@8: scc_access.py 20110101po01.nc 125 -p ioannis@0: ioannis@0: If you want to delete an existing measurement id from the database use the -d flag and ioannis@0: the measurement id:: victor@8: victor@8: scc_access.py -d 20110101po01 ioannis@0: ioannis@0: For more information on the syntax type:: victor@8: victor@8: scc_access.py -h