Skip to content

Commit ad81953

Browse files
committed
clean up
1 parent dd68fa9 commit ad81953

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

bim2sim/plugins/PluginTEASER/bim2sim_teaser/examples/e1_simple_project_bps_teaser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def run_example_simple_building_teaser():
1616
"""
1717
# Create a temp directory for the project, feel free to use a "normal"
1818
# directory
19-
# ToDo set your project directory here
20-
project_path = Path(r"/home/chris/src/bim2sim_up/projects/e1")
19+
project_path = Path(tempfile.TemporaryDirectory(
20+
prefix='bim2sim_teaser_example_e1_').name)
2121

2222
# Set the ifc path to use and define which domain the IFC belongs to
2323
ifc_paths = {
@@ -50,8 +50,8 @@ def run_example_simple_building_teaser():
5050
Path(bim2sim.__file__).parent.parent /
5151
'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.mos')
5252
# Run a simulation directly with dymola after model creation
53-
project.sim_settings.dymola_simulation = False
54-
project.sim_settings.create_plots = False
53+
project.sim_settings.dymola_simulation = True
54+
project.sim_settings.create_plots = True
5555

5656
# Select results to output:
5757
project.sim_settings.sim_results = [

bim2sim/project.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def add_config_section(
4949
if not callable(getattr(sim_settings, attr)) and not
5050
attr.startswith('__')]
5151
for attr in attributes:
52-
# ToDo (chg-ext): value(defaul) here maybe already overwritten?
5352
default_value = getattr(sim_settings, attr).value
5453
if isinstance(default_value, Enum):
5554
default_value = str(default_value)
@@ -422,7 +421,6 @@ def run(self, interactive=False, cleanup=True):
422421
raise AssertionError("Project ist not set correctly!")
423422

424423
self.sim_settings.check_mandatory()
425-
426424
success = False
427425
if interactive:
428426
run = self._run_interactive
@@ -506,7 +504,6 @@ def finalize(self, success=False):
506504
self.logger.info(f'Project "{self.name}" finished successful')
507505

508506
# reset sim_settings:
509-
# Todo (chg-ext): Why load default settings here
510507
self.playground.sim_settings.load_default_settings()
511508
# clean logger
512509
log.teardown_loggers()

bim2sim/tasks/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class Playground:
7575
def __init__(self, project: Project):
7676
self.project = project
7777
self.sim_settings = project.plugin_cls.sim_settings()
78-
7978
self.sim_settings.update_from_config(config=project.config)
8079
self.state = {}
8180
self.history = []

test/unit/tasks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def setUp(self) -> None:
5151
def tearDown(self) -> None:
5252
"""Clean up after each test method."""
5353
self.helper.reset()
54-
#self.playground.sim_settings.load_default_settings()
5554
self.playground.sim_settings.load_default_settings()
5655

5756
def run_task(self, answers, reads):

test/unit/tasks/bps/test_enrich_use_cond.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def test_enrichment_single_office_common_conditions(self):
5454

5555
def test_enrichment_sim_setting_without_overwrite(self):
5656
"""Tests enrichment of single office without overwrite via settings."""
57-
# Todo (chg-ext): Side effect. Test runs separately, but not in context of the whole class
5857
print(self.playground.sim_settings.heating_tz_overwrite)
5958
print(self.playground.sim_settings.cooling_tz_overwrite)
6059
print(self.playground.sim_settings.ahu_tz_overwrite)

0 commit comments

Comments
 (0)