Skip to content

Commit 5e07204

Browse files
committed
Use module names rather than obj for ease of use
1 parent c1e6096 commit 5e07204

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tlo/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(self):
6666
"""Make the event happen."""
6767

6868
# Dispatch notification that event is about to run
69-
notifier.dispatch("event.about_to_run", data={"target": self.target, "module" : self.module, "link_info" : {"EventName": type(self).__name__}})
69+
notifier.dispatch("event.about_to_run", data={"target": self.target, "module" : self.module.name, "link_info" : {"EventName": type(self).__name__}})
7070

7171
self.apply(self.target)
7272
self.post_apply_hook()

src/tlo/methods/collect_event_chains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def read_parameters(self, resourcefilepath: Optional[Path] = None):
5050
#print("resource file path", resourcefilepath)
5151
#self.load_parameters_from_dataframe(pd.read_csv(resourcefilepath/"ResourceFile_GenerateEventChains/parameter_values.csv"))
5252
self.parameters["generate_event_chains"] = True
53-
self.parameters["modules_of_interest"] = self.sim.modules.values()
53+
self.parameters["modules_of_interest"] = self.sim.modules.keys()
5454

5555
self.parameters["events_to_ignore"] =["AgeUpdateEvent","HealthSystemScheduler","SimplifiedBirthsPoll","DirectBirth","LifestyleEvent","TbActiveCasePollGenerateData","HivPollingEventForDataGeneration","RTIPollingEvent"]
5656

src/tlo/methods/hsi_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def run(self, squeeze_factor):
201201
"""Make the event happen."""
202202

203203
# Dispatch notification that HSI event is about to run
204-
notifier.dispatch("event.about_to_run", data={"target": self.target, "module" : self.module, "link_info" : {"EventName": type(self).__name__}})
204+
notifier.dispatch("event.about_to_run", data={"target": self.target, "module" : self.module.name, "link_info" : {"EventName": type(self).__name__}})
205205

206206
updated_appt_footprint = self.apply(self.target, squeeze_factor)
207207
self.post_apply_hook()

0 commit comments

Comments
 (0)