fix(ev): keep the BNetzA safety floor armed when it is set below 1 - #144
Conversation
A fractional or zero PUMPERLY_BNETZA_MIN_STATIONS floored to 0, and `refreshed < 0` is never true, so the guard on the two destructive sweeps silently disappeared. Values below 1 now fall back to the 10,000 default like non-numeric ones. Also fixes the README line that still said Open Charge Map covers every country.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesBNetzA minimum station floor validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The threshold safeguard, regression coverage, and source documentation are consistent with the stated behavior, so the change is mergeable. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PUMPERLY_BNETZA_MIN_STATIONS=0.5floored to0, andrefreshed < 0is never true, so the guard on the BNetzA scraper's two destructive sweeps (stale-row prune, Open Charge Map retirement) was silently gone for anyone who set a fractional or zero floor.base.run()still blocks a truly empty fetch, so this needed a misconfigured floor plus a degraded fetch to bite, but a guard that can be turned off by a typo is not a guard.Values that floor below 1 now fall back to the 10,000 default, the same as a non-numeric value. The regression test covers
0.5,0and-3and fails against the previous line.Also fixes the README feature bullet that still claimed Open Charge Map covers every country (Germany and Spain use their official registries).
Follow-up to #143, from CodeRabbit's post-merge finding.
Summary by CodeRabbit
Bug Fixes
Documentation