Skip to content

Commit

Permalink
Merge pull request #384 from OliverCullimore/164-316-362-363
Browse files Browse the repository at this point in the history
Add support for multiple councils using similar systems
  • Loading branch information
dp247 authored Oct 23, 2023
2 parents cf36a3b + 780f6b4 commit 15b9b60
Show file tree
Hide file tree
Showing 14 changed files with 737 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome3",
"definitions": {
"Welcome3": {
"type": "object",
"additionalProperties": false,
"properties": {
"bins": {
"type": "array",
"items": {
"$ref": "#/definitions/Bin"
}
}
},
"required": [
"bins"
],
"title": "Welcome3"
},
"Bin": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"collectionDate": {
"type": "string"
}
},
"required": [
"collectionDate",
"type"
],
"title": "Bin"
}
}
}
47 changes: 47 additions & 0 deletions uk_bin_collection/tests/council_schemas/GatesheadCouncil.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome10",
"definitions": {
"Welcome10": {
"type": "object",
"additionalProperties": false,
"properties": {
"bins": {
"type": "array",
"items": {
"$ref": "#/definitions/Bin"
}
}
},
"required": [
"bins"
],
"title": "Welcome10"
},
"Bin": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"$ref": "#/definitions/Type"
},
"collectionDate": {
"type": "string"
}
},
"required": [
"collectionDate",
"type"
],
"title": "Bin"
},
"Type": {
"type": "string",
"enum": [
"Recycling",
"Household Waste"
],
"title": "Type"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome4",
"definitions": {
"Welcome4": {
"type": "object",
"additionalProperties": false,
"properties": {
"bins": {
"type": "array",
"items": {
"$ref": "#/definitions/Bin"
}
}
},
"required": [
"bins"
],
"title": "Welcome4"
},
"Bin": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"$ref": "#/definitions/Type"
},
"collectionDate": {
"type": "string"
}
},
"required": [
"collectionDate",
"type"
],
"title": "Bin"
},
"Type": {
"type": "string",
"enum": [
"Recycling with food and garden",
"Rubbish",
"Recycling"
],
"title": "Type"
}
}
}
39 changes: 39 additions & 0 deletions uk_bin_collection/tests/council_schemas/WestLothianCouncil.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome7",
"definitions": {
"Welcome7": {
"type": "object",
"additionalProperties": false,
"properties": {
"bins": {
"type": "array",
"items": {
"$ref": "#/definitions/Bin"
}
}
},
"required": [
"bins"
],
"title": "Welcome7"
},
"Bin": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"collectionDate": {
"type": "string"
}
},
"required": [
"collectionDate",
"type"
],
"title": "Bin"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ Feature: Test each council output matches expected results in /outputs
| EastCambridgeshireCouncil |
| EastDevonDC |
| EastleighBoroughCouncil |
| EastLindseyDistrictCouncil |
| EastNorthamptonshireCouncil |
| EastRidingCouncil |
| EastSuffolkCouncil |
| ErewashBoroughCouncil |
| FenlandDistrictCouncil |
| GatesheadCouncil |
| GlasgowCityCouncil |
| GuildfordCouncil |
| HarrogateBoroughCouncil |
Expand Down Expand Up @@ -81,6 +83,7 @@ Feature: Test each council output matches expected results in /outputs
| SouthNorfolkCouncil |
| SouthOxfordshireCouncil |
| SouthTynesideCouncil |
| StaffordshireMoorlandsDistrictCouncil |
| StHelensBC |
| StockportBoroughCouncil |
| StratfordUponAvonCouncil |
Expand All @@ -95,6 +98,7 @@ Feature: Test each council output matches expected results in /outputs
| WaverleyBoroughCouncil |
| WealdenDistrictCouncil |
| WelhatCouncil |
| WestLothianCouncil |
| WiganBoroughCouncil |
| WiltshireCouncil |
| WindsorAndMaidenheadCouncil |
Expand Down
32 changes: 32 additions & 0 deletions uk_bin_collection/tests/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@
"url": "https://www.eastleigh.gov.uk/waste-bins-and-recycling/collection-dates/your-waste-bin-and-recycling-collections?uprn=",
"wiki_name": "Eastleigh Borough Council"
},
"EastLindseyDistrictCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"postcode": "LN4 4SY",
"house_number": "Raf Coningsby",
"url": "https://www.e-lindsey.gov.uk/",
"wiki_name": "East Lindsey District Council",
"wiki_note": "Pass the house name/number in the house number parameter, wrapped in double quotes"
},
"EastNorthamptonshireCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"uprn": "100031021317",
Expand Down Expand Up @@ -202,6 +210,14 @@
"url": "https://www.fenland.gov.uk/article/13114/",
"wiki_name": "Fenland District Council"
},
"GatesheadCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"postcode": "NE16 5LQ",
"house_number": "Bracken Cottage",
"url": "https://www.gateshead.gov.uk/",
"wiki_name": "Gateshead Council",
"wiki_note": "Pass the house name/number in the house number parameter, wrapped in double quotes"
},
"GlasgowCityCouncil": {
"url": "https://www.glasgow.gov.uk/forms/refuseandrecyclingcalendar/PrintCalendar.aspx?UPRN=906700034497",
"wiki_name": "Glasgow City Council",
Expand Down Expand Up @@ -480,6 +496,14 @@
"url": "https://www.southtyneside.gov.uk/article/33352/Bin-collection-dates",
"wiki_name": "South Tyneside Council"
},
"StaffordshireMoorlandsDistrictCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"postcode": "ST8 6HN",
"uprn": "100031863037",
"url": "https://www.staffsmoorlands.gov.uk/",
"wiki_name": "Staffordshire Moorlands District Council",
"wiki_note": "To get the UPRN, you can use [FindMyAddress](https://www.findmyaddress.co.uk/search)"
},
"StHelensBC": {
"SKIP_GET_URL": "SKIP_GET_URL",
"uprn": "39081672",
Expand Down Expand Up @@ -571,6 +595,14 @@
"url": "https://www.welhat.gov.uk/xfp/form/214",
"wiki_name": "Welhat Council"
},
"WestLothianCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"postcode": "EH52 5JE",
"house_number": "1 GOSCHEN PLACE",
"url": "https://www.westlothian.gov.uk/",
"wiki_name": "West Lothian Council",
"wiki_note": "Pass the house name/number in the house number parameter, wrapped in double quotes"
},
"WiganBoroughCouncil": {
"SKIP_GET_URL": "SKIP_GET_URL",
"postcode": "WN24UQ",
Expand Down
16 changes: 16 additions & 0 deletions uk_bin_collection/tests/outputs/EastLindseyDistrictCouncil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"bins": [
{
"type": "Paper (Purple-Lidded Bin)",
"collectionDate": "27/10/2023"
},
{
"type": "Domestic Waste (Black Bin)",
"collectionDate": "03/11/2023"
},
{
"type": "Recycling (Grey Bin)",
"collectionDate": "10/11/2023"
}
]
}
68 changes: 68 additions & 0 deletions uk_bin_collection/tests/outputs/GatesheadCouncil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"bins": [
{
"type": "Recycling",
"collectionDate": "02/01/2023"
},
{
"type": "Household Waste",
"collectionDate": "09/01/2023"
},
{
"type": "Recycling",
"collectionDate": "16/01/2023"
},
{
"type": "Household Waste",
"collectionDate": "23/01/2023"
},
{
"type": "Recycling",
"collectionDate": "30/01/2023"
},
{
"type": "Household Waste",
"collectionDate": "06/02/2023"
},
{
"type": "Recycling",
"collectionDate": "24/10/2023"
},
{
"type": "Household Waste",
"collectionDate": "31/10/2023"
},
{
"type": "Recycling",
"collectionDate": "07/11/2023"
},
{
"type": "Household Waste",
"collectionDate": "14/11/2023"
},
{
"type": "Recycling",
"collectionDate": "21/11/2023"
},
{
"type": "Household Waste",
"collectionDate": "28/11/2023"
},
{
"type": "Recycling",
"collectionDate": "05/12/2023"
},
{
"type": "Household Waste",
"collectionDate": "12/12/2023"
},
{
"type": "Recycling",
"collectionDate": "19/12/2023"
},
{
"type": "Household Waste",
"collectionDate": "27/12/2023"
}
]
}
Loading

0 comments on commit 15b9b60

Please sign in to comment.