# HG changeset patch # User Iannis # Date 1515599895 -7200 # Node ID 93b6b945d9391fb4193889e2075ed8b00e1fc040 # Parent c2020b2fdd0512f0d4a517e88cd7c8badc54374d Minor bugs. diff -r c2020b2fdd05 -r 93b6b945d939 CHANGELOG.rst --- a/CHANGELOG.rst Fri Dec 15 22:53:17 2017 +0200 +++ b/CHANGELOG.rst Wed Jan 10 17:58:15 2018 +0200 @@ -1,5 +1,17 @@ -0.5.0 (2015-06-23) -------------------- +Changelog +========= + +0.6.2 - 2018-01-10 +------------------ +* Fixed bug when download optical files. + +0.6.1 - 2017-12-15 +------------------ +* Converted script to python module +* Settings are now read from .yaml file. + +0.5.0 - 2015-06-23 +------------------ * Moved configuration settings to a separate file * Added lincence information (MIT) * Added version number diff -r c2020b2fdd05 -r 93b6b945d939 README.rst --- a/README.rst Fri Dec 15 22:53:17 2017 +0200 +++ b/README.rst Wed Jan 10 17:58:15 2018 +0200 @@ -1,7 +1,7 @@ Overview -================= +======== -This package provides a script which permits interacting with the +This package provides a tool for interacting with the Single Calculus Chain through the command line. Specifically, with the script you can: * Upload a file to the SCC for processing @@ -25,19 +25,15 @@ The easiest way to install this module is from the python package index using pip:: - pip install scc_access - -See http://docs.python-requests.org/en/latest/user/install/ for more details. + pip install hg+https://bitbucket.org/iannis_b/scc-access#egg=scc-access -You can also use the script by cloning this mercurial repository. Alternatively, you -can just copy the scc_access.py and and settings.sample.py files to a local -directory. +You can also use the script by cloning this mercurial repository. Settings -------- -You will need to change some user-defined settings in a settings.py file. You -can rename the settings.sample.py file to settings.py and follow the instructions +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. Specifically, you will need to: @@ -45,7 +41,7 @@ 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials. 2. Change the OUTPUT_DIR to the location were the results will be stored. -Please not that it's not a good idea to store your own credentials in the settings +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 diff -r c2020b2fdd05 -r 93b6b945d939 scc_access/__init__.py --- a/scc_access/__init__.py Fri Dec 15 22:53:17 2017 +0200 +++ b/scc_access/__init__.py Wed Jan 10 17:58:15 2018 +0200 @@ -1,1 +1,1 @@ -__version__ = "0.6.1" \ No newline at end of file +__version__ = "0.6.2" \ No newline at end of file diff -r c2020b2fdd05 -r 93b6b945d939 scc_access/scc_access.py --- a/scc_access/scc_access.py Fri Dec 15 22:53:17 2017 +0200 +++ b/scc_access/scc_access.py Wed Jan 10 17:58:15 2018 +0200 @@ -154,7 +154,7 @@ def download_optical(self, measurement_id): """ Download optical files for the measurement id. """ # Construct the download url - download_url = self.download_optical.format(measurement_id) + download_url = self.download_optical_pattern.format(measurement_id) self.download_files(measurement_id, 'scc_optical', download_url) def download_graphs(self, measurement_id): @@ -495,7 +495,7 @@ parser = argparse.ArgumentParser() parser.add_argument("filename", nargs='?', help="Measurement file name or path.", default='') parser.add_argument("system", nargs='?', help="Processing system id.", default=0) - parser.add_argument("-c", "--config", nargs='?', help="Path to configuration file") + parser.add_argument("-c", "--config", help="Path to configuration file") parser.add_argument("-p", "--process", help="Wait for the results of the processing.", action="store_true") parser.add_argument("--delete", help="Measurement ID to delete.") diff -r c2020b2fdd05 -r 93b6b945d939 settings_sample.yaml --- a/settings_sample.yaml Fri Dec 15 22:53:17 2017 +0200 +++ b/settings_sample.yaml Wed Jan 10 17:58:15 2018 +0200 @@ -1,6 +1,6 @@ # This file contains the user-specific settings for the scc_access script. # -# You should rename the file settings_sample.yaml to and move it outside the module repository. Take care to set the +# 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.