Skip to content

Commit

Permalink
fix(daylight): Ensure Annual Daylight runs correctly with dynamic groups
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Oct 18, 2023
1 parent fe33fdc commit 09dfbe1
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This file is auto-generated from annual-daylight:0.10.9.
This file is auto-generated from annual-daylight:0.10.11.
It is unlikely that you should be editing this file directly.
Try to edit the original recipe itself and regenerate the code.
Expand Down Expand Up @@ -118,7 +118,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.231'
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.279'

@property
def image_workdir(self):
Expand Down Expand Up @@ -234,14 +234,14 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.231'
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.279'

@property
def image_workdir(self):
return '/home/ladybugbot/run'


class _AnnualDaylightPostProcess_025c6c2fOrchestrator(luigi.WrapperTask):
class _AnnualDaylightPostProcess_28ff6c38Orchestrator(luigi.WrapperTask):
"""Runs all the tasks in this module."""
# user input for this module
_input_params = luigi.DictParameter()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This file is auto-generated from annual-daylight:0.10.9.
This file is auto-generated from annual-daylight:0.10.11.
It is unlikely that you should be editing this file directly.
Try to edit the original recipe itself and regenerate the code.
Expand Down Expand Up @@ -110,7 +110,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -174,7 +174,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -234,7 +234,7 @@ def is_script(self):
return False

def command(self):
return 'honeybee-radiance sky mtx sky.wea --name sky --north {north} --sky-type {sky_type} --{cumulative} --{sun_up_hours} --{output_type} --output-format {output_format} --sky-density {sky_density}'.format(sky_density=self.sky_density, sun_up_hours=self.sun_up_hours, output_format=self.output_format, output_type=self.output_type, sky_type=self.sky_type, north=self.north, cumulative=self.cumulative)
return 'honeybee-radiance sky mtx sky.wea --name sky --north {north} --sky-type {sky_type} --{cumulative} --{sun_up_hours} --{output_type} --output-format {output_format} --sky-density {sky_density}'.format(sky_density=self.sky_density, cumulative=self.cumulative, output_format=self.output_format, sun_up_hours=self.sun_up_hours, sky_type=self.sky_type, output_type=self.output_type, north=self.north)

