Skip to content

fix: EalingCouncil/LondonBoroughEaling: Use collectionDate not collectionDateString#1886

Closed
wjt wants to merge 1 commit into
robbrad:masterfrom
wjt:wjt/push-ynxzmkszwywl
Closed

fix: EalingCouncil/LondonBoroughEaling: Use collectionDate not collectionDateString#1886
wjt wants to merge 1 commit into
robbrad:masterfrom
wjt:wjt/push-ynxzmkszwywl

Conversation

@wjt
Copy link
Copy Markdown
Contributor

@wjt wjt commented Mar 16, 2026

These modules cannot parse the current data for my address, with the following error:

Failed setup, will retry: Unexpected error: unconverted data remains:
,24/03/2026

(I do not know which of the two almost identical implementations I am using - #1884.)

Looking at the council website's response to the POST request, included below after being pretty-printed with jq, the problem is that the garden waste bin has the following value for collectionDateString:

"collectionDateString": "24/03/2026,24/03/2026",

But the code expects this to contain a single date.

Instead, use the collectionDate property, which contains a list of dates, and take the first element. (The council website instead splits the collectionDateString on comma.)

Resolves #1885

Summary by CodeRabbit

  • Bug Fixes
    • Fixed collection date retrieval for Ealing Council services. Dates are now correctly parsed from API responses.

…tionDateString

These modules cannot parse the current data for my address, with the following error:

> Failed setup, will retry: Unexpected error: unconverted data remains:
> ,24/03/2026

(I do not know which of the two almost identical implementations I am using.)

Looking at the council website's response to the POST request, included below
after being pretty-printed with jq, the problem is that the garden waste bin has
the following value for collectionDateString:

    "collectionDateString": "24/03/2026,24/03/2026",

But the code expects this to contain a single date.

Instead, use the collectionDate property, which contains a list of dates, and
take the first element. (The council website instead splits the
collectionDateString on comma.)

Resolves robbrad#1885
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ca41e498-07c6-45d9-8af6-4dae58893a0b

📥 Commits

Reviewing files that changed from the base of the PR and between f5adb70 and 57c8b1a.

📒 Files selected for processing (2)
  • uk_bin_collection/uk_bin_collection/councils/EalingCouncil.py
  • uk_bin_collection/uk_bin_collection/councils/LondonBoroughEaling.py

📝 Walkthrough

Walkthrough

Two Ealing Council implementations are updated to extract collection dates from the collectionDate array instead of the collectionDateString field, which contains multiple comma-separated dates that fail parsing.

Changes

Cohort / File(s) Summary
Ealing Council Date Extraction
uk_bin_collection/uk_bin_collection/councils/EalingCouncil.py, uk_bin_collection/uk_bin_collection/councils/LondonBoroughEaling.py
Modified date extraction to use collectionDate[0] instead of collectionDateString, preventing parsing failures from multi-date comma-separated values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • dp247

Poem

🐰 A hop through the bins with glee,
Array parsing, as it should be!
No more commas to cause a fright,
Just the first date, clean and right! ♻️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: switching from using collectionDateString to collectionDate in the Ealing council modules.
Linked Issues check ✅ Passed The changes directly address issue #1885 by replacing collectionDateString with collectionDate[0], fixing the parsing failure for services with comma-separated dates.
Out of Scope Changes check ✅ Passed All changes are strictly scoped to fixing the date parsing issue in the two Ealing council modules as specified in the linked issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

@wjt
Copy link
Copy Markdown
Contributor Author

wjt commented Mar 16, 2026

The alternative is to add all elements of the array to the collection days, which is what the council website does:

image

but… what's the use in that.

@robbrad
Copy link
Copy Markdown
Owner

robbrad commented Mar 28, 2026

Merged into the combined March 2026 release PR #1898. Closing to reduce release noise. Thank you for the contribution!

@robbrad robbrad closed this Mar 28, 2026
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.

Ealing: "unconverted data remains: ,24/03/2026"

2 participants