Description
It could have been good if disease modules could be getting resource file path from simulation instead of each defining its own resource file path. This implementation is good as it makes us avoid repetition. In line with this view, the below line of code in simulation could be supplied self.resourcefilepath
instead of passing an empty string. Thereafter modules could get the resource file path via the def read_parameters(self, data_folder)
method.
TLOmodel/src/tlo/simulation.py
Line 168 in 6494277
Tasks
- Pass resource file path to simulation object
- Extend the resource file path to disease modules via
self.read_parameters()
- Make disease modules get the path from simulation in
def read_parameters()
method(rename data_folder argument to resourcefilepath). Delete redundant paths in each disease module - Resolve all issues arising from resource file paths used outside
def read_parameters()
method. @matt-graham arleady sent some links of those other places. see the links below - add a test to ensure everything is working as expected
TLOmodel/src/tlo/methods/scenario_switcher.py
Lines 51 to 54 in 5c5bb25
TLOmodel/src/tlo/methods/hiv_tb_calibration.py
Lines 63 to 64 in 5c5bb25