From 0c866b8b4bdfe8e2076d63c333118d34a60aae9f Mon Sep 17 00:00:00 2001 From: Wouter Klijn <klijn@astron.nl> Date: Thu, 26 Mar 2015 13:27:50 +0000 Subject: [PATCH] Task #7058: Small code changes based on review --- CEP/Pipeline/recipes/sip/master/imager_prepare.py | 6 +++--- CEP/Pipeline/recipes/sip/nodes/imager_prepare.py | 1 - CEP/Pipeline/recipes/sip/nodes/selfcal_bbs.py | 2 +- CEP/Pipeline/recipes/sip/tasks.cfg.in | 14 -------------- CEP/Pipeline/test/support/subprocessgroup_test.py | 2 +- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/CEP/Pipeline/recipes/sip/master/imager_prepare.py b/CEP/Pipeline/recipes/sip/master/imager_prepare.py index 3d06ab9dcd5..cbdfd7aa0ad 100644 --- a/CEP/Pipeline/recipes/sip/master/imager_prepare.py +++ b/CEP/Pipeline/recipes/sip/master/imager_prepare.py @@ -182,7 +182,7 @@ class imager_prepare(BaseRecipe, RemoteCommandRecipeMixIn): if item.skip == True: # assure that the mapfile is correct paths_to_image_mapfiles.append( - tuple([item.host, [], True])) + tuple(item.host, [], True)) continue #save the (input) ms, as a list of mapfiles @@ -228,7 +228,7 @@ class imager_prepare(BaseRecipe, RemoteCommandRecipeMixIn): # If this is an item that is skipped via the skip parameter in # the parset, append a skipped if item.skip: - slices.append(tuple([item.host, [], True])) + slices.append(tuple(item.host, [], True)) continue # we cannot use the skip iterator so we need to manually get the @@ -243,7 +243,7 @@ class imager_prepare(BaseRecipe, RemoteCommandRecipeMixIn): else: # Set the dataproduct to skipped!! item.skip = True - slices.append(tuple([item.host, [], True])) + slices.append(tuple(item.host, [], True)) msg = "Failed run on {0}. NOT Created: {1} ".format( item.host, item.file) self.logger.warn(msg) diff --git a/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py b/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py index 95d0f73da55..85cc566ba08 100644 --- a/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py +++ b/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py @@ -82,7 +82,6 @@ class imager_prepare(LOFARnodeTCP): time_slices_per_image, processed_ms_map, subbands_per_group, processed_ms_dir, parset, ndppp_executable) - # If no timeslices were created, bail out with exit status 1 if len(time_slices_path_list) == 0: self.logger.error("No timeslices were created.") diff --git a/CEP/Pipeline/recipes/sip/nodes/selfcal_bbs.py b/CEP/Pipeline/recipes/sip/nodes/selfcal_bbs.py index 41887989224..874d4f4d7c4 100644 --- a/CEP/Pipeline/recipes/sip/nodes/selfcal_bbs.py +++ b/CEP/Pipeline/recipes/sip/nodes/selfcal_bbs.py @@ -27,7 +27,7 @@ class selfcal_bbs(LOFARnodeTCP): 2. For each measurement set to calibrate start a subprocess 3. Check if the processes finished correctly 4. (added by Nicolas vilchez) concat in time the final MS - 5. (added by N.Vilchez) copy time slives directory to a new one + 5. (added by N.Vilchez) copy time slices directory to a new one """ def run(self, bbs_executable, parset, ms_list_path, parmdb_list_path, diff --git a/CEP/Pipeline/recipes/sip/tasks.cfg.in b/CEP/Pipeline/recipes/sip/tasks.cfg.in index e5fda2ffa1b..1282aa18d15 100644 --- a/CEP/Pipeline/recipes/sip/tasks.cfg.in +++ b/CEP/Pipeline/recipes/sip/tasks.cfg.in @@ -105,24 +105,10 @@ instrument_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/instrument.mapf sky_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/sky.mapfile data_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/bbs.mapfile - -[selfcal_prepare] -recipe = selfcal_prepare -ndppp_exec = %(lofarroot)s/bin/NDPPP -asciistat_executable = %(lofarroot)s/bin/asciistats.py -statplot_executable = %(lofarroot)s/bin/statsplot.py -msselect_executable = %(lofarroot)s/bin/msselect -rficonsole_executable = %(lofarroot)s/bin/rficonsole - [selfcal_awimager] recipe = selfcal_awimager executable = %(lofarroot)s/bin/awimager -[selfcal_create_dbs] -recipe = selfcal_create_dbs -parmdb_executable = %(lofarroot)s/bin/parmdbm -makesourcedb_path = %(lofarroot)s/bin/makesourcedb - [selfcal_bbs] recipe = selfcal_bbs bbs_executable = %(lofarroot)s/bin/bbs-reducer diff --git a/CEP/Pipeline/test/support/subprocessgroup_test.py b/CEP/Pipeline/test/support/subprocessgroup_test.py index 05963d9fd3f..290be2967ce 100644 --- a/CEP/Pipeline/test/support/subprocessgroup_test.py +++ b/CEP/Pipeline/test/support/subprocessgroup_test.py @@ -28,7 +28,7 @@ class SubProcessGroupTest(unittest.TestCase): def test_limit_number_of_proc(self): process_group = SubProcessGroup(polling_interval=1) - # wait for 5 seconds + # wait for 2 seconds cmd = "sleep 2" start_time = time.time() # Quickly start a large number of commands, assur -- GitLab