diff --git a/lbt_recipes/annual_daylight/flow/dependencies/annual_daylight_ray_tracing.py b/lbt_recipes/annual_daylight/flow/dependencies/annual_daylight_ray_tracing.py index 7aede0d8..f624a679 100644 --- a/lbt_recipes/annual_daylight/flow/dependencies/annual_daylight_ray_tracing.py +++ b/lbt_recipes/annual_daylight/flow/dependencies/annual_daylight_ray_tracing.py @@ -53,9 +53,7 @@ def fixed_radiance_parameters(self): def sensor_count(self): return self._input_params['sensor_count'] - @property - def conversion(self): - return '47.4 119.9 11.6' + conversion = luigi.Parameter(default='') header = luigi.Parameter(default='keep') @@ -148,36 +146,28 @@ class DirectSunlight(QueenbeeTask): _input_params = luigi.DictParameter() # Task inputs - @property - def name(self): - return self._input_params['grid_name'] - @property def radiance_parameters(self): return self._input_params['radiance_parameters'] @property def fixed_radiance_parameters(self): - return '-aa 0.0 -I -ab 0 -dc 1.0 -dt 0.0 -dj 0.0 -dr 0' + return '-aa 0.0 -I -faf -ab 0 -dc 1.0 -dt 0.0 -dj 0.0 -dr 0' @property def sensor_count(self): return self._input_params['sensor_count'] - @property - def conversion(self): - return '47.4 119.9 11.6' - - @property - def output_format(self): - return 'a' - calculate_values = luigi.Parameter(default='value') + conversion = luigi.Parameter(default='') + header = luigi.Parameter(default='keep') order_by = luigi.Parameter(default='sensor') + output_format = luigi.Parameter(default='a') + @property def modifiers(self): value = pathlib.Path(self._input_params['sun_modifiers']) @@ -225,7 +215,7 @@ def command(self): def output(self): return { 'result_file': luigi.LocalTarget( - pathlib.Path(self.execution_folder, '../final/direct/{name}.ill'.format(name=self.name)).resolve().as_posix() + pathlib.Path(self.execution_folder, 'direct_sunlight.ill').resolve().as_posix() ) } @@ -242,7 +232,7 @@ def output_artifacts(self): return [ { 'name': 'result-file', 'from': 'results.ill', - 'to': pathlib.Path(self.execution_folder, '../final/direct/{name}.ill'.format(name=self.name)).resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, 'direct_sunlight.ill').resolve().as_posix(), 'optional': False, 'type': 'file' }] @@ -259,7 +249,9 @@ class OutputMatrixMath(QueenbeeTask): def name(self): return self._input_params['grid_name'] - conversion = luigi.Parameter(default=' ') + @property + def conversion(self): + return '47.4 119.9 11.6' header = luigi.Parameter(default='remove') @@ -304,7 +296,7 @@ def requires(self): def output(self): return { 'results_file': luigi.LocalTarget( - pathlib.Path(self.execution_folder, '../final/total/{name}.ill'.format(name=self.name)).resolve().as_posix() + pathlib.Path(self.execution_folder, '../final/{name}.ill'.format(name=self.name)).resolve().as_posix() ) } @@ -320,7 +312,7 @@ def output_artifacts(self): return [ { 'name': 'results-file', 'from': 'final.ill', - 'to': pathlib.Path(self.execution_folder, '../final/total/{name}.ill'.format(name=self.name)).resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, '../final/{name}.ill'.format(name=self.name)).resolve().as_posix(), 'optional': False, 'type': 'file' }] @@ -345,9 +337,7 @@ def fixed_radiance_parameters(self): def sensor_count(self): return self._input_params['sensor_count'] - @property - def conversion(self): - return '47.4 119.9 11.6' + conversion = luigi.Parameter(default='') header = luigi.Parameter(default='keep') @@ -432,7 +422,7 @@ def output_artifacts(self): }] -class _AnnualDaylightRayTracing_ca03d759Orchestrator(luigi.WrapperTask): +class _AnnualDaylightRayTracing_4ea8b907Orchestrator(luigi.WrapperTask): """Runs all the tasks in this module.""" # user input for this module _input_params = luigi.DictParameter() diff --git a/lbt_recipes/annual_daylight/flow/main.py b/lbt_recipes/annual_daylight/flow/main.py index bfef6c89..4988c0c5 100644 --- a/lbt_recipes/annual_daylight/flow/main.py +++ b/lbt_recipes/annual_daylight/flow/main.py @@ -17,7 +17,7 @@ import pathlib from queenbee_local import QueenbeeTask from queenbee_local import load_input_param as qb_load_input_param -from .dependencies.annual_daylight_ray_tracing import _AnnualDaylightRayTracing_ca03d759Orchestrator as AnnualDaylightRayTracing_ca03d759Workerbee +from .dependencies.annual_daylight_ray_tracing import _AnnualDaylightRayTracing_4ea8b907Orchestrator as AnnualDaylightRayTracing_4ea8b907Workerbee _default_inputs = { 'cpu_count': 50, @@ -156,7 +156,7 @@ def map_dag_inputs(self): return inputs def run(self): - yield [AnnualDaylightRayTracing_ca03d759Workerbee(_input_params=self.map_dag_inputs)] + yield [AnnualDaylightRayTracing_4ea8b907Workerbee(_input_params=self.map_dag_inputs)] done_file = pathlib.Path(self.execution_folder, 'annual_daylight_raytracing.done') done_file.parent.mkdir(parents=True, exist_ok=True) done_file.write_text('done!') @@ -187,7 +187,7 @@ def items(self): return qb_load_input_param(self.sensor_grids) except: # it is a parameter - return pathlib.Path(self.input()['SplitGridFolder']['sensor_grids'].path).as_posix() + return self.input()['SplitGridFolder']['sensor_grids'].path def run(self): yield [AnnualDaylightRaytracingLoop(item=item, _input_params=self._input_params) for item in self.items] @@ -229,7 +229,7 @@ def thresholds(self): @property def folder(self): - value = pathlib.Path('results/total') + value = pathlib.Path('results') return value.as_posix() if value.is_absolute() \ else pathlib.Path(self.initiation_folder, value).resolve().as_posix() @@ -286,168 +286,6 @@ def output_artifacts(self): }] -class CopyGridInfo(QueenbeeTask): - """Copy a file or folder to a destination.""" - - # DAG Input parameters - _input_params = luigi.DictParameter() - - # Task inputs - @property - def src(self): - value = pathlib.Path(self.input()['CreateRadFolder']['sensor_grids_file'].path) - return value.as_posix() if value.is_absolute() \ - else pathlib.Path(self.initiation_folder, value).resolve().as_posix() - - @property - def execution_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def initiation_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def params_folder(self): - return pathlib.Path(self.execution_folder, self._input_params['params_folder']).resolve().as_posix() - - def command(self): - return 'echo copying input path...' - - def requires(self): - return {'CreateRadFolder': CreateRadFolder(_input_params=self._input_params)} - - def output(self): - return { - 'dst': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/direct/grids_info.json').resolve().as_posix() - ) - } - - @property - def input_artifacts(self): - return [ - {'name': 'src', 'to': 'input_path', 'from': self.src, 'optional': False}] - - @property - def output_artifacts(self): - return [ - { - 'name': 'dst', 'from': 'input_path', - 'to': pathlib.Path(self.execution_folder, 'results/direct/grids_info.json').resolve().as_posix(), - 'optional': False, - 'type': 'folder' - }] - - -class CopyRedistInfo(QueenbeeTask): - """Copy a file or folder to a destination.""" - - # DAG Input parameters - _input_params = luigi.DictParameter() - - # Task inputs - @property - def src(self): - value = pathlib.Path(self.input()['SplitGridFolder']['dist_info'].path) - return value.as_posix() if value.is_absolute() \ - else pathlib.Path(self.initiation_folder, value).resolve().as_posix() - - @property - def execution_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def initiation_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def params_folder(self): - return pathlib.Path(self.execution_folder, self._input_params['params_folder']).resolve().as_posix() - - def command(self): - return 'echo copying input path...' - - def requires(self): - return {'SplitGridFolder': SplitGridFolder(_input_params=self._input_params)} - - def output(self): - return { - 'dst': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'initial_results/final/direct/_redist_info.json').resolve().as_posix() - ) - } - - @property - def input_artifacts(self): - return [ - {'name': 'src', 'to': 'input_path', 'from': self.src, 'optional': False}] - - @property - def output_artifacts(self): - return [ - { - 'name': 'dst', 'from': 'input_path', - 'to': pathlib.Path(self.execution_folder, 'initial_results/final/direct/_redist_info.json').resolve().as_posix(), - 'optional': False, - 'type': 'folder' - }] - - -class CopySunUpHours(QueenbeeTask): - """Copy a file or folder to a destination.""" - - # DAG Input parameters - _input_params = luigi.DictParameter() - - # Task inputs - @property - def src(self): - value = pathlib.Path(self.input()['ParseSunUpHours']['sun_up_hours'].path) - return value.as_posix() if value.is_absolute() \ - else pathlib.Path(self.initiation_folder, value).resolve().as_posix() - - @property - def execution_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def initiation_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def params_folder(self): - return pathlib.Path(self.execution_folder, self._input_params['params_folder']).resolve().as_posix() - - def command(self): - return 'echo copying input path...' - - def requires(self): - return {'ParseSunUpHours': ParseSunUpHours(_input_params=self._input_params)} - - def output(self): - return { - 'dst': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/direct/sun-up-hours.txt').resolve().as_posix() - ) - } - - @property - def input_artifacts(self): - return [ - {'name': 'src', 'to': 'input_path', 'from': self.src, 'optional': False}] - - @property - def output_artifacts(self): - return [ - { - 'name': 'dst', 'from': 'input_path', - 'to': pathlib.Path(self.execution_folder, 'results/direct/sun-up-hours.txt').resolve().as_posix(), - 'optional': False, - 'type': 'folder' - }] - - class CreateDirectSky(QueenbeeTask): """Generate a sun-up sky matrix.""" @@ -686,7 +524,7 @@ def output(self): ), 'sensor_grids_file': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/total/grids_info.json').resolve().as_posix() + pathlib.Path(self.execution_folder, 'results/grids_info.json').resolve().as_posix() ), 'sensor_grids': luigi.LocalTarget( pathlib.Path( @@ -719,7 +557,7 @@ def output_artifacts(self): { 'name': 'sensor-grids-file', 'from': 'model/grid/_info.json', - 'to': pathlib.Path(self.execution_folder, 'results/total/grids_info.json').resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, 'results/grids_info.json').resolve().as_posix(), 'optional': False, 'type': 'file' }] @@ -942,7 +780,7 @@ def requires(self): def output(self): return { 'sun_up_hours': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/total/sun-up-hours.txt').resolve().as_posix() + pathlib.Path(self.execution_folder, 'results/sun-up-hours.txt').resolve().as_posix() ) } @@ -956,70 +794,12 @@ def output_artifacts(self): return [ { 'name': 'sun-up-hours', 'from': 'sun-up-hours.txt', - 'to': pathlib.Path(self.execution_folder, 'results/total/sun-up-hours.txt').resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, 'results/sun-up-hours.txt').resolve().as_posix(), 'optional': False, 'type': 'file' }] -class RestructureDirectResults(QueenbeeTask): - """Restructure files in a distributed folder.""" - - # DAG Input parameters - _input_params = luigi.DictParameter() - - # Task inputs - @property - def extension(self): - return 'ill' - - @property - def input_folder(self): - value = pathlib.Path('initial_results/final/direct') - return value.as_posix() if value.is_absolute() \ - else pathlib.Path(self.initiation_folder, value).resolve().as_posix() - - @property - def execution_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def initiation_folder(self): - return pathlib.Path(self._input_params['simulation_folder']).as_posix() - - @property - def params_folder(self): - return pathlib.Path(self.execution_folder, self._input_params['params_folder']).resolve().as_posix() - - def command(self): - return 'honeybee-radiance grid merge-folder ./input_folder ./output_folder {extension} --dist-info dist_info.json'.format(extension=self.extension) - - def requires(self): - return {'AnnualDaylightRaytracing': AnnualDaylightRaytracing(_input_params=self._input_params)} - - def output(self): - return { - 'output_folder': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/direct').resolve().as_posix() - ) - } - - @property - def input_artifacts(self): - return [ - {'name': 'input_folder', 'to': 'input_folder', 'from': self.input_folder, 'optional': False}] - - @property - def output_artifacts(self): - return [ - { - 'name': 'output-folder', 'from': 'output_folder', - 'to': pathlib.Path(self.execution_folder, 'results/direct').resolve().as_posix(), - 'optional': False, - 'type': 'folder' - }] - - class RestructureResults(QueenbeeTask): """Restructure files in a distributed folder.""" @@ -1033,7 +813,7 @@ def extension(self): @property def input_folder(self): - value = pathlib.Path('initial_results/final/total') + value = pathlib.Path('initial_results/final') return value.as_posix() if value.is_absolute() \ else pathlib.Path(self.initiation_folder, value).resolve().as_posix() @@ -1058,7 +838,7 @@ def requires(self): def output(self): return { 'output_folder': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'results/total').resolve().as_posix() + pathlib.Path(self.execution_folder, 'results').resolve().as_posix() ) } @@ -1072,7 +852,7 @@ def output_artifacts(self): return [ { 'name': 'output-folder', 'from': 'output_folder', - 'to': pathlib.Path(self.execution_folder, 'results/total').resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, 'results').resolve().as_posix(), 'optional': False, 'type': 'folder' }] @@ -1134,7 +914,7 @@ def output(self): ), 'dist_info': luigi.LocalTarget( - pathlib.Path(self.execution_folder, 'initial_results/final/total/_redist_info.json').resolve().as_posix() + pathlib.Path(self.execution_folder, 'initial_results/final/_redist_info.json').resolve().as_posix() ), 'sensor_grids': luigi.LocalTarget( pathlib.Path( @@ -1160,7 +940,7 @@ def output_artifacts(self): { 'name': 'dist-info', 'from': 'output_folder/_redist_info.json', - 'to': pathlib.Path(self.execution_folder, 'initial_results/final/total/_redist_info.json').resolve().as_posix(), + 'to': pathlib.Path(self.execution_folder, 'initial_results/final/_redist_info.json').resolve().as_posix(), 'optional': False, 'type': 'file' }] @@ -1170,7 +950,7 @@ def output_parameters(self): return [{'name': 'sensor-grids', 'from': 'output_folder/_info.json', 'to': pathlib.Path(self.params_folder, 'output_folder/_info.json').resolve().as_posix()}] -class _Main_ca03d759Orchestrator(luigi.WrapperTask): +class _Main_4ea8b907Orchestrator(luigi.WrapperTask): """Runs all the tasks in this module.""" # user input for this module _input_params = luigi.DictParameter() @@ -1182,4 +962,4 @@ def input_values(self): return params def requires(self): - yield [CalculateAnnualMetrics(_input_params=self.input_values), CopyGridInfo(_input_params=self.input_values), CopyRedistInfo(_input_params=self.input_values), CopySunUpHours(_input_params=self.input_values), RestructureDirectResults(_input_params=self.input_values)] + yield [CalculateAnnualMetrics(_input_params=self.input_values)] diff --git a/lbt_recipes/annual_daylight/package.json b/lbt_recipes/annual_daylight/package.json index 93d22593..864ba554 100644 --- a/lbt_recipes/annual_daylight/package.json +++ b/lbt_recipes/annual_daylight/package.json @@ -6,7 +6,7 @@ "type": "MetaData", "annotations": {}, "name": "annual-daylight", - "tag": "0.8.13", + "tag": "0.8.14", "app_version": null, "keywords": [ "honeybee", @@ -127,7 +127,7 @@ "type": "DAGFileInput", "annotations": {}, "name": "model", - "description": "A Honeybee model in HBJSON file format.", + "description": "A Honeybee Model JSON file (HBJSON) or a Model pkl (HBpkl) file. This can also be a zipped version of a Radiance folder, in which case this recipe will simply unzip the file and simulate it as-is.", "default": null, "alias": [ { @@ -187,7 +187,10 @@ "spec": null, "extensions": [ "json", - "hbjson" + "hbjson", + "pkl", + "hbpkl", + "zip" ] }, { @@ -491,7 +494,7 @@ "from": { "type": "FolderReference", "annotations": {}, - "path": "results/total" + "path": "results" }, "alias": [ { @@ -516,39 +519,6 @@ ], "required": true }, - { - "type": "DAGFolderOutput", - "annotations": {}, - "name": "results-direct", - "description": "Folder with raw result files (.ill) that contain matrices for just the direct illuminance.", - "from": { - "type": "FolderReference", - "annotations": {}, - "path": "results/direct" - }, - "alias": [ - { - "type": "DAGGenericOutputAlias", - "annotations": {}, - "name": "results_direct", - "description": "Raw result files (.ill) that contain matrices for just the direct illuminance.", - "platform": [ - "grasshopper" - ], - "handler": [ - { - "type": "IOAliasHandler", - "annotations": {}, - "language": "python", - "module": "pollination_handlers.outputs.daylight", - "function": "sort_ill_from_folder", - "index": 0 - } - ] - } - ], - "required": true - }, { "type": "DAGFolderOutput", "annotations": {}, diff --git a/lbt_recipes/annual_daylight/run.py b/lbt_recipes/annual_daylight/run.py index 3b6d8788..5fcacfd4 100644 --- a/lbt_recipes/annual_daylight/run.py +++ b/lbt_recipes/annual_daylight/run.py @@ -39,7 +39,7 @@ class LetAnnualDaylightFly(luigi.WrapperTask): _input_params = luigi.DictParameter() def requires(self): - yield [annual_daylight_workerbee._Main_ca03d759Orchestrator(_input_params=self._input_params)] + yield [annual_daylight_workerbee._Main_4ea8b907Orchestrator(_input_params=self._input_params)] def start(project_folder, user_values, workers): @@ -79,13 +79,17 @@ def start(project_folder, user_values, workers): with cfg_file.open('w') as lf: lf.write(LOGS_CONFIG.replace('WORKFLOW.LOG', log_file)) - luigi.build( + summary = luigi.build( [LetAnnualDaylightFly(_input_params=input_params)], local_scheduler=local_scheduler(), workers=workers, + detailed_summary=True, logging_conf_file=cfg_file.as_posix() ) + print(summary.summary_text) + print(f'More info:\n{log_file}') + if __name__ == '__main__': project_folder, user_values, workers = parse_input_args(sys.argv) diff --git a/lbt_recipes/annual_irradiance/flow/dependencies/annual_irradiance_ray_tracing.py b/lbt_recipes/annual_irradiance/flow/dependencies/annual_irradiance_ray_tracing.py index a005e9b7..318a23c7 100644 --- a/lbt_recipes/annual_irradiance/flow/dependencies/annual_irradiance_ray_tracing.py +++ b/lbt_recipes/annual_irradiance/flow/dependencies/annual_irradiance_ray_tracing.py @@ -16,6 +16,7 @@ import os import pathlib from queenbee_local import QueenbeeTask +from queenbee_local import load_input_param as qb_load_input_param _default_inputs = { 'bsdfs': None, @@ -431,7 +432,7 @@ def output_artifacts(self): }] -class _AnnualIrradianceRayTracing_2c2db9eeOrchestrator(luigi.WrapperTask): +class _AnnualIrradianceRayTracing_41c3cd0bOrchestrator(luigi.WrapperTask): """Runs all the tasks in this module.""" # user input for this module _input_params = luigi.DictParameter() diff --git a/lbt_recipes/annual_irradiance/flow/main.py b/lbt_recipes/annual_irradiance/flow/main.py index de88b104..43cfd115 100644 --- a/lbt_recipes/annual_irradiance/flow/main.py +++ b/lbt_recipes/annual_irradiance/flow/main.py @@ -16,7 +16,8 @@ import os import pathlib from queenbee_local import QueenbeeTask -from .dependencies.annual_irradiance_ray_tracing import _AnnualIrradianceRayTracing_2c2db9eeOrchestrator as AnnualIrradianceRayTracing_2c2db9eeWorkerbee +from queenbee_local import load_input_param as qb_load_input_param +from .dependencies.annual_irradiance_ray_tracing import _AnnualIrradianceRayTracing_41c3cd0bOrchestrator as AnnualIrradianceRayTracing_41c3cd0bWorkerbee _default_inputs = { 'cpu_count': 50, @@ -155,7 +156,7 @@ def map_dag_inputs(self): return inputs def run(self): - yield [AnnualIrradianceRayTracing_2c2db9eeWorkerbee(_input_params=self.map_dag_inputs)] + yield [AnnualIrradianceRayTracing_41c3cd0bWorkerbee(_input_params=self.map_dag_inputs)] done_file = pathlib.Path(self.execution_folder, 'annual_irradiance_raytracing.done') done_file.parent.mkdir(parents=True, exist_ok=True) done_file.write_text('done!') @@ -183,10 +184,10 @@ def sensor_grids(self): def items(self): try: # assume the input is a file - return QueenbeeTask.load_input_param(self.sensor_grids) + return qb_load_input_param(self.sensor_grids) except: # it is a parameter - return pathlib.Path(self.input()['SplitGridFolder']['sensor_grids'].path).as_posix() + return self.input()['SplitGridFolder']['sensor_grids'].path def run(self): yield [AnnualIrradianceRaytracingLoop(item=item, _input_params=self._input_params) for item in self.items] @@ -1183,7 +1184,7 @@ def output_parameters(self): return [{'name': 'sensor-grids', 'from': 'output_folder/_info.json', 'to': pathlib.Path(self.params_folder, 'output_folder/_info.json').resolve().as_posix()}] -class _Main_2c2db9eeOrchestrator(luigi.WrapperTask): +class _Main_41c3cd0bOrchestrator(luigi.WrapperTask): """Runs all the tasks in this module.""" # user input for this module _input_params = luigi.DictParameter() diff --git a/lbt_recipes/annual_irradiance/package.json b/lbt_recipes/annual_irradiance/package.json index 67dc4b0a..f193cd6a 100644 --- a/lbt_recipes/annual_irradiance/package.json +++ b/lbt_recipes/annual_irradiance/package.json @@ -6,7 +6,7 @@ "type": "MetaData", "annotations": {}, "name": "annual-irradiance", - "tag": "0.2.4", + "tag": "0.3.1", "app_version": null, "keywords": [ "honeybee", @@ -127,7 +127,7 @@ "type": "DAGFileInput", "annotations": {}, "name": "model", - "description": "A Honeybee model in HBJSON file format.", + "description": "A Honeybee Model JSON file (HBJSON) or a Model pkl (HBpkl) file. This can also be a zipped version of a Radiance folder, in which case this recipe will simply unzip the file and simulate it as-is.", "default": null, "alias": [ { @@ -187,7 +187,10 @@ "spec": null, "extensions": [ "json", - "hbjson" + "hbjson", + "pkl", + "hbpkl", + "zip" ] }, { @@ -473,6 +476,39 @@ } ], "required": true + }, + { + "type": "DAGFolderOutput", + "annotations": {}, + "name": "results-direct", + "description": "Folder with raw result files (.ill) that contain matrices for just the direct irradiance.", + "from": { + "type": "FolderReference", + "annotations": {}, + "path": "results/direct" + }, + "alias": [ + { + "type": "DAGGenericOutputAlias", + "annotations": {}, + "name": "direct", + "description": "Raw result files (.ill) that contain irradiance matrices for the direct radiation at each sensor and timestep.", + "platform": [ + "grasshopper" + ], + "handler": [ + { + "type": "IOAliasHandler", + "annotations": {}, + "language": "python", + "module": "pollination_handlers.outputs.daylight", + "function": "sort_ill_from_folder", + "index": 0 + } + ] + } + ], + "required": true } ] } \ No newline at end of file diff --git a/lbt_recipes/annual_irradiance/run.py b/lbt_recipes/annual_irradiance/run.py index caf38c3c..61d1b56e 100644 --- a/lbt_recipes/annual_irradiance/run.py +++ b/lbt_recipes/annual_irradiance/run.py @@ -39,7 +39,7 @@ class LetAnnualIrradianceFly(luigi.WrapperTask): _input_params = luigi.DictParameter() def requires(self): - yield [annual_irradiance_workerbee._Main_2c2db9eeOrchestrator(_input_params=self._input_params)] + yield [annual_irradiance_workerbee._Main_41c3cd0bOrchestrator(_input_params=self._input_params)] def start(project_folder, user_values, workers): @@ -79,13 +79,17 @@ def start(project_folder, user_values, workers): with cfg_file.open('w') as lf: lf.write(LOGS_CONFIG.replace('WORKFLOW.LOG', log_file)) - luigi.build( + summary = luigi.build( [LetAnnualIrradianceFly(_input_params=input_params)], local_scheduler=local_scheduler(), workers=workers, + detailed_summary=True, logging_conf_file=cfg_file.as_posix() ) + print(summary.summary_text) + print(f'More info:\n{log_file}') + if __name__ == '__main__': project_folder, user_values, workers = parse_input_args(sys.argv) diff --git a/tests/recipes_test.py b/tests/recipes_test.py index 67a44098..94197f06 100644 --- a/tests/recipes_test.py +++ b/tests/recipes_test.py @@ -31,8 +31,7 @@ def run_daylight_recipe(recipe_name, extension): '--name', name, ] + env_args ) assert result.exit_code == 0 - results_folder = os.path.join(sim_folder, 'results', 'total') \ - if extension == 'ill' else os.path.join(sim_folder, 'results') + results_folder = os.path.join(sim_folder, 'results') assert os.path.isfile(os.path.join(results_folder, f'TestRoom_1.{extension}')) assert os.path.isfile(os.path.join(results_folder, f'TestRoom_2.{extension}')) nukedir(sim_folder, True)