From 032a3d1372dd267901a205128903f1b396068dc0 Mon Sep 17 00:00:00 2001 From: Benedikt Burger <67148916+bmoneke@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:19:05 +0200 Subject: [PATCH 1/3] Coverage badge added. --- .github/workflows/pyleco_CI.yml | 27 +++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/pyleco_CI.yml b/.github/workflows/pyleco_CI.yml index 3e8ed1b3..dd8b0ce5 100644 --- a/.github/workflows/pyleco_CI.yml +++ b/.github/workflows/pyleco_CI.yml @@ -89,6 +89,7 @@ jobs: - name: Test for Coverage run: pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=pyleco | tee pytest-coverage.txt - name: Pytest Coverage Comment + id: coverageComment uses: MishaKav/pytest-coverage-comment@main with: pytest-coverage-path: ./pytest-coverage.txt @@ -103,6 +104,32 @@ jobs: unique-id-for-comment: python3.8 junitxml-path: ./pytest.xml junitxml-title: Coverage Summary + - name: Check output coverage + run: | + echo "Coverage Percantage - ${{ steps.coverageComment.outputs.coverage }}" + echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}" + echo "Coverage Html - ${{ steps.coverageComment.outputs.coverageHtml }}" + + echo "Coverage Warnings - ${{ steps.coverageComment.outputs.warnings }}" + + echo "Coverage Errors - ${{ steps.coverageComment.outputs.errors }}" + echo "Coverage Failures - ${{ steps.coverageComment.outputs.failures }}" + echo "Coverage Skipped - ${{ steps.coverageComment.outputs.skipped }}" + echo "Coverage Tests - ${{ steps.coverageComment.outputs.tests }}" + echo "Coverage Time - ${{ steps.coverageComment.outputs.time }}" + + echo "Not Success Test Info - ${{ steps.coverageComment.outputs.notSuccessTestInfo }}" + + - name: Create the Badge + uses: schneegans/dynamic-badges-action@v1.6.0 + with: + auth: ${{ secrets.pyleco_coverage_gist_secret }} + gistID: 7a8a7b874b62ed803eb56ca04830bede + filename: pyleco-coverage.json + label: Coverage Report + message: ${{ steps.coverageComment.outputs.coverage }} + color: ${{ steps.coverageComment.outputs.color }} + namedLogo: python test: name: Python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 0ea36ea3..ff0a14d5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ +![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bmoneke/7a8a7b874b62ed803eb56ca04830bede/raw/pyleco-coverage.json) + # PyLECO Python reference implementation of the Laboratory Experiment COntrol (LECO) protocol (https://github.com/pymeasure/leco-protocol). + From 94e5ea5b9687a140516c83504b92a95881f26ec6 Mon Sep 17 00:00:00 2001 From: Benedikt Burger <67148916+bmoneke@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:58:38 +0200 Subject: [PATCH 2/3] Reorder and expand readme Move the badge to the end of the paragraph. Adding an overview, where to find the working code (other branch) --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff0a14d5..0dd4ca91 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ -![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bmoneke/7a8a7b874b62ed803eb56ca04830bede/raw/pyleco-coverage.json) - # PyLECO Python reference implementation of the Laboratory Experiment COntrol (LECO) protocol (https://github.com/pymeasure/leco-protocol). +The [main branch](https://github.com/pymeasure/pyleco/tree/main) contains reviewed code, which does not yet contain all necessary modules and classes. +The most recent development is in the [development branch +](https://github.com/pymeasure/pyleco/tree/development), which might contain commits of a broken state. +The [stable-development branch](https://github.com/pymeasure/pyleco/tree/stable-development) contains a stable, working version of PyLECO. +Follow that branch to have always working code (as far as possible), but following the ongoing development. + +Note: LECO is still under development, such that the code and API might change. + +![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bmoneke/7a8a7b874b62ed803eb56ca04830bede/raw/pyleco-coverage.json) + From 432b68006e1f82373529fcba15e847292487ab41 Mon Sep 17 00:00:00 2001 From: Benedikt Burger <67148916+bmoneke@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:13:23 +0200 Subject: [PATCH 3/3] Update README.md Co-authored-by: Benjamin Klebel-Knobloch <32774645+bklebel@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dd4ca91..6e9372e8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Python reference implementation of the Laboratory Experiment COntrol (LECO) prot The [main branch](https://github.com/pymeasure/pyleco/tree/main) contains reviewed code, which does not yet contain all necessary modules and classes. The most recent development is in the [development branch -](https://github.com/pymeasure/pyleco/tree/development), which might contain commits of a broken state. +](https://github.com/pymeasure/pyleco/tree/development), which might contain commits with PyLECO being in a broken state. The [stable-development branch](https://github.com/pymeasure/pyleco/tree/stable-development) contains a stable, working version of PyLECO. Follow that branch to have always working code (as far as possible), but following the ongoing development.