From 59d190fa9beaf4d3a4aa0b63a9d726e3e5d12829 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 16:24:29 -0700 Subject: [PATCH 01/26] update workflow --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b26702f8b..8f4f5d42f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,8 @@ jobs: run: | pip install "yapf==0.30.0" bash format.sh --test + pip install "pydocstyle==6.3.0" + python3 -m pydocstyle --convention=google metadrive/ test_functionality: runs-on: ubuntu-latest From 4646081178299a0f75d3078c1456c2b0a95d5172 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 16:59:58 -0700 Subject: [PATCH 02/26] update ci --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f4f5d42f..1456be3ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,8 +22,34 @@ jobs: run: | pip install "yapf==0.30.0" bash format.sh --test - pip install "pydocstyle==6.3.0" - python3 -m pydocstyle --convention=google metadrive/ + + code_docstring: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install software + run: | + sudo apt update && sudo apt install -y bc + pip install "docstr-coverage==2.3.0" + - name: Check docstring coverage after + run: + after=$(docstr-coverage --percentage-only metadrive/) + - name: Checkout the main branch + run: git checkout main + - name: Check docstring coverage before + run: + before=$(docstr-coverage --percentage-only metadrive/) + - name: check if docstring coverage has improved + run: + if (( $(echo "$after > $before" |bc -l) )); then + exit 0 + fi + exit 1 + test_functionality: runs-on: ubuntu-latest From e1b78b6d6ddaf2177e572a7afecb2a8e83d883f9 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 17:05:17 -0700 Subject: [PATCH 03/26] update ci --- .github/workflows/main.yml | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1456be3ee..8afe64ed9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,30 +25,30 @@ jobs: code_docstring: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install software - run: | - sudo apt update && sudo apt install -y bc - pip install "docstr-coverage==2.3.0" - - name: Check docstring coverage after - run: - after=$(docstr-coverage --percentage-only metadrive/) - - name: Checkout the main branch - run: git checkout main - - name: Check docstring coverage before - run: - before=$(docstr-coverage --percentage-only metadrive/) - - name: check if docstring coverage has improved - run: - if (( $(echo "$after > $before" |bc -l) )); then - exit 0 - fi - exit 1 + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install software + run: | + sudo apt update && sudo apt install -y bc + pip install "docstr-coverage==2.3.0" + - name: Check docstring coverage after + run: | + after=$(docstr-coverage --percentage-only metadrive/) + - name: Checkout the main branch + run: git checkout main + - name: Check docstring coverage before + run: | + before=$(docstr-coverage --percentage-only metadrive/) + - name: check if docstring coverage has improved + run: | + if (( $(echo "$after > $before" |bc -l) )); then + exit 0 + fi + exit 1 test_functionality: From a1ca619b835ef545db34cc3c73de48f13541be49 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 17:09:49 -0700 Subject: [PATCH 04/26] update ci --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8afe64ed9..e189ff31b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,12 +37,14 @@ jobs: pip install "docstr-coverage==2.3.0" - name: Check docstring coverage after run: | - after=$(docstr-coverage --percentage-only metadrive/) + after=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) + printf 'Docstring coverage after pull request: %s\n' "$after" - name: Checkout the main branch run: git checkout main - name: Check docstring coverage before run: | - before=$(docstr-coverage --percentage-only metadrive/) + before=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) + printf 'Docstring coverage before pull request: %s\n' "$after" - name: check if docstring coverage has improved run: | if (( $(echo "$after > $before" |bc -l) )); then From a68484ff39d7ab9b6b5742dcbfca6ca710bdf325 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 18:58:00 -0700 Subject: [PATCH 05/26] update ci --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e189ff31b..f75993056 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,15 +38,17 @@ jobs: - name: Check docstring coverage after run: | after=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) - printf 'Docstring coverage after pull request: %s\n' "$after" - name: Checkout the main branch - run: git checkout main + uses: actions/checkout@v4 + with: + ref: main - name: Check docstring coverage before run: | before=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) - printf 'Docstring coverage before pull request: %s\n' "$after" - name: check if docstring coverage has improved run: | + printf 'Docstring coverage before pull request: %s\n' "$after" + printf 'Docstring coverage after pull request: %s\n' "$after" if (( $(echo "$after > $before" |bc -l) )); then exit 0 fi From e2a611b138be7d911c92e0773f925ea459972d65 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 19:11:34 -0700 Subject: [PATCH 06/26] update ci --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f75993056..e81f15b62 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,7 @@ jobs: - name: Check docstring coverage after run: | after=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) + echo "after=$after" >> "$GITHUB_ENV" - name: Checkout the main branch uses: actions/checkout@v4 with: @@ -45,9 +46,10 @@ jobs: - name: Check docstring coverage before run: | before=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) + echo "before=$before" >> "$GITHUB_ENV" - name: check if docstring coverage has improved run: | - printf 'Docstring coverage before pull request: %s\n' "$after" + printf 'Docstring coverage before pull request: %s\n' "$before" printf 'Docstring coverage after pull request: %s\n' "$after" if (( $(echo "$after > $before" |bc -l) )); then exit 0 From 64bc1c8feb5b2a78c1dceab2ddb00138ad008c1b Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 19:16:50 -0700 Subject: [PATCH 07/26] update ci --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e81f15b62..2993ab1cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,9 +51,12 @@ jobs: run: | printf 'Docstring coverage before pull request: %s\n' "$before" printf 'Docstring coverage after pull request: %s\n' "$after" + improvement = $(echo "$after - $before" | bc -l) if (( $(echo "$after > $before" |bc -l) )); then + printf 'Docstring check successful! You have improved the coverage by: %s\n' "$improvement" exit 0 fi + printf 'Docstring check failed! You have only improved the coverage by: %s\n' "$improvement" exit 1 From 4fbc39ef33804d7f6e8eebb75b96f9902dcf9a11 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 19:18:04 -0700 Subject: [PATCH 08/26] update ci --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2993ab1cf..852e6b5a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: run: | printf 'Docstring coverage before pull request: %s\n' "$before" printf 'Docstring coverage after pull request: %s\n' "$after" - improvement = $(echo "$after - $before" | bc -l) + improvement=$(echo "$after - $before" | bc -l) if (( $(echo "$after > $before" |bc -l) )); then printf 'Docstring check successful! You have improved the coverage by: %s\n' "$improvement" exit 0 From ec7acdf796215741f49f7986b2f22052e651ff86 Mon Sep 17 00:00:00 2001 From: Zhizheng Liu Date: Thu, 19 Oct 2023 19:21:33 -0700 Subject: [PATCH 09/26] add percentage sign --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 852e6b5a5..45eeb8acf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,14 +49,14 @@ jobs: echo "before=$before" >> "$GITHUB_ENV" - name: check if docstring coverage has improved run: | - printf 'Docstring coverage before pull request: %s\n' "$before" - printf 'Docstring coverage after pull request: %s\n' "$after" + printf 'Docstring coverage before pull request: %s%%\n' "$before" + printf 'Docstring coverage after pull request: %s%%\n' "$after" improvement=$(echo "$after - $before" | bc -l) if (( $(echo "$after > $before" |bc -l) )); then - printf 'Docstring check successful! You have improved the coverage by: %s\n' "$improvement" + printf 'Docstring check successful! You have improved the coverage by: %s%%\n' "$improvement" exit 0 fi - printf 'Docstring check failed! You have only improved the coverage by: %s\n' "$improvement" + printf 'Docstring check failed! You have only improved the coverage by: %s%%\n' "$improvement" exit 1 From b9e660697c231b0c2fe22b437794c62781f52936 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:27:15 -0700 Subject: [PATCH 10/26] up --- .github/workflows/main.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45eeb8acf..6a3fbd5f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: run: | sudo apt update && sudo apt install -y bc pip install "docstr-coverage==2.3.0" - - name: Check docstring coverage after + - name: Get post-PR docstring coverage run: | after=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) echo "after=$after" >> "$GITHUB_ENV" @@ -43,21 +43,22 @@ jobs: uses: actions/checkout@v4 with: ref: main - - name: Check docstring coverage before + - name: Get pre-PR docstring coverage run: | before=$(docstr-coverage --percentage-only --fail-under 0 metadrive/) echo "before=$before" >> "$GITHUB_ENV" - - name: check if docstring coverage has improved + - name: Check if docstring coverage decreases run: | printf 'Docstring coverage before pull request: %s%%\n' "$before" printf 'Docstring coverage after pull request: %s%%\n' "$after" improvement=$(echo "$after - $before" | bc -l) - if (( $(echo "$after > $before" |bc -l) )); then - printf 'Docstring check successful! You have improved the coverage by: %s%%\n' "$improvement" - exit 0 + if (( $(echo "$after < $before" |bc -l) )); then + printf 'Docstring coverage check failed! We require the docstring coverage to be non-decreasing after PR. You have decreased the coverage by: %s%%\n' "$improvement" + exit 1 fi - printf 'Docstring check failed! You have only improved the coverage by: %s%%\n' "$improvement" - exit 1 + printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" + exit 0 + test_functionality: From f58b7cbcfbfc1afbb6fc522de5190f6c3be730d8 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:39:58 -0700 Subject: [PATCH 11/26] try to add a comment? --- .github/workflows/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a3fbd5f8..1f7bb83bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,17 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - exit 0 + message='Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "message" + }) + From f54db954da35f14eeadcaa45f1656f449bb0bc86 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:40:51 -0700 Subject: [PATCH 12/26] try to add a comment? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1f7bb83bf..70bdece97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - message='Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" + message='Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}.' - uses: actions/github-script@v6 with: script: | From c06159dbb307a899b58e7aa4dde3db24ee0fbfb1 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:41:06 -0700 Subject: [PATCH 13/26] try to add a comment? --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70bdece97..58596ee3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,6 +58,7 @@ jobs: fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" message='Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}.' + printf $message - uses: actions/github-script@v6 with: script: | From 833ebdd5f4140eeb4192a897fafbd1a07a01fb76 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:42:47 -0700 Subject: [PATCH 14/26] try to add a comment? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58596ee3b..0ef721258 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,7 +66,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "message" + body: "${message}" }) From f41934d2c4c73a0bbb7a1195c07f0e89cb76761d Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:43:25 -0700 Subject: [PATCH 15/26] add robot comment? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ef721258..dfaa82ebc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - message='Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}.' + message="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." printf $message - uses: actions/github-script@v6 with: From f31e5f639b850cf7353acebb6a7ba93f5ad64c69 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:47:48 -0700 Subject: [PATCH 16/26] add robot comment? --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dfaa82ebc..bcf0d5d88 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,8 +57,8 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - message="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." - printf $message + message=Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}. + echo $message - uses: actions/github-script@v6 with: script: | @@ -66,7 +66,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${message}" + body: ${message} }) From 0d9b9c79ff293f38c1eba494d211939fa0563384 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:48:58 -0700 Subject: [PATCH 17/26] add robot comment? --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bcf0d5d88..197fc81f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,8 +57,8 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - message=Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}. - echo $message + ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." + echo $ROBOTMSG - uses: actions/github-script@v6 with: script: | @@ -66,7 +66,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${message} + body: ${ROBOTMSG} }) From f24420185c470dac058474822674f149e17745fe Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:49:35 -0700 Subject: [PATCH 18/26] add robot comment? --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 197fc81f2..0efee70c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,6 +59,7 @@ jobs: printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." echo $ROBOTMSG + echo "$ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6 with: script: | From 30bdb430c78f99171c7734a371fdd38ccc5a859d Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:49:44 -0700 Subject: [PATCH 19/26] add robot comment? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0efee70c2..4a10486db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${ROBOTMSG} + body: $ROBOTMSG }) From 581ae074c91e84495f285dc413838f4307df4129 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 19:54:09 -0700 Subject: [PATCH 20/26] add robot comment? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a10486db..e8d82252d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." echo $ROBOTMSG - echo "$ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" + echo "ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6 with: script: | From b6228f6be05e8c60dd9bdcb050c782aec72fe42a Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:41:10 -0700 Subject: [PATCH 21/26] up --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8d82252d..e17f11c42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: $ROBOTMSG + body: ${ROBOTMSG} }) From 8c8072b854a784a87e8211b364de42c9431d56c9 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:50:45 -0700 Subject: [PATCH 22/26] up --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e17f11c42..aad79a118 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${ROBOTMSG} + body: `${{env.ROBOTMSG}}` }) From 50fdf2599bdcbb8b2efa146eb87c678c88ca550b Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:56:08 -0700 Subject: [PATCH 23/26] up --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aad79a118..e4cfb72b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,9 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${before} to ${after} by ${improvement}." + roundedbefore=`printf "%.3f" $roundedbefore` + roundedafter=`printf "%.3f" $roundedafter` + ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." echo $ROBOTMSG echo "ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6 From 74ecb186c6c4b71acf999e324d6fdd2e66840012 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:57:16 -0700 Subject: [PATCH 24/26] up --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4cfb72b9..bc347cc52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,9 +57,9 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - roundedbefore=`printf "%.3f" $roundedbefore` - roundedafter=`printf "%.3f" $roundedafter` - ROBOTMSG="Docstring coverage check successful! You have changed the coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." + roundedbefore=`printf "%.3f" $before` + roundedafter=`printf "%.3f" $after` + ROBOTMSG="You have changed the docstring coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." echo $ROBOTMSG echo "ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6 From 17bbe67296f1508d0e1c78e4eaebec24217c66cc Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:57:52 -0700 Subject: [PATCH 25/26] up --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc347cc52..2b7a0196c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" roundedbefore=`printf "%.3f" $before` roundedafter=`printf "%.3f" $after` - ROBOTMSG="You have changed the docstring coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." + ROBOTMSG="[BOT] Great job! You have changed the docstring coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." echo $ROBOTMSG echo "ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6 From f0742ba91b7d1b965a674c86706af7cac332d693 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Thu, 19 Oct 2023 21:59:00 -0700 Subject: [PATCH 26/26] up --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b7a0196c..01846c007 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,9 +57,10 @@ jobs: exit 1 fi printf 'Docstring coverage check successful! We require the docstring coverage to be non-decreasing after PR. You have changed the coverage by: %s%%\n' "$improvement" - roundedbefore=`printf "%.3f" $before` - roundedafter=`printf "%.3f" $after` - ROBOTMSG="[BOT] Great job! You have changed the docstring coverage from ${roundedbefore}\% to ${roundedafter}\% by ${improvement}\%." + roundedbefore=`printf "%.2f" $before` + roundedafter=`printf "%.2f" $after` + roundedimprovement=`printf "%.3f" improvement` + ROBOTMSG="[BOT] Great job! You have changed the docstring coverage from ${roundedbefore}\% to ${roundedafter}\%, improving ${roundedimprovement}\%." echo $ROBOTMSG echo "ROBOTMSG=$ROBOTMSG" >> "$GITHUB_ENV" - uses: actions/github-script@v6