Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: command default #80

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion honeybee_doe2/cli/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def translate():

@click.option(
'--exclude-interior-walls', '-eit', help='Set to True to remove interior walls',
default=True, show_default=True, is_flag=True
default=False, show_default=True, is_flag=True
)

@click.option('--name', '-n', help='Name of the output file.', default='model',
Expand Down
24 changes: 24 additions & 0 deletions tests/exclude_true_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import pathlib

from honeybee_doe2.writer import honeybee_model_to_inp
from honeybee.model import Model

hvac_test = './tests/assets/multi_hvac.hbjson'
standard_test = './tests/assets/2023_rac_advanced_sample_project.hbjson'
air_wall_test = './tests/assets/Air_Wall_test.hbjson'

def test_hbjson_translate():
"""Test translating a HBJSON file to an inp file."""
hb_json = standard_test

out_inp = './tests/assets/sample_out'
out_file = pathlib.Path(out_inp, 'wall_test_model.inp')
# delete if exists
if out_file.exists():
out_file.unlink()
hb_model = Model.from_file(hb_json)
honeybee_model_to_inp(hb_model, hvac_mapping='model', exclude_interior_walls=True,
folder=out_inp, name='wall_test_model.inp')


out_file.unlink()
Loading