Skip to content

Add collector for East Devon District Council#114

Open
moley-bot[bot] wants to merge 4 commits intomainfrom
collector/EastDevonDistrictCouncil-issue-24-1768472613
Open

Add collector for East Devon District Council#114
moley-bot[bot] wants to merge 4 commits intomainfrom
collector/EastDevonDistrictCouncil-issue-24-1768472613

Conversation

@moley-bot
Copy link

@moley-bot moley-bot bot commented Jan 15, 2026

Summary

This PR adds a new bin collection data collector for East Devon District Council.

  • Implements ICollector interface
  • Adds integration tests
  • Successfully tested with example postcode from issue

Closes #24

Test Summary

 ==================== Test Summary ====================
 
 --------------------- Collector ----------------------
 
 East Devon District Council
 
 ------------------- Addresses (11) -------------------
 
 - 1 GLEBELANDS, SIDMOUTH,  EX10 8UB, EX10 8UB, 100040195502
 - 2 GLEBELANDS, SIDMOUTH,  EX10 8UB, EX10 8UB, 100040195503
 - 3 GLEBELANDS, SIDMOUTH,  EX10 8UB, EX10 8UB, 100040195504
 - 4 GLEBELANDS, SIDMOUTH,  EX10 8UB, EX10 8UB, 100040195505
 - 5 GLEBELANDS, SIDMOUTH,  EX10 8UB, EX10 8UB, 100040195506
 - ...
 
 --------------------- Bin Types ----------------------
 
 - Food Waste (Blue Caddy)
 - Garden Waste (Green)
 - General Waste (Black)
 - Recycling (Paper/Glass/Cardboard) (Green Box)
 - Recycling (Plastics/Tins) (Green Sack)
 
 ------------------- Bin Days (22) --------------------
 
 - 20/01/2026 (3 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
 
 - 27/01/2026 (3 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
 
 - 28/01/2026 (1 bins):
   - Garden Waste (Green)
 
 - 03/02/2026 (4 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
   - General Waste (Black)
 
 - 10/02/2026 (3 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
 
 - 11/02/2026 (1 bins):
   - Garden Waste (Green)
 
 - 17/02/2026 (3 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
 
 - 24/02/2026 (4 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
   - General Waste (Black)
 
 - 25/02/2026 (1 bins):
   - Garden Waste (Green)
 
 - 03/03/2026 (3 bins):
   - Recycling (Paper/Glass/Cardboard) (Green Box)
   - Recycling (Plastics/Tins) (Green Sack)
   - Food Waste (Blue Caddy)
 - ...
 
 ======================================================

Generated automatically by Moley-Bot using Codex CLI

Closes #24

Generated with Codex CLI by Moley-Bot
  Formatted by Moley-Bot
@BadgerHobbs
Copy link
Owner

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new collector for East Devon District Council, complete with integration tests. The implementation is solid and adheres well to the project's architecture for multi-step collectors.

My review focuses on a few minor style guide improvements, such as adding trailing commas and making bin names more descriptive, which will enhance code consistency. I've also identified a potential fragility in the date parsing logic and suggested a more robust regular expression-based approach.

Overall, this is a great contribution. The code is clean, well-structured, and the new collector is successfully tested.

@BadgerHobbs BadgerHobbs added the new collector Request for a new collector to be supported label Feb 1, 2026
@BadgerHobbs
Copy link
Owner

@claude Resolve PR comments, making sure to test new changes and check against style guide, making amendments as required.

@moley-bot
Copy link
Author

moley-bot bot commented Feb 3, 2026

Claude finished @BadgerHobbs's task in 2m 15s —— View job


Resolving PR Comments ✅

I've successfully addressed all the review comments from the PR reviews:

Changes Made

  1. Updated bin names to be more descriptive (lines 40, 47)

    • Changed Recycling (Paper/Glass/Cardboard)Paper, Glass & Cardboard Recycling
    • Changed Recycling (Plastics/Tins)Plastics & Tins Recycling
    • This follows style guide rule 599 to describe contents rather than container type
  2. Removed unnecessary postcode formatting (line 85)

    • Removed the WebUtility.UrlEncode(postcode) call
    • Simplified to use postcode directly in URL
  3. Removed unnecessary code (line 170)

    • Removed redundant var content = clientSideResponse.Content;
    • Used clientSideResponse.Content directly in the Regex call
  4. Added trailing commas in multi-line initializers (lines 92-94, 155-157)

    • Fixed Headers dictionary initialization formatting
    • Added proper line breaks and trailing commas per style guide rule 501
  5. Fixed date parsing to use Regex instead of Split (line 186)

    • Added new DayNumberRegex() method using [GeneratedRegex(@"\d+")]
    • Replaced fragile Split(" ")[0] with DayNumberRegex().Match(dateText).Value
    • This is more robust and handles date format variations better

Testing Note

I was unable to run build and test commands due to permission restrictions. The CI/CD pipeline will validate these changes when the PR is updated. All changes follow the repository's style guide and should pass automated checks.


Commit: 8dffaed |

- Update bin names to be more descriptive (Paper, Glass & Cardboard Recycling)
- Remove unnecessary postcode URL encoding
- Remove unnecessary content variable
- Add trailing commas and proper formatting for Headers dictionaries
- Replace fragile Split-based date parsing with Regex for robustness

Co-authored-by: Andrew Riggs <BadgerHobbs@users.noreply.github.com>
- Updated regex to capture only month name (year optional)
- Replaced DateOnly.ParseExact with ParseDateInferringYear extension
- Handles year transitions correctly (e.g., Dec -> Jan boundary)
- More resilient to website HTML format changes
- Follows style guide recommendation for date parsing

Co-authored-by: Andrew Riggs <BadgerHobbs@users.noreply.github.com>
@BadgerHobbs BadgerHobbs added the ready for deployment Implementation ready for deployment label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new collector Request for a new collector to be supported ready for deployment Implementation ready for deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

East Devon District Council

1 participant