Skip to content

Commit

Permalink
Add first DL_calculation.py test and rename files.
Browse files Browse the repository at this point in the history
Adds a test for the `run_pelicun` function coming from the first
building assessment from R2D's current Example 1.
  • Loading branch information
ioannis-vm committed May 27, 2024
1 parent c92d253 commit c3b7e55
Show file tree
Hide file tree
Showing 16 changed files with 1,004 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pelicun/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def emit_warnings(self):
"""
for message in self.warning_stack:
if message not in self.emitted:
warnings.warn(message, PelicunWarning, stacklevel=2)
warnings.warn(message, PelicunWarning)
if self.warning_file is not None:
with open(self.warning_file, 'a', encoding='utf-8') as f:
f.write(
Expand Down
9 changes: 9 additions & 0 deletions pelicun/model/loss_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,15 @@ def load_sample(self, filepath):
self.sample = file_io.load_data(
filepath, self._asmnt.unit_conversion_factors, log=self._asmnt.log
)
self.sample.columns.names = [
'dv',
'loss',
'dmg',
'loc',
'dir',
'uid',
'block',
]

self.log.msg('Loss sample successfully loaded.', prepend_timestamp=False)

Expand Down
Loading

0 comments on commit c3b7e55

Please sign in to comment.