-
Notifications
You must be signed in to change notification settings - Fork 179
Updated EdinburghCityCouncil.py with new 2025 start dates #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… get_dates_every_x_days to generate a range of collection days. This range was coming to an end.
WalkthroughEdinburgh City Council bin collection start dates updated from 2024 to 2025 (November 3 and 10). No logic modifications or structural changes; date calculations remain unchanged. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
uk_bin_collection/uk_bin_collection/councils/EdinburghCityCouncil.py (1)
45-51: Consider dynamic date calculation to reduce yearly maintenance.The hardcoded November 2025 dates solve the immediate issue but will require another update in late 2025. Since this is the second such update (2024 → 2025), consider calculating start dates dynamically relative to the current date to avoid repeated maintenance.
For example, you could calculate the most recent occurrence of the appropriate week/day combination. Would you like me to generate a refactored implementation that automatically determines appropriate start dates?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
uk_bin_collection/uk_bin_collection/councils/EdinburghCityCouncil.py(1 hunks)
🧰 Additional context used
🪛 Ruff (0.14.5)
uk_bin_collection/uk_bin_collection/councils/EdinburghCityCouncil.py
45-45: datetime may be undefined, or defined from star imports
(F405)
46-46: datetime may be undefined, or defined from star imports
(F405)
47-47: datetime may be undefined, or defined from star imports
(F405)
49-49: datetime may be undefined, or defined from star imports
(F405)
50-50: datetime may be undefined, or defined from star imports
(F405)
51-51: datetime may be undefined, or defined from star imports
(F405)
🔇 Additional comments (1)
uk_bin_collection/uk_bin_collection/councils/EdinburghCityCouncil.py (1)
45-51: I'll verify that the dates in the review comment are correct. Let me run the verification script to confirm November 3 and 10, 2025 are Mondays.
<function_calls>
#!/bin/bashVerify that November 3 and November 10, 2025 are Mondays
python3 << 'EOF'
from datetime import datetimedate1 = datetime(2025, 11, 3)
date2 = datetime(2025, 11, 10)print(f"November 3, 2025 is a {date1.strftime('%A')}")
print(f"November 10, 2025 is a {date2.strftime('%A')}")if date1.weekday() == 0 and date2.weekday() == 0:
print("✓ Both dates are Mondays")
else:
print("✗ Warning: Dates are not Mondays")
print(f" November 3, 2025 weekday: {date1.weekday()} (0=Monday, 6=Sunday)")
print(f" November 10, 2025 weekday: {date2.weekday()}")
EOF
</function_calls>
Needed to update the start dates in EdinburghCityCouncil.py to newer 2025 ones.
There start dates are used by get_dates_every_x_days to calculate a range of 28 dates. With the original dates being in 2024 the ranges calculated were coming to an end, which was preventing next collections from being added to HomeAssistants calendar.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.