Skip to content

Conversation

@rober3847
Copy link

@rober3847 rober3847 commented Nov 26, 2025

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

  • Bug Fixes
    • Updated collection schedules for Edinburgh with corrected 2025 start dates for recycling, glass, and refuse collections to ensure accurate scheduling information.

✏️ Tip: You can customize this high-level summary in your review settings.

… get_dates_every_x_days to generate a range of collection days. This range was coming to an end.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Edinburgh 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

Cohort / File(s) Change Summary
Date Configuration Update
uk_bin_collection/uk_bin_collection/councils/EdinburghCityCouncil.py
Updated collection start dates from 2024 to 2025 for recycling, glass, and refuse collection types in Week 1 (2025-11-03/10) and Week 2 (2025-11-10/03) branches. Date derivation logic unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify 2025 dates align with Edinburgh City Council's official collection calendar
  • Confirm both Week 1 and Week 2 branch dates are correctly swapped/adjusted

Poem

🐰✨ The calendar turns and dates renew,
From twenty-twenty-four to twenty-twenty-five, a simple switch we do,
November's bins shall roll anew,
With logic left untouched and true! 🗑️

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating EdinburghCityCouncil.py with new 2025 start dates, which directly addresses the PR's core objective of fixing date calculations for collection schedules.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 37c8a80 and 672d4d4.

📒 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/bash

Verify that November 3 and November 10, 2025 are Mondays

python3 << 'EOF'
from datetime import datetime

date1 = 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant