@@ -184,7 +184,7 @@ def parse_markdown_results_structured(markdown_text: str) -> dict:
184184 self .assertEqual (3.96 , results_in_markdown ['Well Drilling and Completion Cost' ]['value' ])
185185 self .assertEqual ('MUSD' , results_in_markdown ['Well Drilling and Completion Cost' ]['unit' ])
186186
187- class Q (HasQuantity ):
187+ class _Q (HasQuantity ):
188188 def __init__ (self , vu : dict [str , Any ]):
189189 self .value = vu ['value' ]
190190
@@ -193,10 +193,10 @@ def __init__(self, vu: dict[str, Any]):
193193
194194 self .CurrentUnits .value = vu ['unit' ]
195195
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 ()
197197 markdown_capex_USD_per_kW = (
198198 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
200200 )
201201 self .assertAlmostEqual (
202202 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]):
226226 del results_in_markdown [ignore_key ]
227227
228228 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