Skip to content

Commit

Permalink
sc_gid now output in bespoke meta
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Jun 11, 2024
1 parent 13ae7b5 commit d55cc45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions reV/bespoke/bespoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -2213,6 +2213,7 @@ def meta(self):
meta = pd.concat(meta, axis=0)
else:
meta = meta[0]
meta.index.name = SupplyCurveField.SC_GID
return meta

@property
Expand Down
5 changes: 3 additions & 2 deletions tests/test_bespoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"(0.0975 * capital_cost + fixed_operating_cost) "
"/ aep + variable_operating_cost"
)
EXPECTED_META_COLUMNS = [SupplyCurveField.SC_POINT_GID,
EXPECTED_META_COLUMNS = [SupplyCurveField.SC_GID,
SupplyCurveField.SC_POINT_GID,
SupplyCurveField.TURBINE_X_COORDS,
SupplyCurveField.TURBINE_Y_COORDS,
SupplyCurveField.RES_GIDS,
Expand Down Expand Up @@ -603,7 +604,7 @@ def test_bespoke():
assert out_fpath_truth == test_fpath
assert os.path.exists(out_fpath_truth)
with Resource(out_fpath_truth) as f:
meta = f.meta
meta = f.meta.reset_index()
assert len(meta) <= len(points)
for col in EXPECTED_META_COLUMNS:
assert col in meta
Expand Down

0 comments on commit d55cc45

Please sign in to comment.