@@ -184,7 +184,7 @@ def parse_markdown_results_structured(markdown_text: str) -> dict:
184
184
self .assertEqual (3.96 , results_in_markdown ['Well Drilling and Completion Cost' ]['value' ])
185
185
self .assertEqual ('MUSD' , results_in_markdown ['Well Drilling and Completion Cost' ]['unit' ])
186
186
187
- class Q (HasQuantity ):
187
+ class _Q (HasQuantity ):
188
188
def __init__ (self , vu : dict [str , Any ]):
189
189
self .value = vu ['value' ]
190
190
@@ -193,10 +193,10 @@ def __init__(self, vu: dict[str, Any]):
193
193
194
194
self .CurrentUnits .value = vu ['unit' ]
195
195
196
- capex_q = Q (results_in_markdown ['Project capital costs: Total CAPEX' ]).quantity ()
196
+ capex_q = _Q (results_in_markdown ['Project capital costs: Total CAPEX' ]).quantity ()
197
197
markdown_capex_USD_per_kW = (
198
198
capex_q .to ('USD' ).magnitude
199
- / Q (results_in_markdown ['Maximum Total Electricity Generation' ]).quantity ().to ('kW' ).magnitude
199
+ / _Q (results_in_markdown ['Maximum Total Electricity Generation' ]).quantity ().to ('kW' ).magnitude
200
200
)
201
201
self .assertAlmostEqual (
202
202
sig_figs (markdown_capex_USD_per_kW , 3 ), results_in_markdown ['Project capital costs: $/kW' ]['value' ]
@@ -226,3 +226,9 @@ def __init__(self, vu: dict[str, Any]):
226
226
del results_in_markdown [ignore_key ]
227
227
228
228
self .assertDictAlmostEqual (results_in_markdown , example_result_values_in_documentation , places = 3 )
229
+
230
+ result_capex_USD_per_kW = (
231
+ _Q (example_result ._get_result_field ('Total CAPEX' )).quantity ().to ('USD' ).magnitude
232
+ / _Q (example_result ._get_result_field ('Maximum Total Electricity Generation' )).quantity ().to ('kW' ).magnitude
233
+ )
234
+ self .assertAlmostEqual (sig_figs (result_capex_USD_per_kW , 3 ), sig_figs (markdown_capex_USD_per_kW , 3 ))
0 commit comments