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

New source: BIR #1397

Merged
merged 2 commits into from
Nov 9, 2023
Merged

New source: BIR #1397

merged 2 commits into from
Nov 9, 2023

Conversation

odin-h
Copy link
Contributor

@odin-h odin-h commented Nov 9, 2023

Source for https://bir.no/

@5ila5
Copy link
Collaborator

5ila5 commented Nov 9, 2023

Thanks for your contribution.

Did some reformatting ran the update_docu_links.py script, added test cases, made house letter optional, and added some comments to the md file.

@5ila5 5ila5 merged commit 70392d5 into mampfes:master Nov 9, 2023
1 check passed
@odin-h
Copy link
Contributor Author

odin-h commented Nov 9, 2023

I see you've used spaces between the house number and letter in the test case keys. Not sure if that would cause the test to fail since BIR does not return any results if you separate them when making a regular search on the website. I also noticed I've forgotten to change the key name for the test case I used when I made the PR. It should not be "Villa Paradiso". That's a remnant from me referencing oslokommune_no.py when I implemented this source.

@5ila5
Copy link
Collaborator

5ila5 commented Nov 9, 2023

The test case key is just the name of the test listed above the results when calling the test. Only the arguments relevant and there are no spaces (noticed naming of test cases is slightly wrong but not a major problem as the real address is easily recognisable by the actual test case)

Test are all running fine:

➜ ./custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py -s bir_no     
Testing source bir_no ...
  found 20 entries for Villa Paradiso
  found 30 entries for Mardalsrenen 12 B
  found 22 entries for Alf Bondes Veg 13 B
./custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py -s bir_no -lit
❯ ./custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py -s bir_no -lit 
Testing source bir_no ...
  found 20 entries for Villa Paradiso
    2023-11-24 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-11-07 : Restavfall [mdi:trash-can]
    2023-11-14 : Restavfall [mdi:trash-can]
    2023-11-21 : Restavfall [mdi:trash-can]
    2023-11-28 : Restavfall [mdi:trash-can]
    2023-12-22 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-12-05 : Restavfall [mdi:trash-can]
    2023-12-12 : Restavfall [mdi:trash-can]
    2023-12-19 : Restavfall [mdi:trash-can]
    2024-01-19 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-01-02 : Restavfall [mdi:trash-can]
    2024-01-09 : Restavfall [mdi:trash-can]
    2024-01-16 : Restavfall [mdi:trash-can]
    2024-01-23 : Restavfall [mdi:trash-can]
    2024-01-30 : Restavfall [mdi:trash-can]
    2024-02-16 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-02-06 : Restavfall [mdi:trash-can]
    2024-02-13 : Restavfall [mdi:trash-can]
    2024-02-20 : Restavfall [mdi:trash-can]
    2024-02-27 : Restavfall [mdi:trash-can]
  found 30 entries for Mardalsrenen 12 B
    2023-11-14 : Matavfall [mdi:trash-can]
    2023-11-28 : Matavfall [mdi:trash-can]
    2023-11-21 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-11-01 : Restavfall [mdi:trash-can]
    2023-11-08 : Restavfall [mdi:trash-can]
    2023-11-15 : Restavfall [mdi:trash-can]
    2023-11-22 : Restavfall [mdi:trash-can]
    2023-11-29 : Restavfall [mdi:trash-can]
    2023-12-12 : Matavfall [mdi:trash-can]
    2023-12-27 : Matavfall [mdi:trash-can]
    2023-12-19 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-12-06 : Restavfall [mdi:trash-can]
    2023-12-13 : Restavfall [mdi:trash-can]
    2023-12-20 : Restavfall [mdi:trash-can]
    2023-12-27 : Restavfall [mdi:trash-can]
    2024-01-09 : Matavfall [mdi:trash-can]
    2024-01-23 : Matavfall [mdi:trash-can]
    2024-01-16 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-01-03 : Restavfall [mdi:trash-can]
    2024-01-10 : Restavfall [mdi:trash-can]
    2024-01-17 : Restavfall [mdi:trash-can]
    2024-01-24 : Restavfall [mdi:trash-can]
    2024-01-31 : Restavfall [mdi:trash-can]
    2024-02-06 : Matavfall [mdi:trash-can]
    2024-02-20 : Matavfall [mdi:trash-can]
    2024-02-13 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-02-07 : Restavfall [mdi:trash-can]
    2024-02-14 : Restavfall [mdi:trash-can]
    2024-02-21 : Restavfall [mdi:trash-can]
    2024-02-28 : Restavfall [mdi:trash-can]
  found 22 entries for Alf Bondes Veg 13 B
    2023-11-10 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-11-02 : Restavfall [mdi:trash-can]
    2023-11-09 : Restavfall [mdi:trash-can]
    2023-11-16 : Restavfall [mdi:trash-can]
    2023-11-23 : Restavfall [mdi:trash-can]
    2023-11-30 : Restavfall [mdi:trash-can]
    2023-12-08 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2023-12-07 : Restavfall [mdi:trash-can]
    2023-12-14 : Restavfall [mdi:trash-can]
    2023-12-21 : Restavfall [mdi:trash-can]
    2023-12-28 : Restavfall [mdi:trash-can]
    2024-01-05 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-01-04 : Restavfall [mdi:trash-can]
    2024-01-11 : Restavfall [mdi:trash-can]
    2024-01-18 : Restavfall [mdi:trash-can]
    2024-01-25 : Restavfall [mdi:trash-can]
    2024-02-02 : Papir og plastemballasje [mdi:newspaper-variant-multiple]
    2024-02-01 : Restavfall [mdi:trash-can]
    2024-02-08 : Restavfall [mdi:trash-can]
    2024-02-15 : Restavfall [mdi:trash-can]
    2024-02-22 : Restavfall [mdi:trash-can]
    2024-02-29 : Restavfall [mdi:trash-can]

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.

2 participants