Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get resource file path from simulation #1375

Open
5 tasks
mnjowe opened this issue May 28, 2024 · 0 comments · May be fixed by #1406 or #1410
Open
5 tasks

Get resource file path from simulation #1375

mnjowe opened this issue May 28, 2024 · 0 comments · May be fixed by #1406 or #1410
Assignees

Comments

@mnjowe
Copy link
Collaborator

mnjowe commented May 28, 2024

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.

module.read_parameters('')

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

params_to_update = get_parameters_for_improved_healthsystem_and_healthcare_seeking(
resourcefilepath=self.resourcefilepath,
**self.parameters
)

xls = pd.ExcelFile(self.resourcefilepath / "ResourceFile_HIV.xlsx")

xls_tb = pd.ExcelFile(self.resourcefilepath / "ResourceFile_TB.xlsx")

jkumwenda added a commit that referenced this issue Jun 27, 2024
jkumwenda added a commit that referenced this issue Jun 27, 2024
@thewati thewati linked a pull request Jul 1, 2024 that will close this issue
@jkumwenda jkumwenda linked a pull request Jul 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Issues
Development

Successfully merging a pull request may close this issue.

3 participants