def output(self):
return {
Expand Down Expand Up @@ -271,7 +271,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -319,7 +319,7 @@ def is_script(self):
return False

def command(self):
return 'gendaymtx -n -D sunpath.mtx -M suns.mod -O{output_type} -r {north} -v sky.wea'.format(north=self.north, output_type=self.output_type)
return 'gendaymtx -n -D sunpath.mtx -M suns.mod -O{output_type} -r {north} -v sky.wea'.format(output_type=self.output_type, north=self.north)

def output(self):
return {
Expand Down Expand Up @@ -351,7 +351,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand All @@ -366,10 +366,6 @@ class CreateOctree(QueenbeeTask):
_status_lock = _queenbee_status_lock_

# Task inputs
black_out = luigi.Parameter(default='default')

include_aperture = luigi.Parameter(default='include')

@property
def model(self):
value = pathlib.Path(self.input()['CreateRadFolder']['model_folder'].path)
Expand Down Expand Up @@ -397,7 +393,7 @@ def is_script(self):
return False

def command(self):
return 'honeybee-radiance octree from-folder model --output scene.oct --{include_aperture}-aperture --{black_out}'.format(black_out=self.black_out, include_aperture=self.include_aperture)
return 'honeybee-radiance octree from-folder-static model --output scene.oct'

def requires(self):
return {'CreateRadFolder': CreateRadFolder(_input_params=self._input_params)}
Expand Down Expand Up @@ -427,12 +423,11 @@ def output_artifacts(self):
@property
def input_parameters(self):
return {
'black_out': self.black_out,
'include_aperture': self.include_aperture}
}

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -508,7 +503,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -567,7 +562,7 @@ def is_script(self):
return False

def command(self):
return 'honeybee-radiance grid split-folder ./input_folder ./output_folder {cpu_count} --grid-divisor {cpus_per_grid} --min-sensor-count {min_sensor_count}'.format(cpu_count=self.cpu_count, cpus_per_grid=self.cpus_per_grid, min_sensor_count=self.min_sensor_count)
return 'honeybee-radiance grid split-folder ./input_folder ./output_folder {cpu_count} --grid-divisor {cpus_per_grid} --min-sensor-count {min_sensor_count}'.format(cpus_per_grid=self.cpus_per_grid, cpu_count=self.cpu_count, min_sensor_count=self.min_sensor_count)

def requires(self):
return {'CreateRadFolder': CreateRadFolder(_input_params=self._input_params)}
Expand Down Expand Up @@ -625,14 +620,14 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
return '/home/ladybugbot/run'


class _AnnualDaylightPrepareFolder_025c6c2fOrchestrator(luigi.WrapperTask):
class _AnnualDaylightPrepareFolder_28ff6c38Orchestrator(luigi.WrapperTask):
"""Runs all the tasks in this module."""
# user input for this module
_input_params = luigi.DictParameter()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This file is auto-generated from annual-daylight:0.10.9.
This file is auto-generated from annual-daylight:0.10.11.
It is unlikely that you should be editing this file directly.
Try to edit the original recipe itself and regenerate the code.
Expand Down Expand Up @@ -124,7 +124,7 @@ def is_script(self):
return False

def command(self):
return 'honeybee-radiance dc scoeff scene.oct grid.pts sky.dome sky.mtx --sensor-count {sensor_count} --output results.ill --rad-params "{radiance_parameters}" --rad-params-locked "{fixed_radiance_parameters}" --conversion "{conversion}" --output-format {output_format} --order-by-{order_by} --{header}-header'.format(conversion=self.conversion, header=self.header, output_format=self.output_format, order_by=self.order_by, sensor_count=self.sensor_count, radiance_parameters=self.radiance_parameters, fixed_radiance_parameters=self.fixed_radiance_parameters)
return 'honeybee-radiance dc scoeff scene.oct grid.pts sky.dome sky.mtx --sensor-count {sensor_count} --output results.ill --rad-params "{radiance_parameters}" --rad-params-locked "{fixed_radiance_parameters}" --conversion "{conversion}" --output-format {output_format} --order-by-{order_by} --{header}-header'.format(order_by=self.order_by, sensor_count=self.sensor_count, fixed_radiance_parameters=self.fixed_radiance_parameters, output_format=self.output_format, conversion=self.conversion, header=self.header, radiance_parameters=self.radiance_parameters)

def output(self):
return {
Expand Down Expand Up @@ -166,7 +166,7 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance:1.65.32'
return 'docker.io/ladybugtools/honeybee-radiance:1.65.39'

@property
def image_workdir(self):
Expand Down Expand Up @@ -233,7 +233,7 @@ def is_script(self):
return False

def command(self):
return 'honeybee-radiance-postprocess post-process annual-daylight-file illuminance.ill sun-up-hours.txt --schedule schedule.txt {thresholds} --grid-name "{grid_name}" --sub-folder metrics'.format(thresholds=self.thresholds, grid_name=self.grid_name)
return 'honeybee-radiance-postprocess post-process annual-daylight-file illuminance.ill sun-up-hours.txt --schedule schedule.txt {thresholds} --grid-name "{grid_name}" --sub-folder metrics'.format(grid_name=self.grid_name, thresholds=self.thresholds)

def requires(self):
return {'TotalSky': TotalSky(_input_params=self._input_params)}
Expand Down Expand Up @@ -270,14 +270,14 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.231'
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.279'

@property
def image_workdir(self):
return '/home/ladybugbot/run'


class _AnnualDaylightRayTracing_025c6c2fOrchestrator(luigi.WrapperTask):
class _AnnualDaylightRayTracing_28ff6c38Orchestrator(luigi.WrapperTask):
"""Runs all the tasks in this module."""
# user input for this module
_input_params = luigi.DictParameter()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This file is auto-generated from annual-daylight:0.10.9.
This file is auto-generated from annual-daylight:0.10.11.
It is unlikely that you should be editing this file directly.
Try to edit the original recipe itself and regenerate the code.
Expand All @@ -17,9 +17,9 @@
from queenbee_local import QueenbeeTask
from queenbee_local import load_input_param as qb_load_input_param
from . import _queenbee_status_lock_
from .dependencies.annual_daylight_ray_tracing import _AnnualDaylightRayTracing_025c6c2fOrchestrator as AnnualDaylightRayTracing_025c6c2fWorkerbee
from .dependencies.annual_daylight_post_process import _AnnualDaylightPostProcess_025c6c2fOrchestrator as AnnualDaylightPostProcess_025c6c2fWorkerbee
from .dependencies.annual_daylight_prepare_folder import _AnnualDaylightPrepareFolder_025c6c2fOrchestrator as AnnualDaylightPrepareFolder_025c6c2fWorkerbee
from .dependencies.annual_daylight_ray_tracing import _AnnualDaylightRayTracing_28ff6c38Orchestrator as AnnualDaylightRayTracing_28ff6c38Workerbee
from .dependencies.annual_daylight_post_process import _AnnualDaylightPostProcess_28ff6c38Orchestrator as AnnualDaylightPostProcess_28ff6c38Workerbee
from .dependencies.annual_daylight_prepare_folder import _AnnualDaylightPrepareFolder_28ff6c38Orchestrator as AnnualDaylightPrepareFolder_28ff6c38Workerbee


_default_inputs = { 'cpu_count': 50,
Expand Down Expand Up @@ -105,7 +105,7 @@ def map_dag_inputs(self):
return inputs

def run(self):
yield [AnnualDaylightPrepareFolder_025c6c2fWorkerbee(_input_params=self.map_dag_inputs)]
yield [AnnualDaylightPrepareFolder_28ff6c38Workerbee(_input_params=self.map_dag_inputs)]
pathlib.Path(self.execution_folder).mkdir(parents=True, exist_ok=True)
self._copy_output_artifacts(self.execution_folder)
self._copy_output_parameters(self.execution_folder)
Expand Down Expand Up @@ -282,7 +282,7 @@ def map_dag_inputs(self):
return inputs

def run(self):
yield [AnnualDaylightRayTracing_025c6c2fWorkerbee(_input_params=self.map_dag_inputs)]
yield [AnnualDaylightRayTracing_28ff6c38Workerbee(_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!')
Expand Down Expand Up @@ -417,7 +417,7 @@ def map_dag_inputs(self):
return inputs

def run(self):
yield [AnnualDaylightPostProcess_025c6c2fWorkerbee(_input_params=self.map_dag_inputs)]
yield [AnnualDaylightPostProcess_28ff6c38Workerbee(_input_params=self.map_dag_inputs)]
pathlib.Path(self.execution_folder).mkdir(parents=True, exist_ok=True)
self._copy_output_artifacts(self.execution_folder)
self._copy_output_parameters(self.execution_folder)
Expand All @@ -431,6 +431,10 @@ def output(self):
'metrics': luigi.LocalTarget(
pathlib.Path(self.execution_folder, 'metrics').resolve().as_posix()
),

'grid_summary': luigi.LocalTarget(
pathlib.Path(self.execution_folder, 'grid_summary.csv').resolve().as_posix()
),
'is_done': luigi.LocalTarget(pathlib.Path(self.execution_folder, 'post_process_annual_daylight.done').resolve().as_posix())
}

Expand All @@ -442,6 +446,13 @@ def output_artifacts(self):
'to': pathlib.Path(self.execution_folder, 'metrics').resolve().as_posix(),
'optional': False,
'type': 'folder'
},

{
'name': 'grid-summary', 'from': 'grid_summary.csv',
'to': pathlib.Path(self.execution_folder, 'grid_summary.csv').resolve().as_posix(),
'optional': False,
'type': 'folder'
}]


Expand Down Expand Up @@ -530,14 +541,14 @@ def input_parameters(self):

@property
def task_image(self):
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.231'
return 'docker.io/ladybugtools/honeybee-radiance-postprocess:0.4.279'

@property
def image_workdir(self):
return '/home/ladybugbot/run'


class _Main_025c6c2fOrchestrator(luigi.WrapperTask):
class _Main_28ff6c38Orchestrator(luigi.WrapperTask):
"""Runs all the tasks in this module."""
# user input for this module
_input_params = luigi.DictParameter()
Expand Down
2 changes: 1 addition & 1 deletion lbt_recipes/annual_daylight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "MetaData",
"annotations": {},
"name": "annual-daylight",
"tag": "0.10.9",
"tag": "0.10.11",
"app_version": null,
"keywords": [
"honeybee",
Expand Down
6 changes: 3 additions & 3 deletions lbt_recipes/annual_daylight/run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This file is auto-generated from annual-daylight:0.10.9.
This file is auto-generated from annual-daylight:0.10.11.
It is unlikely that you should be editing this file directly.
Try to edit the original recipe itself and regenerate the code.
Expand All @@ -23,7 +23,7 @@
from queenbee_local import local_scheduler, _copy_artifacts, update_params, parse_input_args, LOGS_CONFIG
from luigi.execution_summary import LuigiStatusCode

import flow.main_025c6c2f as annual_daylight_workerbee
import flow.main_28ff6c38 as annual_daylight_workerbee


_recipe_default_inputs = { 'cpu_count': 50,
Expand All @@ -43,7 +43,7 @@ class LetAnnualDaylightFly(luigi.WrapperTask):
_input_params = luigi.DictParameter()

def requires(self):
yield [annual_daylight_workerbee._Main_025c6c2fOrchestrator(_input_params=self._input_params)]
yield [annual_daylight_workerbee._Main_28ff6c38Orchestrator(_input_params=self._input_params)]


def start(project_folder, user_values, workers):
Expand Down
10 changes: 5 additions & 5 deletions lbt_recipes/annual_daylight/status.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "d27c7143-e0e3-4b1b-9d1d-a0ea3657be78",
"id": "0c0bdc48-02d3-468b-84a3-56883c990c42",
"author": {
"id": "91d47029-1342-449f-b4ca-a6a7d9bfd9d1",
"account_type": "user",
Expand All @@ -24,7 +24,7 @@
"type": "MetaData",
"annotations": {},
"name": "annual-daylight",
"tag": "0.10.9",
"tag": "0.10.11",
"app_version": null,
"keywords": [
"honeybee",
Expand Down Expand Up @@ -1263,12 +1263,12 @@
}
],
"message": null,
"started_at": "2023-08-30T00:32:06+00:00",
"started_at": "2023-10-18T19:15:38+00:00",
"finished_at": null,
"source": null,
"api_version": "v1beta1",
"id": "d27c7143-e0e3-4b1b-9d1d-a0ea3657be78_00",
"job_id": "d27c7143-e0e3-4b1b-9d1d-a0ea3657be78",
"id": "0c0bdc48-02d3-468b-84a3-56883c990c42_00",
"job_id": "0c0bdc48-02d3-468b-84a3-56883c990c42",
"entrypoint": null,
"status": "Unknown",
"steps": {}
Expand Down

0 comments on commit 09dfbe1

Please sign in to comment.