Skip to content

Pass module name with consumables when tracking individual histories#1786

Merged
tamuri merged 4 commits intomasterfrom
molaro/fix-consumable-module-name
Jan 22, 2026
Merged

Pass module name with consumables when tracking individual histories#1786
tamuri merged 4 commits intomasterfrom
molaro/fix-consumable-module-name

Conversation

@marghe-molaro
Copy link
Copy Markdown
Collaborator

Fix dispatching of consumable access when tracking individual histories: it should be module's name, not module, that is passed to the dispatcher.

Additionally include small style fixes to the consumable logging (no need to log HSI name and module during cons accessed as this is redundant, and create a dictionary of useful info for each cons access rather than attaching cons access counter to info's name).

@marghe-molaro
Copy link
Copy Markdown
Collaborator Author

Only collect data to dispatch if there are any listeners, to ensure consumable tests pass

@marghe-molaro marghe-molaro marked this pull request as ready for review January 21, 2026 19:31
@marghe-molaro marghe-molaro requested a review from tamuri January 21, 2026 19:35
@marghe-molaro
Copy link
Copy Markdown
Collaborator Author

@tamuri tests are passing locally

Comment thread src/tlo/methods/individual_history_tracker.py Outdated
Simplify logic

Co-authored-by: Asif Tamuri <tamuri@gmail.com>
@tamuri tamuri merged commit a2d2ea7 into master Jan 22, 2026
67 checks passed
@tamuri tamuri deleted the molaro/fix-consumable-module-name branch January 22, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants