def test_pipeline_raises_on_run_failure(self): task = t.Task('Failing Task') task.did_task_pass_validation = False task.task_function = lambda: None pipe = p.Pipeline() pipe.add_task(task) with self.assertRaises(ValueError): pipe.run()
def __init__(self, pipeline_configuration=None): self.name = 'mixed_commercial_residential' self.pipeline = p.Pipeline(self.name) self.artifact_root_dir = 'mix' self.run_dir = f'{time()}__{self.name}' if pipeline_configuration: # TODO: establish a configuration scheme for this to run dynamically pass else: self.create_tasks() self._verify_or_create_local_artifact_directory()
def __init__(self, pipeline_configuration=None): self.name = 'ceus' self.pipeline = p.Pipeline(self.name) # specify the logical directory structure for this pipeline execution self.artifact_root_dir = 'ceus' self.artifact_noaa_dir = 'ceus_noaa' self.artifact_tmy_base_dir = 'ceus_tmy_base' self.artifact_tmy_target_dir = 'ceus_tmy_target' self.artifact_target_weather_dir = 'target_weather' # the local directory where all the output images are saved for this pipeline run self.run_dir = f'{time()}__{self.name}' if pipeline_configuration: # TODO: establish a configuration scheme for this to run dynamically pass else: self.create_tasks() self._verify_or_create_local_artifact_directory()
def test_pipeline_only_accepts_task_instance(self): name = 'I am not of type <Task>!!!' pipe = p.Pipeline() with self.assertRaises(TypeError): pipe.add_task(name)