File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
10
10
11
11
### Added
12
12
- ML Enabled Galveston CGE [ #641 ] ( https://github.com/IN-CORE/pyincore/issues/641 )
13
+ - Add ML enabled Seaside CGE [ #657 ] ( https://github.com/IN-CORE/pyincore/issues/657 )
13
14
14
15
### Changed
15
16
- Descriptions of the analyses to be more verbose. [ #645 ] ( https://github.com/IN-CORE/pyincore/issues/645 )
@@ -18,8 +19,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
18
19
- Descriptions of the analyses to be more verbose. [ #647 ] ( https://github.com/IN-CORE/pyincore/issues/647 )
19
20
- Hazard service earthquake post method to allow user to specify soil type dataset [ #654 ] ( https://github.com/IN-CORE/pyincore/issues/654 )
20
21
21
- ### Added
22
- - Add ML enabled Seaside CGE [ # 657 ] ( https://github.com/IN-CORE/pyincore/issues/657 )
22
+ ### Fixed
23
+ - Building retrofit fails with local building dataset. [ # 617 ] ( https://github.com/IN-CORE/pyincore/issues/617 )
23
24
24
25
25
26
## [ 1.21.0] - 2025-02-12
Original file line number Diff line number Diff line change 13
13
# for evaluation of retrofit expression
14
14
import math # noqa: F401
15
15
import scipy # noqa: F401
16
+ import os
16
17
17
18
18
19
class DatasetUtil :
@@ -196,7 +197,12 @@ def _apply_retrofit_value(row):
196
197
197
198
# save the updated inventory to a new shapefile
198
199
tmpdirname = tempfile .mkdtemp ()
199
- file_path = f"{ tmpdirname } /tmp_updated_{ inventory_dataset .id } .shp"
200
+
201
+ inventory_dataset_id = inventory_dataset .id
202
+ # Check if inventory ID is a file path and if it is, just use the base name
203
+ if os .path .isdir (inventory_dataset_id ):
204
+ inventory_dataset_id = os .path .basename (inventory_dataset_id )
205
+ file_path = f"{ tmpdirname } /tmp_updated_{ inventory_dataset_id } .shp"
200
206
inventory_df .to_file (file_path )
201
207
202
208
# return the updated inventory dataset in geoDataframe for future consumption
You can’t perform that action at this time.
0 commit comments