fix: guard CI variable access in plot_frequencies_time_series and plo…#1037
Open
adilraza99 wants to merge 6 commits intomalariagen:masterfrom
Open
fix: guard CI variable access in plot_frequencies_time_series and plo…#1037adilraza99 wants to merge 6 commits intomalariagen:masterfrom
adilraza99 wants to merge 6 commits intomalariagen:masterfrom
Conversation
0188ead to
3cb8e06
Compare
3cb8e06 to
d5dd128
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1037 +/- ##
==========================================
+ Coverage 90.08% 90.12% +0.03%
==========================================
Files 50 50
Lines 5428 5456 +28
==========================================
+ Hits 4890 4917 +27
- Misses 538 539 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hi @jonbrenas, Would appreciate your thoughts on this approach. Please let me know if there’s anything else that should be adjusted or improved here. |
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.
Summary
plot_frequencies_time_series()assumes that confidence interval variables (event_frequency_ci_low,event_frequency_ci_upp) are always present in the input dataset.However, these variables are only added when
ci_methodis notNone. When datasets are generated withci_method=None, the plotting function raises aKeyError.Fix
Guard access to CI variables in the plotting layer.
The same guard is applied to
plot_frequencies_map_markers()to ensure consistent behaviour across frequency plotting functions.Tests
Added tests covering datasets both with and without CI variables to ensure:
Fixes #1035