From cdccf89cea474e9eb5c6f1d02f23f5d232c10417 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:14:04 +0000 Subject: [PATCH 01/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 36 ++++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index 3b4066496d..3f370441ce 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -216,10 +216,32 @@ jobs: - name: Display structure of downloaded files run: ls -R - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - personal_token: ${{ secrets.GH_PAGES_TOKEN }} - publish_branch: gh-pages - publish_dir: ./allure-history-partial - keep_files: true + # Set up Git for pushing changes + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + # Authenticate using the personal access token (GH_PAGES_TOKEN) + - name: Authenticate with GH_PAGES_TOKEN + run: | + git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git + + # Pull the latest changes from gh-pages + - name: Pull latest changes from gh-pages + run: | + git fetch origin gh-pages + git checkout gh-pages + git pull origin gh-pages + + # Add new content (reports) to gh-pages + - name: Copy reports to gh-pages + run: | + cp -r allure-history-partial/* ./ # copy the reports to the root of the repository + + # Commit and push changes to gh-pages + - name: Commit and push changes to gh-pages + run: | + git add . + git commit -m "Deploy reports to gh-pages" + git push origin gh-pages From 1901d455e68a248e71f2c0b0799a84a009e60b4d Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:14:52 +0000 Subject: [PATCH 02/12] fix: Update behave_schedule.yml --- .github/workflows/behave_schedule.yml | 36 +++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/behave_schedule.yml b/.github/workflows/behave_schedule.yml index 2da323c8b7..9bdd47ae6c 100644 --- a/.github/workflows/behave_schedule.yml +++ b/.github/workflows/behave_schedule.yml @@ -201,10 +201,32 @@ jobs: - name: Display structure of downloaded files run: ls -R - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - personal_token: ${{ secrets.GH_PAGES_TOKEN }} - publish_branch: gh-pages - publish_dir: ./allure-history-full - keep_files: true + # Set up Git for pushing changes + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + # Authenticate using the personal access token (GH_PAGES_TOKEN) + - name: Authenticate with GH_PAGES_TOKEN + run: | + git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git + + # Pull the latest changes from gh-pages + - name: Pull latest changes from gh-pages + run: | + git fetch origin gh-pages + git checkout gh-pages + git pull origin gh-pages + + # Add new content (reports) to gh-pages + - name: Copy reports to gh-pages + run: | + cp -r allure-history-full/* ./ # copy the reports to the root of the repository + + # Commit and push changes to gh-pages + - name: Commit and push changes to gh-pages + run: | + git add . + git commit -m "Deploy reports to gh-pages" + git push origin gh-pages From 4ef382afcd2c942f04b72cf33e78d3657a3e4ab4 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:17:40 +0000 Subject: [PATCH 03/12] fix: Update CheshireEastCouncil.py --- .../uk_bin_collection/councils/CheshireEastCouncil.py | 1 + 1 file changed, 1 insertion(+) diff --git a/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py b/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py index dc8225010b..06e8179e9d 100644 --- a/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py @@ -10,6 +10,7 @@ class CouncilClass(AbstractGetBinDataClass): """ A class to fetch and parse bin collection data for Cheshire East Council. """ + def parse_data(self, page: Any, **kwargs: Any) -> Dict[str, Any]: soup = BeautifulSoup(page.text, features="html.parser") From 5aba843b9c76f0dba39906fdd64054dad14bba11 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:22:37 +0000 Subject: [PATCH 04/12] fix: Update behave_schedule.yml --- .github/workflows/behave_schedule.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/behave_schedule.yml b/.github/workflows/behave_schedule.yml index 9bdd47ae6c..0b6568a4a3 100644 --- a/.github/workflows/behave_schedule.yml +++ b/.github/workflows/behave_schedule.yml @@ -201,6 +201,10 @@ jobs: - name: Display structure of downloaded files run: ls -R + # Checkout the repository to work with the git history + - name: Checkout repository + uses: actions/checkout@v4 + # Set up Git for pushing changes - name: Set up Git run: | From 92403d041ed330c190e734a1f36e2d70f2bbab00 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:22:57 +0000 Subject: [PATCH 05/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index 3f370441ce..688dc083ab 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -216,6 +216,10 @@ jobs: - name: Display structure of downloaded files run: ls -R + # Checkout the repository to work with the git history + - name: Checkout repository + uses: actions/checkout@v4 + # Set up Git for pushing changes - name: Set up Git run: | From b55a306fed7d9f52d261e3b84d017eeef9c75338 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:32:45 +0000 Subject: [PATCH 06/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index 688dc083ab..6c7436983b 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -215,7 +215,8 @@ jobs: - name: Display structure of downloaded files run: ls -R - + - name: Display directory + run: pwd # Checkout the repository to work with the git history - name: Checkout repository uses: actions/checkout@v4 @@ -237,7 +238,12 @@ jobs: git fetch origin gh-pages git checkout gh-pages git pull origin gh-pages - + + - name: Display structure of downloaded files + run: ls -R + - name: Display directory + run: pwd + # Add new content (reports) to gh-pages - name: Copy reports to gh-pages run: | From 8aa3ac0abcc309bb7686fa4ce6f9281e186a92b2 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 20:44:39 +0000 Subject: [PATCH 07/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 55 +++++++++++++---------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index 6c7436983b..ca3b3e0ece 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -197,58 +197,67 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - + needs: report steps: + # Checkout the repository to work with the git history + - name: Checkout repository + uses: actions/checkout@v4 + # Download Full Artifacts - uses: actions/download-artifact@v4 name: Download Full Artifacts with: name: allure_partial_history_3.12 path: allure-history/tars - - - name: Untar reports - run: for i in allure-history/tars/*.tar; do tar -xvf "$i" allure-history-partial ;done - - - name: Remove tar reports - run: rm -rf allure-history/tars - + - name: Display structure of downloaded files run: ls -R + - name: Display directory run: pwd - # Checkout the repository to work with the git history - - name: Checkout repository - uses: actions/checkout@v4 - + + # Untar reports after the checkout + - name: Untar reports + run: | + for i in allure-history/tars/*.tar; do tar -xvf "$i" allure-history-partial ;done + + - name: Remove tar reports + run: rm -rf allure-history/tars + + # Display structure after untarring + - name: Display structure of untarred files + run: ls -R + # Set up Git for pushing changes - name: Set up Git run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Authenticate using the personal access token (GH_PAGES_TOKEN) - name: Authenticate with GH_PAGES_TOKEN run: | git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git - + # Pull the latest changes from gh-pages - name: Pull latest changes from gh-pages run: | git fetch origin gh-pages git checkout gh-pages git pull origin gh-pages - - - name: Display structure of downloaded files - run: ls -R - - name: Display directory - run: pwd - - # Add new content (reports) to gh-pages - - name: Copy reports to gh-pages + + # Clean up the extra directories + - name: Remove unnecessary directories run: | - cp -r allure-history-partial/* ./ # copy the reports to the root of the repository + rm -rf allure-history # Remove the entire allure-history folder if not needed + rm -rf allure-history-partial # Remove the allure-history-partial folder after copying its contents + # Copy the contents of allure-history-partial to the root + - name: Copy reports to gh-pages + run: | + cp -r allure-history-partial/* ./ # Copy the reports to the root of the repository + # Commit and push changes to gh-pages - name: Commit and push changes to gh-pages run: | From 19b659b851b91f43ae81e463b697741aeff7b06f Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 23:09:34 +0000 Subject: [PATCH 08/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index ca3b3e0ece..6bd4fc752e 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -191,7 +191,6 @@ jobs: name: allure_partial_history_${{ matrix.python-version }} path: allure_partial_history_${{ matrix.python-version }}.tar - # Deploy only on schedule + master branch deploy: name: Deploy Reports runs-on: ubuntu-latest @@ -217,10 +216,10 @@ jobs: - name: Display directory run: pwd - # Untar reports after the checkout - - name: Untar reports + # Untar reports directly to the root of the repository + - name: Untar reports to root run: | - for i in allure-history/tars/*.tar; do tar -xvf "$i" allure-history-partial ;done + for i in allure-history/tars/*.tar; do tar -xvf "$i" -C ./; done - name: Remove tar reports run: rm -rf allure-history/tars @@ -240,24 +239,13 @@ jobs: run: | git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git - # Pull the latest changes from gh-pages + # Pull the latest changes from gh-pages and switch to the gh-pages branch - name: Pull latest changes from gh-pages run: | - git fetch origin gh-pages + git fetch origin git checkout gh-pages git pull origin gh-pages - # Clean up the extra directories - - name: Remove unnecessary directories - run: | - rm -rf allure-history # Remove the entire allure-history folder if not needed - rm -rf allure-history-partial # Remove the allure-history-partial folder after copying its contents - - # Copy the contents of allure-history-partial to the root - - name: Copy reports to gh-pages - run: | - cp -r allure-history-partial/* ./ # Copy the reports to the root of the repository - # Commit and push changes to gh-pages - name: Commit and push changes to gh-pages run: | From 8ae74221484d73956602402a0b02955ccde5b825 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 23:20:12 +0000 Subject: [PATCH 09/12] fix: Update behave_pull_request.yml --- .github/workflows/behave_pull_request.yml | 27 ++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/behave_pull_request.yml b/.github/workflows/behave_pull_request.yml index 6bd4fc752e..a8f448cb9f 100644 --- a/.github/workflows/behave_pull_request.yml +++ b/.github/workflows/behave_pull_request.yml @@ -216,16 +216,27 @@ jobs: - name: Display directory run: pwd - # Untar reports directly to the root of the repository - - name: Untar reports to root + # Untar reports into a temporary directory + - name: Untar reports to temporary directory run: | - for i in allure-history/tars/*.tar; do tar -xvf "$i" -C ./; done + mkdir -p temp_extracted # Create a temporary directory for untarring + for i in allure-history/tars/*.tar; do + tar -xvf "$i" -C temp_extracted # Untar into the temporary directory + done + + # Move the files from the correct location and delete unnecessary folders + - name: Move files to the correct location + run: | + mkdir -p 3.12/partial # Ensure the target directory exists + mv temp_extracted/allure-history-partial/3.12/partial/* 3.12/partial/ # Move files to the target directory + rm -rf temp_extracted # Clean up the temporary extraction folder + # Remove the tar reports - name: Remove tar reports run: rm -rf allure-history/tars - # Display structure after untarring - - name: Display structure of untarred files + # Display structure after untarring and moving + - name: Display structure of moved files run: ls -R # Set up Git for pushing changes @@ -233,19 +244,19 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Authenticate using the personal access token (GH_PAGES_TOKEN) - name: Authenticate with GH_PAGES_TOKEN run: | git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git - + # Pull the latest changes from gh-pages and switch to the gh-pages branch - name: Pull latest changes from gh-pages run: | git fetch origin git checkout gh-pages git pull origin gh-pages - + # Commit and push changes to gh-pages - name: Commit and push changes to gh-pages run: | From c0af0d59cb2aaff220da6ab5998c99c619ad8229 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 23:21:20 +0000 Subject: [PATCH 10/12] fix: Update behave_schedule.yml --- .github/workflows/behave_schedule.yml | 59 +++++++++++++++++---------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/.github/workflows/behave_schedule.yml b/.github/workflows/behave_schedule.yml index 0b6568a4a3..795b89a53d 100644 --- a/.github/workflows/behave_schedule.yml +++ b/.github/workflows/behave_schedule.yml @@ -182,52 +182,67 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - + needs: report steps: + # Checkout the repository to work with the git history + - name: Checkout repository + uses: actions/checkout@v4 + # Download Full Artifacts - uses: actions/download-artifact@v4 name: Download Full Artifacts with: name: allure_full_history_3.12 path: allure-history/tars - - - name: Untar reports - run: for i in allure-history/tars/*.tar; do tar -xvf "$i" allure-history-full ;done - + + - name: Display structure of downloaded files + run: ls -R + + - name: Display directory + run: pwd + + # Untar reports into a temporary directory + - name: Untar reports to temporary directory + run: | + mkdir -p temp_extracted # Create a temporary directory for untarring + for i in allure-history/tars/*.tar; do + tar -xvf "$i" -C temp_extracted # Untar into the temporary directory + done + + # Move the files from the correct location and delete unnecessary folders + - name: Move files to the correct location + run: | + mkdir -p 3.12/full # Ensure the target directory exists + mv temp_extracted/allure-history-full/3.12/full/* 3.12/full/ # Move files to the target directory + rm -rf temp_extracted # Clean up the temporary extraction folder + + # Remove the tar reports - name: Remove tar reports run: rm -rf allure-history/tars - - - name: Display structure of downloaded files + + # Display structure after untarring and moving + - name: Display structure of moved files run: ls -R - - # Checkout the repository to work with the git history - - name: Checkout repository - uses: actions/checkout@v4 - + # Set up Git for pushing changes - name: Set up Git run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Authenticate using the personal access token (GH_PAGES_TOKEN) - name: Authenticate with GH_PAGES_TOKEN run: | git remote set-url origin https://x-access-token:${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git - - # Pull the latest changes from gh-pages + + # Pull the latest changes from gh-pages and switch to the gh-pages branch - name: Pull latest changes from gh-pages run: | - git fetch origin gh-pages + git fetch origin git checkout gh-pages git pull origin gh-pages - - # Add new content (reports) to gh-pages - - name: Copy reports to gh-pages - run: | - cp -r allure-history-full/* ./ # copy the reports to the root of the repository - + # Commit and push changes to gh-pages - name: Commit and push changes to gh-pages run: | From c76042a8ceff22d0c51ed9a97a2ca40316d4b254 Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Tue, 28 Jan 2025 23:30:20 +0000 Subject: [PATCH 11/12] fix: Update CheshireEastCouncil.py --- .../uk_bin_collection/councils/CheshireEastCouncil.py | 1 + 1 file changed, 1 insertion(+) diff --git a/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py b/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py index 06e8179e9d..b38e8dc015 100644 --- a/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py @@ -19,6 +19,7 @@ def parse_data(self, page: Any, **kwargs: Any) -> Dict[str, Any]: table: Optional[Tag | NavigableString] = soup.find( "table", {"class": "job-details"} ) + if isinstance(table, Tag): # Ensure we only proceed if 'table' is a Tag rows = table.find_all("tr", {"class": "data-row"}) From 50b01ea3178cba9ed13cb04e8164bb6553d251d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 23:37:36 +0000 Subject: [PATCH 12/12] =?UTF-8?q?bump:=20version=200.128.3=20=E2=86=92=200?= =?UTF-8?q?.128.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 16 ++++++++++++++++ .../uk_bin_collection/config_flow.py | 2 +- .../uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d24c2e5dd..33b8a61a64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,20 @@ ======= +## 0.128.4 (2025-01-28) + +### Fix + +- Update CheshireEastCouncil.py +- Update behave_schedule.yml +- Update behave_pull_request.yml +- Update behave_pull_request.yml +- Update behave_pull_request.yml +- Update behave_pull_request.yml +- Update behave_pull_request.yml +- Update behave_schedule.yml +- Update CheshireEastCouncil.py +- Update behave_schedule.yml +- Update behave_pull_request.yml + ## 0.128.3 (2025-01-28) ### Fix diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index 182344de12..133aca23eb 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.128.3/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.128.4/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index c188101cb6..59b81c2a3f 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,7 +9,7 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.128.3"], - "version": "0.128.3", + "requirements": ["uk-bin-collection>=0.128.4"], + "version": "0.128.4", "zeroconf": [] } diff --git a/pyproject.toml b/pyproject.toml index 6cc834bb74..27ac5fbc80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.128.3" +version = "0.128.4" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "]