Skip to content
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

fix: #918 update Barnsley parser to fix combined bin #921

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

ezramorris
Copy link
Contributor

Fixes #918

Barnsley parser was correctly splitting bins that appeared on "upcoming collections" but not "next collection". This change refactors the code to re-use the splitting logic in both places.

Also, an enhancement is added to ensure that bins are not added twice.

Output before change (as of today):

{
    "bins": [
        {
            "type": "Brown, Green bin",
            "collectionDate": "22/10/2024"
        },
        {
            "type": "Grey bin",
            "collectionDate": "29/10/2024"
        },
        {
            "type": "Blue bin",
            "collectionDate": "05/11/2024"
        },
        {
            "type": "Green bin",
            "collectionDate": "05/11/2024"
        },
        {
            "type": "Grey bin",
            "collectionDate": "12/11/2024"
        }
    ]
}

Output after change:

{
    "bins": [
        {
            "type": "Brown bin",
            "collectionDate": "22/10/2024"
        },
        {
            "type": "Green bin",
            "collectionDate": "22/10/2024"
        },
        {
            "type": "Grey bin",
            "collectionDate": "29/10/2024"
        },
        {
            "type": "Blue bin",
            "collectionDate": "05/11/2024"
        }
    ]
}

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.23%. Comparing base (4f93c5a) to head (f9c7e79).
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #921   +/-   ##
=======================================
  Coverage   97.23%   97.23%           
=======================================
  Files           4        4           
  Lines         253      253           
=======================================
  Hits          246      246           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ezramorris ezramorris changed the title Update Barnsley parser to fix combined bin (#918) fix: #918 update Barnsley parser to fix combined bin Oct 22, 2024
@ezramorris
Copy link
Contributor Author

Updated title

@robbrad robbrad merged commit c3db414 into robbrad:master Oct 22, 2024
9 of 10 checks passed
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.

Barnsley Metropolitan Borough Council - some bins are "doubled up"
2 participants