Skip to content

Commit

Permalink
Malaria methods resource file path
Browse files Browse the repository at this point in the history
  • Loading branch information
jkumwenda committed Jan 14, 2025
1 parent b1c079c commit c3545ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tlo/methods/malaria.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __init__(self, name=None):
'ma_iptp': Property(Types.BOOL, 'if woman has IPTp in current pregnancy'),
}

def read_parameters(self, resourcefilepath=None):
def read_parameters(self, resourcefilepath: Optional[Path] = None):
# workbook = pd.read_excel(resourcefilepath / 'malaria' / 'ResourceFile_malaria.xlsx', sheet_name=None)
workbook = read_csv_files(Path(resourcefilepath) / 'malaria' / 'ResourceFile_malaria', files=None)
self.load_parameters_from_dataframe(workbook['parameters'])
Expand All @@ -241,9 +241,9 @@ def read_parameters(self, resourcefilepath=None):
p['rdt_testing_rates'] = workbook['WHO_TestData2023']
p['highrisk_districts'] = workbook['highrisk_districts']

inf_inc_sheet = pd.read_csv(Path(resourcefilepath) / 'malaria' / 'ResourceFile_malaria_InfInc_expanded.csv')
clin_inc_sheet = pd.read_csv(Path(resourcefilepath) / 'malaria' / 'ResourceFile_malaria_ClinInc_expanded.csv')
sev_inc_sheet = pd.read_csv(Path(resourcefilepath) / 'malaria' / 'ResourceFile_malaria_SevInc_expanded.csv')
inf_inc_sheet = pd.read_csv(resourcefilepath / 'malaria' / 'ResourceFile_malaria_InfInc_expanded.csv')
clin_inc_sheet = pd.read_csv(resourcefilepath / 'malaria' / 'ResourceFile_malaria_ClinInc_expanded.csv')
sev_inc_sheet = pd.read_csv(resourcefilepath / 'malaria' / 'ResourceFile_malaria_SevInc_expanded.csv')

# load parameters for scale-up projections
p['scaleup_parameters'] = workbook["scaleup_parameters"]
Expand Down

0 comments on commit c3545ad

Please sign in to comment.