1250 enhance testing logic in abm#1276
Merged
DavidKerkmann merged 40 commits intomainfrom Jul 28, 2025
Merged
Conversation
2 tasks
…enhance testing strategy checks
…g scheme handling in tests
…ance serialization, and improve test logic
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the testing logic for the ABM by simplifying testing criteria, updating the API for testing schemes, and improving serialization. Key changes include:
- Replacing previous testing scheme APIs (e.g. run_scheme) with new methods (run_scheme_and_check_if_test_positive and is_active with time parameter).
- Updating functions to add testing schemes by location type or id.
- Adapting tests and serialization accordingly.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cpp/tests/test_abm_testing_strategy.cpp | Refactored test cases to use new testing scheme API and updated evaluation logic. |
| cpp/tests/test_abm_serialization.cpp | Updated reference JSON keys to match the new serialization format. |
| cpp/tests/test_abm_model.cpp | Modified test scenarios to use the new location-based testing scheme assignment. |
| cpp/models/graph_abm/graph_abmodel.h | Updated testing scheme call to use the new run_strategy_and_check_if_entry_allowed API. |
| cpp/models/abm/testing_strategy.h | Removed outdated functions and updated API for adding testing schemes. |
| cpp/models/abm/testing_strategy.cpp | Changes to testing scheme activation and strategy evaluation logic. |
| cpp/models/abm/model.cpp | Modified integration of testing strategy in mobility methods. |
| cpp/benchmarks/abm.cpp | Replaced old API calls with the new testing scheme API for location types. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…th add_testing_scheme_location_type for consistency across examples
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1276 +/- ##
==========================================
- Coverage 97.32% 97.25% -0.07%
==========================================
Files 174 174
Lines 15122 15105 -17
==========================================
- Hits 14718 14691 -27
- Misses 404 414 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
xsaschako
commented
May 19, 2025
… consistency and readability across the codebase
…ction and update tests to remove direct calls
DavidKerkmann
requested changes
Jul 15, 2025
Member
DavidKerkmann
left a comment
There was a problem hiding this comment.
Thanks for the improvements and also the nice new tests!
There are only a couple of remarks and inquiries.
… despite positive test results; simplify home access check in TestingStrategy.
6549172 to
2f6f889
Compare
DavidKerkmann
approved these changes
Jul 28, 2025
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:
If need be, add additional information and what the reviewer should look out for in particular:
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)