Repository navigation
Conversation
- get_subpopulation_combined and get_subpopulation_combined_per_location_type iterate over all persons once instead of calling get_subpopulation, which iterates over all persons, for every location. - The logger in the graph ABM example counts persons per location and infection state in a single pass. - Document that get_subpopulation iterates over all persons and should not be called in loops.
xsaschako
marked this pull request as draft
October 8, 2026 16:32
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1595 +/- ##
==========================================
+ Coverage 97.44% 97.47% +0.02%
==========================================
Files 190 190
Lines 16035 16033 -2
==========================================
+ Hits 15626 15628 +2
+ Misses 409 405 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
get_subpopulation_combinedandget_subpopulation_combined_per_location_typenow iterate over all persons once, instead of callingget_subpopulation(which iterates over all persons) for every location.graph_abmexample counts persons per location and infection state in a single pass instead of callingget_subpopulationfor every location and infection state.get_subpopulationnotes that it iterates over all persons and should not be called in loops.If need be, add additional information and what the reviewer should look out for in particular:
LogInfectionState, is fixed in 1210 abm paper logger #1507. This PR covers the remaining callers.get_subpopulationitself keeps its signature and behavior.TestModel.getSubpopulationCombinednow covers this case.graph_abmlogger against the oldget_subpopulationcounts over a full run of the example: all 386,880 per location counts matched.Closes #1406
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)