Skip to content

Commit

Permalink
fix(daylight-factor): bump from version 0.4.1 to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari committed Feb 23, 2021
1 parent 4b17dd9 commit e70c074
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
_default_inputs = { 'grid_name': None,
'octree_file': None,
'params_folder': '__params',
'radiance_parameters': '-ab 2',
'radiance_parameters': '-ab 2 -aa 0.1 -ad 2048 -ar 64',
'sensor_count': 200,
'sensor_grid': None,
'simulation_folder': '.'}
Expand Down
11 changes: 8 additions & 3 deletions lbt_recipes/daylight_factor/flow/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'params_folder': '__params',
'radiance_parameters': '-ab 2 -aa 0.1 -ad 2048 -ar 64',
'sensor_count': 200,
'sensor_grid': '*',
'simulation_folder': '.'}


Expand Down Expand Up @@ -81,6 +82,10 @@ class CreateRadFolder(QueenbeeTask):
_input_params = luigi.DictParameter()

# Task inputs
@property
def sensor_grid(self):
return self._input_params['sensor_grid']

@property
def input_model(self):
value = self._input_params['model'].replace('\\', '/')
Expand All @@ -100,7 +105,7 @@ def params_folder(self):
return os.path.join(self.execution_folder, self._input_params['params_folder']).replace('\\', '/')

def command(self):
return 'honeybee-radiance translate model-to-rad-folder model.hbjson'
return 'honeybee-radiance translate model-to-rad-folder model.hbjson --grid "{sensor_grid}"'.format(sensor_grid=self.sensor_grid)

def output(self):
return {
Expand Down Expand Up @@ -159,7 +164,7 @@ def radiance_parameters(self):

@property
def grid_name(self):
return self.item['name']
return self.item['full_id']

@property
def octree_file(self):
Expand All @@ -169,7 +174,7 @@ def octree_file(self):

@property
def sensor_grid(self):
value = os.path.join(self.input()['CreateRadFolder']['model_folder'].path, 'grid/{item_name}.pts'.format(item_name=self.item['name'])).replace('\\', '/')
value = os.path.join(self.input()['CreateRadFolder']['model_folder'].path, 'grid/{item_full_id}.pts'.format(item_full_id=self.item['full_id'])).replace('\\', '/')
return value if os.path.isabs(value) \
else os.path.join(self.initiation_folder, value)

Expand Down
12 changes: 11 additions & 1 deletion lbt_recipes/daylight_factor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "MetaData",
"annotations": {},
"name": "daylight-factor",
"tag": "0.4.1",
"tag": "0.5.0",
"app_version": null,
"keywords": [
"honeybee",
Expand Down Expand Up @@ -131,6 +131,16 @@
"type": "integer",
"minimum": 1
}
},
{
"type": "DAGStringInput",
"annotations": {},
"name": "sensor-grid",
"description": "A grid name or a pattern to filter the sensor grids. By default all the grids in HBJSON model will be exported.",
"default": "*",
"alias": [],
"required": false,
"spec": null
}
],
"outputs": [
Expand Down
3 changes: 2 additions & 1 deletion lbt_recipes/daylight_factor/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

_recipe_default_inputs = { 'model': None,
'radiance_parameters': '-ab 2 -aa 0.1 -ad 2048 -ar 64',
'sensor_count': 200}
'sensor_count': 200,
'sensor_grid': '*'}


class LetDaylightFactorFly(luigi.WrapperTask):
Expand Down

0 comments on commit e70c074

Please sign in to comment.