Skip to content

Commit

Permalink
fix(entry): Add regex check for input
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Dec 12, 2023
1 parent cdaaec2 commit fe7fc0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pollination/appendix_g_performance/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ class AppendixGPerformanceEntryPoint(DAG):
'--natural-gas-cost 0.09',
default='--electricity-cost 0.12 --natural-gas-cost 0.06 '
'--district-cooling-cost 0.04 --district-heating-cost 0.08',
alias=energy_costs_input
alias=energy_costs_input,
spec={
'type': 'string',
'pattern': '(?:\s|^)(?:(--electricity-cost|--district-cooling-cost|' \
'--district-heating-cost|--natural-gas-cost)\s+([0-9]+\.[0-9]+))' \
'(?=(?:\s|$|\1))'
}
)

electricity_emissions = Inputs.float(
Expand Down

0 comments on commit fe7fc0f

Please sign in to comment.