Changeset 7014


Ignore:
Timestamp:
14/06/10 12:24:38 (9 years ago)
Author:
astephen
Message:

renamed ddp_process_support to process_support

Location:
cows_wps/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/tests/test_ddp_process_support.py

    r5615 r7014  
    77 
    88from cows_wps.process_handler.fileset import FileSet 
    9 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     9import cows_wps.process_handler.process_support as process_support 
    1010 
    1111log = logging.getLogger(__name__) 
     
    5050 
    5151    def test_001_StatusIsSet(self): 
    52         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     52        process_support.updateJobDetailsAfterCompletion(self.context,  
    5353                                        self.startTime, self.endTime)         
    5454         
     
    6464        expectedVolume = sum([x.size for x in contentFiles])         
    6565         
    66         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     66        process_support.updateJobDetailsAfterCompletion(self.context,  
    6767                                        self.startTime, self.endTime) 
    6868         
     
    7272         
    7373    def test_003_DurationIsSetAfterCompletion(self): 
    74         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     74        process_support.updateJobDetailsAfterCompletion(self.context,  
    7575                                        self.startTime, self.endTime)         
    7676         
     
    8181         
    8282    def test_004_CompletionTimeIsSet(self): 
    83         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     83        process_support.updateJobDetailsAfterCompletion(self.context,  
    8484                                        self.startTime, self.endTime)         
    8585         
     
    9191    def test_005_DownloadCapabilityIsNotSetForMultipleRootFiles(self): 
    9292        self.setupFileSetWithMultipleRoots() 
    93         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     93        process_support.updateJobDetailsAfterCompletion(self.context,  
    9494                                        self.startTime, self.endTime)         
    9595         
     
    100100    def test_006_DownloadCapabilityIsSetForSingleRootFile(self): 
    101101        self.setupFileSetWithSingleRoot() 
    102         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     102        process_support.updateJobDetailsAfterCompletion(self.context,  
    103103                                        self.startTime, self.endTime)         
    104104         
     
    111111        self.context.outputs['job_details']['job_capabilities'] = 'capability_before' 
    112112         
    113         ddp_process_support.updateJobDetailsAfterCompletion(self.context,  
     113        process_support.updateJobDetailsAfterCompletion(self.context,  
    114114                                        self.startTime, self.endTime)         
    115115         
     
    153153 
    154154    def test_001_StatusIsSet(self): 
    155         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
     155        process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
    156156         
    157157        expectedStatus = [self.context.status, self.context.statusMessage, self.context.percentComplete] 
     
    166166        expectedVolume = sum([x.size for x in contentFiles])         
    167167         
    168         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration) 
     168        process_support.updateJobDetailsAfterDryRun(self.context, self.duration) 
    169169         
    170170        resultingVolume = self.context.outputs['job_details']['job_volume'] 
     
    173173         
    174174    def test_003_DurationIsSetAfterCompletion(self): 
    175         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
     175        process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
    176176         
    177177        expectedDuration = self.duration 
     
    183183        self.setupFileSetWithMultipleRoots() 
    184184         
    185         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration)     
     185        process_support.updateJobDetailsAfterDryRun(self.context, self.duration)     
    186186         
    187187        resultingJobCapability = self.context.outputs['job_details'].get('job_capabilities') 
     
    192192        self.setupFileSetWithSingleRoot() 
    193193         
    194         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
     194        process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
    195195         
    196196        resultingJobCapability = self.context.outputs['job_details']['job_capabilities'] 
     
    202202        self.context.outputs['job_details']['job_capabilities'] = 'capability_before' 
    203203         
    204         ddp_process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
     204        process_support.updateJobDetailsAfterDryRun(self.context, self.duration)         
    205205         
    206206        resultingJobCapability = self.context.outputs['job_details']['job_capabilities'] 
     
    212212    def setUp(self): 
    213213         
    214         self.oldDryZipFn = ddp_process_support.dryRunZipFileSet 
    215         self.oldZipFn = ddp_process_support.zipFileSet 
     214        self.oldDryZipFn = process_support.dryRunZipFileSet 
     215        self.oldZipFn = process_support.zipFileSet 
    216216         
    217217        self.replaceDryRunZipFileSet() 
     
    231231     
    232232    def tearDown(self): 
    233         ddp_process_support.dryRunZipFileSet = self.oldDryZipFn  
    234         ddp_process_support.zipFileSet = self.oldZipFn           
     233        process_support.dryRunZipFileSet = self.oldDryZipFn  
     234        process_support.zipFileSet = self.oldZipFn           
    235235 
    236236    def replaceDryRunZipFileSet(self): 
     
    242242            return self.zippedFileSet 
    243243             
    244         ddp_process_support.dryRunZipFileSet = newDryRunZipFileSet 
     244        process_support.dryRunZipFileSet = newDryRunZipFileSet 
    245245     
    246246    def replaceZipFileSet(self): 
     
    254254            return self.zippedFileSet 
    255255             
    256         ddp_process_support.zipFileSet = newZipFileSet 
     256        process_support.zipFileSet = newZipFileSet 
    257257     
    258258    def test_001_zipFileSetCalled(self): 
    259259         
    260         ddp_process_support.processOutputs(self.context, self.fileSet, dryRun=False, keep=True) 
     260        process_support.processOutputs(self.context, self.fileSet, dryRun=False, keep=True) 
    261261         
    262262        assert self.newZipFileSetArgs[0] == self.fileSet 
     
    267267    def test_002_dryRunZipFileSetCalled(self): 
    268268         
    269         ddp_process_support.processOutputs(self.context, self.fileSet, dryRun=True, keep=True) 
     269        process_support.processOutputs(self.context, self.fileSet, dryRun=True, keep=True) 
    270270         
    271271        assert self.newDryRunZipFileSetArgs[0] == self.fileSet 
     
    278278        self.context.config['max_request_volume'] = 99 
    279279         
    280         nt.assert_raises(Exception, ddp_process_support.processOutputs,  
     280        nt.assert_raises(Exception, process_support.processOutputs,  
    281281                         [self.context, self.fileSet]) 
    282282 
     
    291291        self.context.config['max_request_volume'] = 75 
    292292         
    293         ddp_process_support.processOutputs(self.context, self.fileSet, dryRun=True) 
     293        process_support.processOutputs(self.context, self.fileSet, dryRun=True) 
    294294         
    295295 
  • cows_wps/trunk/cows_wps/tests/test_process_code/status_test_process.py

    r5615 r7014  
    1414from cows_wps.process_handler.context.process_status import STATUS 
    1515from cows_wps.process_handler.fileset import FileSet 
    16 from cows_wps.process_handler.ddp_process_support import updateJobDetailsAfterCompletion, updateJobDetailsAfterDryRun 
     16from cows_wps.process_handler.process_support import updateJobDetailsAfterCompletion, updateJobDetailsAfterDryRun 
    1717 
    1818log = logging.getLogger(__name__) 
  • cows_wps/trunk/cows_wps/tests/test_process_code/wait_for_all_files_to_be_deleted.py

    r5615 r7014  
    1010 
    1111 
    12 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     12import cows_wps.process_handler.process_support as process_support 
    1313import cows_wps.tests.test_process_code.wait_for_deletion as wait_for_deletion 
    1414from cows_wps.process_handler.fileset import FileSet 
     
    6363        context.setStatus(STATUS.COMPLETED, "Process is complete")         
    6464        completionTime = time.time() 
    65         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     65        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    6666 
    6767 
     
    9999 
    100100        context.setStatus(STATUS.ACCEPTED, "Process execution request has been accepted", 0) 
    101         ddp_process_support.updateJobDetailsAfterDryRun(context, estimatedDuration) 
     101        process_support.updateJobDetailsAfterDryRun(context, estimatedDuration) 
    102102 
    103103     
  • cows_wps/trunk/process_modules/async_test.py

    r5943 r7014  
    2424from cows_wps.process_handler.context.process_status import STATUS 
    2525from cows_wps.process_handler.fileset import FileSet, zipFileSet, FLAG 
    26 from cows_wps.process_handler.ddp_process_support import writeMetadataFile, processOutputs 
    27 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     26from cows_wps.process_handler.process_support import writeMetadataFile, processOutputs 
     27import cows_wps.process_handler.process_support as process_support 
    2828 
    2929 
     
    7171 
    7272        completionTime = time.time() 
    73         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     73        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    7474 
    7575 
     
    9595        context.setStatus(STATUS.ACCEPTED, "Process execution request has been accepted", 0) 
    9696         
    97         ddp_process_support.updateJobDetailsAfterDryRun(context, duration) 
     97        process_support.updateJobDetailsAfterDryRun(context, duration) 
  • cows_wps/trunk/process_modules/cf_check.py

    r7002 r7014  
    1212# WPS imports 
    1313from cows_wps.process_handler.fileset import FileSet, FLAG 
    14 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     14import cows_wps.process_handler.process_support as process_support 
    1515from cows_wps.process_handler.context.process_status import STATUS 
    1616 
     
    5454         
    5555        completionTime = time.time() 
    56         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     56        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    5757 
    5858 
  • cows_wps/trunk/process_modules/double_it.py

    r6948 r7014  
    1010 
    1111from cows_wps.process_handler.fileset import FileSet, FLAG 
    12 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     12import cows_wps.process_handler.process_support as process_support 
    1313from cows_wps.process_handler.context.process_status import STATUS 
    1414 
     
    3535        context.setStatus(STATUS.COMPLETED, 'The End', 100) 
    3636         
    37 #        ddp_process_support.writeMetadataFile(context, context.inputs.items()) 
     37#        process_support.writeMetadataFile(context, context.inputs.items()) 
    3838         
    3939        completionTime = time.time() 
    40         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     40        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    4141 
    4242 
  • cows_wps/trunk/process_modules/extract_uk_station_data.py

    r7011 r7014  
    1010 
    1111from cows_wps.process_handler.fileset import FileSet, FLAG 
    12 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     12import cows_wps.process_handler.process_support as process_support 
    1313from cows_wps.process_handler.context.process_status import STATUS 
    1414 
     
    119119        context.setStatus(STATUS.COMPLETED, 'The End', 100) 
    120120        completionTime = time.time() 
    121         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     121        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    122122 
    123123 
     
    134134        self.fileSet.contents.append(FileSet(FLAG.DATA, "testfile.txt", 30000, "Some file")) 
    135135 
    136         ddp_process_support.finishDryRun(context, [("meta", "data")], self.fileSet, 
     136        process_support.finishDryRun(context, [("meta", "data")], self.fileSet, 
    137137                                         60, acceptedMessage='Dry run complete') 
    138138 
  • cows_wps/trunk/process_modules/get_weather_stations.py

    r6975 r7014  
    1212 
    1313from cows_wps.process_handler.fileset import FileSet, FLAG 
    14 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     14import cows_wps.process_handler.process_support as process_support 
    1515from cows_wps.process_handler.context.process_status import STATUS 
    1616 
     
    6868         
    6969        completionTime = time.time() 
    70         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     70        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    7171 
    7272 
     
    7676        self.fileSet.contents.append(FileSet(FLAG.DATA, "testfile.txt", 30000, "Some file")) 
    7777         
    78         ddp_process_support.finishDryRun(context, [("meta", "data")], self.fileSet, 
     78        process_support.finishDryRun(context, [("meta", "data")], self.fileSet, 
    7979                                         60, acceptedMessage='Dry run complete') 
    8080  
  • cows_wps/trunk/process_modules/ncdump_it.py

    r6948 r7014  
    88 
    99from cows_wps.process_handler.fileset import FileSet, FLAG 
    10 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     10import cows_wps.process_handler.process_support as process_support 
    1111from cows_wps.process_handler.context.process_status import STATUS 
    1212 
     
    4949         
    5050        completionTime = time.time() 
    51         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     51        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    5252 
    5353 
  • cows_wps/trunk/process_modules/process_template.py

    r6948 r7014  
    1212# WPS imports 
    1313from cows_wps.process_handler.fileset import FileSet, FLAG 
    14 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     14import cows_wps.process_handler.process_support as process_support 
    1515from cows_wps.process_handler.context.process_status import STATUS 
    1616 
     
    5454         
    5555        completionTime = time.time() 
    56         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     56        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    5757 
    5858 
  • cows_wps/trunk/process_modules/sync_test1.py

    r5943 r7014  
    1010 
    1111from cows_wps.process_handler.fileset import FileSet, FLAG 
    12 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     12import cows_wps.process_handler.process_support as process_support 
    1313from cows_wps.process_handler.context.process_status import STATUS 
    1414 
     
    3838        context.setStatus(STATUS.COMPLETED, 'The End', 100) 
    3939         
    40         ddp_process_support.writeMetadataFile(context, context.inputs.items()) 
     40        process_support.writeMetadataFile(context, context.inputs.items()) 
    4141         
    4242        completionTime = time.time() 
    43         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     43        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    4444 
    4545 
     
    5656        context.outputs['FileSet'] = fileSet 
    5757 
    58         ddp_process_support.updateJobDetailsAfterDryRun(context, 10) 
     58        process_support.updateJobDetailsAfterDryRun(context, 10) 
  • cows_wps/trunk/process_modules/wait_for_file_deletion.py

    r5943 r7014  
    1616from datetime import datetime 
    1717from cows_wps.process_handler.fileset import FileSet 
    18 import cows_wps.process_handler.ddp_process_support as ddp_process_support 
     18import cows_wps.process_handler.process_support as process_support 
    1919from cows_wps.process_handler.context.process_status import STATUS 
    2020 
     
    4545        context.setStatus(STATUS.COMPLETED, "Process is complete")         
    4646        completionTime = time.time() 
    47         ddp_process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
     47        process_support.updateJobDetailsAfterCompletion(context, startTime, completionTime) 
    4848 
    4949     
     
    7575 
    7676        context.setStatus(STATUS.ACCEPTED, "Process execution request has been accepted", 0) 
    77         ddp_process_support.updateJobDetailsAfterDryRun(context, estimatedDuration) 
     77        process_support.updateJobDetailsAfterDryRun(context, estimatedDuration) 
    7878        context.save() 
    7979     
Note: See TracChangeset for help on using the changeset viewer.