From bfa62b94096787ce6b5eb9e6a6fa72d965725411 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:09:51 -0800 Subject: [PATCH 01/15] Add code coverage badge --- .github/workflows/check-coverage.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index f331880d..cdfe0d8f 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -47,9 +47,14 @@ jobs: # Please submit an issue on this action's GitHub repo # report-only-changed-files: true - # TODO update badge on readme: - # generate badge with https://pypi.org/project/coverage-badge/ - # display it with https://github.com/Schneegans/dynamic-badges-action + # badge on readme: https://github.com/Schneegans/dynamic-badges-action + - name: Create Awesome Badge + uses: schneegans/dynamic-badges-action@v1.7.0 + with: + auth: ${{ secrets.GIST_SECRET }} + gistID: 4f1a5e49fb58c3932bfdfdf22ed0a4b2 + filename: coverage-badge.json # Use test.svg if you want to use the SVG mode. + label: Code Coverage # TODO track docstring coverage # https://github.com/marketplace/actions/python-interrogate-check From 7666bb3099278e0345ef20e65a53b3a481a3b000 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:13:14 -0800 Subject: [PATCH 02/15] Add badge to README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3390dffa..05597e7d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Tabcmd [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) + +![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 88ff0aa66c56c088be76421c4555096ef6ecd4e8 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:18:06 -0800 Subject: [PATCH 03/15] set up coveralls.io --- .github/workflows/check-coverage.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index cdfe0d8f..585500bf 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -38,6 +38,10 @@ jobs: - name: Generate coverage report run: pytest --junitxml=pytest.xml --cov=tabcmd tests/ | tee pytest-coverage.txt + # trying another coverage reporter for PRs/badges + - name: Coveralls + uses: coverallsapp/github-action@v2 + - name: Comment on pull request with coverage uses: MishaKav/pytest-coverage-comment@main with: @@ -47,14 +51,9 @@ jobs: # Please submit an issue on this action's GitHub repo # report-only-changed-files: true - # badge on readme: https://github.com/Schneegans/dynamic-badges-action - - name: Create Awesome Badge - uses: schneegans/dynamic-badges-action@v1.7.0 - with: - auth: ${{ secrets.GIST_SECRET }} - gistID: 4f1a5e49fb58c3932bfdfdf22ed0a4b2 - filename: coverage-badge.json # Use test.svg if you want to use the SVG mode. - label: Code Coverage + # TODO update badge on readme: + # generate badge with https://pypi.org/project/coverage-badge/ + # display it with https://github.com/Schneegans/dynamic-badges-action # TODO track docstring coverage # https://github.com/marketplace/actions/python-interrogate-check From 92269c54284e62d7fdc96875ccb015f5e98e7cd4 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:23:35 -0800 Subject: [PATCH 04/15] add manual trigger Also cut to running on just one version of python --- .github/workflows/check-coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index 585500bf..43578039 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -5,6 +5,7 @@ on: pull_request: branches: - development + workflow_dispatch: jobs: build: @@ -12,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3'] + python-version: ['3.12'] runs-on: ${{ matrix.os }} From 31bc06d1215c1d365173c826fb21c611202a9464 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:41:08 -0800 Subject: [PATCH 05/15] fix markdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05597e7d..644efb92 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json) +[![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json)] [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 5ad395ca76d9ddc2f4588bfb15f0b550456b8b46 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:42:20 -0800 Subject: [PATCH 06/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 644efb92..bf638d82 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -[![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json)] +![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 02702d88844194b8ba5ec89e051bc670acc6c4bf Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:45:20 -0800 Subject: [PATCH 07/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf638d82..f4bd3f36 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/coverage-badge.json) +![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.githubusercontent.com///raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 7fc1e9d0f5f53bf34eec1cc587bc184c92169e0b Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:46:33 -0800 Subject: [PATCH 08/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4bd3f36..4b2ba005 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.githubusercontent.com///raw/coverage-badge.json) +![Code Coverage](https://img.shields.io/badge/dynamic/json?url=[https://gist.githubusercontent.com//](https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From e243e1db6869bc1484471198668317833500d390 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:46:54 -0800 Subject: [PATCH 09/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b2ba005..d3953a81 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/badge/dynamic/json?url=[https://gist.githubusercontent.com//](https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) +![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From a345c41008739bfaa25b1684c9bea3a564f49264 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:48:26 -0800 Subject: [PATCH 10/15] add query to badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d3953a81..229a4f08 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) +![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json&query=message) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From a97181fb93b3312dc0d64fac7adbf0e9f0391e98 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 14:51:00 -0800 Subject: [PATCH 11/15] switch to endpoint badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 229a4f08..ebf4eb88 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/badge/dynamic/json?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json&query=message) +![Code Coverage](https://img.shields.io/endpoint?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 71d0ff49f4dd4060337f40631d91ef12bceceebe Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 15:00:54 -0800 Subject: [PATCH 12/15] switch badges: gist+shields doesn't work https://github.com/marketplace/actions/coverage-badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebf4eb88..0fdfdd2f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -![Code Coverage](https://img.shields.io/endpoint?url=https://gist.github.com/jacalata/4f1a5e49fb58c3932bfdfdf22ed0a4b2/raw/coverage-badge.json) +[![Code coverage](https://tableau.github.io/tabcmd/badges/coverage.svg)](https://github.com/tableau/tabcmd/actions) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml) From 99ac09c80950e50f6403098305511be2d5025b04 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 15:02:57 -0800 Subject: [PATCH 13/15] Update check-coverage.yml Add new action --- .github/workflows/check-coverage.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index 43578039..861324c8 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -52,9 +52,12 @@ jobs: # Please submit an issue on this action's GitHub repo # report-only-changed-files: true - # TODO update badge on readme: - # generate badge with https://pypi.org/project/coverage-badge/ - # display it with https://github.com/Schneegans/dynamic-badges-action - + # https://github.com/marketplace/actions/coverage-badge + - name: Update Coverage Badge + # GitHub actions: default branch variable + # https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable + if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + uses: we-cli/coverage-badge-action@main + # TODO track docstring coverage # https://github.com/marketplace/actions/python-interrogate-check From 864f47b63b64baa3fd86d562346ab8b56c7a9895 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 15:04:49 -0800 Subject: [PATCH 14/15] Update check-coverage.yml --- .github/workflows/check-coverage.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index 861324c8..3d4996e4 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -51,13 +51,6 @@ jobs: # Error: The head commit for this pull_request event is not ahead of the base commit. # Please submit an issue on this action's GitHub repo # report-only-changed-files: true - - # https://github.com/marketplace/actions/coverage-badge - - name: Update Coverage Badge - # GitHub actions: default branch variable - # https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) - uses: we-cli/coverage-badge-action@main # TODO track docstring coverage # https://github.com/marketplace/actions/python-interrogate-check From 4e043fbe92477604612363982be934e70e198d91 Mon Sep 17 00:00:00 2001 From: Jac Date: Thu, 30 Jan 2025 15:07:06 -0800 Subject: [PATCH 15/15] Update README.md add coveralls badge, but it won't work til this gets to main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fdfdd2f..6afdf21a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -[![Code coverage](https://tableau.github.io/tabcmd/badges/coverage.svg)](https://github.com/tableau/tabcmd/actions) +[![Code coverage]([https://coveralls.io/repos/tableau/tabcmd/badge.png])(https://github.com/tableau/tabcmd/actions) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python tests](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/run-tests.yml) [![Pypi smoke tests](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml/badge.svg)](https://github.com/tableau/tabcmd/actions/workflows/python-app.yml)