Skip to content

Commit

Permalink
fix(simulation): Add alias for measures and viz variables
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Sep 22, 2021
1 parent 35aed7d commit 7af8dcb
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
npm install @semantic-release/exec
- name: run semantic release
run:
npx semantic-release
npx semantic-release@^17.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_USERNAME: ${{ secrets.POLLINATION_PYPI_USERNAME }}
Expand Down
53 changes: 51 additions & 2 deletions pollination/alias/inputs/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,65 @@
]


"""Alias for inputs that expect a measures input."""
measures_input = [
InputAlias.list(
name='measures',
description='An optional list of measures to apply to the OpenStudio model '
'upon export. Use the "HB Load Measure" component to load a measure into '
'Grasshopper and assign input arguments. Measures can be downloaded from the '
'NREL Building Components Library (BCL) at (https://bcl.nrel.gov/).',
default='',
optional=True,
platform=['grasshopper'],
handler=[
IOAliasHandler(
language='python',
module='pollination_handlers.inputs.simulation',
function='measures_to_folder'
)
]
)
]


"""Alias for inputs that expect a IDF string input."""
idf_additional_strings_input = [
InputAlias.any(
InputAlias.list(
name='add_str',
description='THIS OPTION IS JUST FOR ADVANCED USERS OF ENERGYPLUS. '
'An additional text string to be appended to the IDF before '
'simulation. The input should include complete EnergyPlus objects as a '
'single string following the IDF format. This input can be used to include '
'EnergyPlus objects that are not currently supported by honeybee.',
default='',
platform=['grasshopper']
platform=['grasshopper'],
handler=[
IOAliasHandler(
language='python',
module='pollination_handlers.inputs.simulation',
function='list_to_additional_strings'
)
]
)
]


"""Alias for inputs that expect visualization variables."""
viz_variables_input = [
InputAlias.list(
name='viz_vars',
description='A list of text for EnergyPlus output variables to be visualized '
'on the geometry in an output HTML report. If unspecified, no report is '
'produced. For example, "Zone Air System Sensible Heating Rate".',
default='',
platform=['grasshopper'],
handler=[
IOAliasHandler(
language='python',
module='pollination_handlers.inputs.simulation',
function='viz_variables_to_string'
)
]
)
]

0 comments on commit 7af8dcb

Please sign in to comment.