🔧 Improve Fraction Detection Logic to Prevent Misses#93
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce a new private method Changes
Assessment against linked issues
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
custom_components/recycle_app/api.py(2 hunks)
🔇 Additional comments (1)
custom_components/recycle_app/api.py (1)
198-205: Verify correctness of the date range logic and potential boundary edge cases.
You switched from a static “current year” approach to a dynamic one where the range starts from now.year - 1 if the current month is before June. Consider verifying that:
- Collection data is reliably provided for at least two calendar years.
- If
now.monthis January or February, the code captures the prior year's data (which may be necessary for early-year pickups scheduled the previous December). - If a user checks in late December, ensure that next year's data is still adequately fetched.
|
Regarding the question: "Unable to definitively confirm if more waste types are now retrievable from the changes" This update addresses the issue by implementing a wider date scan, enabling the detection of additional waste types. I've tested the fix with the issue's address, and the updated code successfully identifies previously missing waste types for that location. |
|
Tip For best results, initiate chat on the files or code changes. @olibos, thank you for clarifying how the wider date scan helps detect additional waste types. It’s great to hear that you’ve already tested the fix on the location with the previously missing types and confirmed they now appear. Please let me know if there’s anything else I can help with! ✏️ Learnings added
|
|
@coderabbitai resolve |
✅ Actions performedComments resolved. |
✨ Add zip code selection for entries with multiple names
|



Fix: #91
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
This is part 1 of 2 in a stack made with GitButler: