Skip to content

Commit 8863e00

Browse files
+3 more properties
1 parent a0c3f59 commit 8863e00

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/geophires_x/EconomicsSamCashFlow.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def single_value_row(row_name: str, single_value: float | None = None) -> list[A
101101

102102
def is_only_commas(s: str) -> bool:
103103
# TODO this is a silly way to test whether entries in row are None
104-
return re.match(r'^,+$', s)
104+
return re.match(r'^,+$', s) is not None
105105

106106
for line in lines:
107107
if is_only_commas(','.join(line)):
@@ -189,6 +189,9 @@ def is_only_commas(s: str) -> bool:
189189
'Debt up-front fee ($)': 'cost_debt_upfront',
190190
'Debt balance ($)': 'cf_debt_balance',
191191
'Debt total payment ($)': 'cf_debt_payment_total',
192+
'Federal income tax rate (frac)': 'cf_federal_tax_frac',
193+
'Cash available for debt service (CAFDS) ($)': 'cf_cash_for_ds',
194+
'DSCR (pre-tax)': 'cf_pretax_dscr',
192195
}
193196

194197

@@ -264,7 +267,10 @@ def data_preview(sg_2):
264267
# etc.
265268
return suggest
266269

267-
show_suggestions(next(it for it in display_name.lower().split(' ') if it.lower() != 'total'))
270+
try:
271+
show_suggestions(next(it for it in display_name.lower().split(' ') if it.lower() != 'total'))
272+
except StopIteration:
273+
_log.debug(f'No {ld} suggestions for "{display_name}" found')
268274

269275
except Exception as e:
270276
_log.debug(f'Encountered exception attempting to generate suggestions for {ld} for "{display_name}": {e}"')

0 commit comments

Comments
 (0)