globalfund-pri / model_code_pipeline

Python code for MCP to read, check and analyse modelling output
0 stars 0 forks source link

Updated push of checks #36

Open MikaelaSmitGlobalFund opened 1 week ago

MikaelaSmitGlobalFund commented 1 week ago

This updates all the checks and sets up the malaria analysis class

MikaelaSmitGlobalFund commented 1 week ago

@tbhallett please note, before merging that the check def funding_vs_scenario_impact(self, db: Database): in common.checks.py does not work for HIV and throws up a formatting error. Maybe we could address this prior to merging?

tbhallett commented 1 week ago

(Confirming that, as of this point, the test test_ic7report.py is not working-- for reasons noted in line-comments below)

MikaelaSmitGlobalFund commented 1 week ago

Hi @tbhallett this branch is now ready to merge.

Could you review, when you have some time?

Please note that I made an update to the emulator.py which is shared between IC7 and IC8. You will see the change is that it gets the funding fractions for the given country, whereas before it was slice(None). The reason I made this change is because for HIV for BTN it has wanted to emulate for a funding fraction of 0.75 but this country had funding fractions of 0.6 and 0.8 only. Overall in HIV we have funding fractions of 0.7 and 0.8. So this part of the code was looking to slice BTN for 0.7 and 0.8. As BTN has no funding fraction of 0.7 it could not slice and returned an empty df.

I picked the above up when looking at the final report. It gave a central estimate but not LB and UB. The code seemed to be unable to interpret the empty rows for BTN in the function def _compute_mean_and_ci(_df_for_year: pd.DataFrame) in analysis.py.

Hope this is clear.

Mikaela