From e45b31fe88048584b953cc9443fae329ef48fd02 Mon Sep 17 00:00:00 2001 From: sujata-m Date: Mon, 13 Apr 2026 17:39:03 +0530 Subject: [PATCH 1/5] ## Dev Board Ticket https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3469 ## Changes - Updated package version ## Testing TDEI Portal --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d708be6..067c82f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ python-ms-core==0.0.25 uvicorn==0.20.0 html_testRunner==1.2.1 geopandas==0.14.4 -python-osw-validation==0.3.5 +python-osw-validation==0.3.6 From cd86686a3e6b17e643f9d397090c83a5e76eeb80 Mon Sep 17 00:00:00 2001 From: sujata-m Date: Thu, 30 Apr 2026 16:10:50 +0530 Subject: [PATCH 2/5] Fixed ISSUE-3297 ## Dev Board Ticket https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3297 ## Changes - Updated package version ## Testing TDEI Portal --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 067c82f..616104d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ python-ms-core==0.0.25 uvicorn==0.20.0 html_testRunner==1.2.1 geopandas==0.14.4 -python-osw-validation==0.3.6 +python-osw-validation==0.3.7 From f0b3ce7533b8184881c353f90a90685a420152e4 Mon Sep 17 00:00:00 2001 From: sujata-m Date: Mon, 11 May 2026 18:49:09 +0530 Subject: [PATCH 3/5] Fixed ISSUE-3297 ## Dev Board Ticket https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3607 ## Changes - Updated package version ## Testing TDEI Portal --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 616104d..052d40e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ python-ms-core==0.0.25 uvicorn==0.20.0 html_testRunner==1.2.1 geopandas==0.14.4 -python-osw-validation==0.3.7 +python-osw-validation==0.4.0 From 9710aa7b5820a668c61cff44d8204fb27bcdd02f Mon Sep 17 00:00:00 2001 From: sujata-m Date: Thu, 28 May 2026 14:08:07 +0530 Subject: [PATCH 4/5] Fixed ISSUE-3297 ## Dev Board Ticket https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3607 ## Changes - Updated package version - Added the badges in Readme - update the unit test cases pipeline to generate the badge ## Testing TDEI Portal --- .github/workflows/unit_tests.yaml | 35 +++++++++++++++++++++++++++++++ README.md | 5 +++++ requirements.txt | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index a96e355..33370ce 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -7,6 +7,9 @@ on: pull_request: branches: [ main, dev, stage ] +permissions: + contents: write + jobs: UnitTest: runs-on: ubuntu-latest @@ -70,6 +73,38 @@ jobs: - name: Check coverage run: coverage report --fail-under=85 + - name: Generate coverage badge + if: github.event_name == 'push' || github.ref == 'refs/heads/main' + run: | + pip install coverage-badge + mkdir -p badge-out + coverage-badge -f -o badge-out/coverage.svg + + - name: Publish coverage badge to badges branch + if: github.event_name == 'push' || github.ref == 'refs/heads/main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -e + cp badge-out/coverage.svg /tmp/coverage.svg + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git fetch origin badges || true + if git show-ref --verify --quiet refs/remotes/origin/badges; then + git checkout badges + else + git checkout --orphan badges + git rm -rf . >/dev/null 2>&1 || true + fi + cp /tmp/coverage.svg coverage.svg + git add coverage.svg + if ! git diff --cached --quiet; then + git commit -m "chore: update coverage badge" + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:badges + else + echo "No badge changes to commit." + fi + # Optional: keep the log as a build artifact for easy download - name: Upload test log artifact uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 4a39ea8..66c205a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # TDEI-python-osw-validation +[![Unit Tests](https://github.com/TaskarCenterAtUW/TDEI-python-osw-validation/actions/workflows/unit_tests.yaml/badge.svg)](https://github.com/TaskarCenterAtUW/TDEI-python-osw-validation/actions/workflows/unit_tests.yaml) +![Coverage](https://raw.githubusercontent.com/TaskarCenterAtUW/TDEI-python-osw-validation/badges/coverage.svg) +[![python-osw-validation](https://img.shields.io/pypi/v/python-osw-validation?label=python-osw-validation&cacheSeconds=60&t=1)](https://pypi.org/project/python-osw-validation/) +[![python-ms-core](https://img.shields.io/pypi/v/python-ms-core?label=python-ms-core&cacheSeconds=60&t=1)](https://pypi.org/project/python-ms-core/) + ## Introduction Service to Validate the OSW files that is uploaded. At the moment, the service does the following: - Listens to the topic which is mentioned in `.env` file for any new message (that is triggered when a file is uploaded), example `UPLOAD_TOPIC=osw-upload` diff --git a/requirements.txt b/requirements.txt index 052d40e..576a361 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ python-ms-core==0.0.25 uvicorn==0.20.0 html_testRunner==1.2.1 geopandas==0.14.4 -python-osw-validation==0.4.0 +python-osw-validation==0.4.1 From e714bdd9f2cf561705abc9ee481f8eb1527063b0 Mon Sep 17 00:00:00 2001 From: sujata-m Date: Thu, 28 May 2026 14:15:06 +0530 Subject: [PATCH 5/5] Fixed unit test cases pipeline --- .github/workflows/unit_tests.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 33370ce..eed7bbe 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -2,8 +2,7 @@ name: Unit Tests on: workflow_dispatch: push: - branches-ignore: - - '**' + branches: [ main, dev, stage ] pull_request: branches: [ main, dev, stage ] @@ -74,14 +73,12 @@ jobs: run: coverage report --fail-under=85 - name: Generate coverage badge - if: github.event_name == 'push' || github.ref == 'refs/heads/main' run: | pip install coverage-badge mkdir -p badge-out coverage-badge -f -o badge-out/coverage.svg - name: Publish coverage badge to badges branch - if: github.event_name == 'push' || github.ref == 'refs/heads/main' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |