From 9a17c63fbbbebb06c29a7e5eb1d6b9efd0452539 Mon Sep 17 00:00:00 2001 From: elin Date: Tue, 6 Apr 2021 12:11:50 +0200 Subject: [PATCH 1/3] Course automation proposal: check criterion for groups with 3 students --- .../agnesfo-eryman/README.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 contributions/course-automation/agnesfo-eryman/README.md diff --git a/contributions/course-automation/agnesfo-eryman/README.md b/contributions/course-automation/agnesfo-eryman/README.md new file mode 100644 index 0000000000..a5a2842fbe --- /dev/null +++ b/contributions/course-automation/agnesfo-eryman/README.md @@ -0,0 +1,30 @@ +# Course automation proposal: check criterion for groups with 3 students. + +## Members +Agnes Forsberg (agnesfo@kth.se) +github: agnesforsberg + +Elin Ryman (eryman@kth.se) +github: rymane + +### Group rules in this course regarding groups with 3 student. +"We recommend 2 students. Three is also possible for ambitious essays, demos or contribution to open-source." + +## Proposal +Since a group of 3 students has some extra criterion to fulfill than the regular group of 1-2 students, +we want to simplify the TAs job in deciding whether the criterion is met. We would like to create a Github Action +that automatically adds a label to the pull request when the group consists of 3 students. This is for the TA to know +which pull requests should be ambitious enough. We will also check that the pull request submitted is regarding essays, +demos or contributions to open-source since those categories are the only allowed for 3 students. +The Github Action should create a PR comment with information about if 3 students are ok for the chosen category. + +We aim to fulfill the following criterion: + +| | Yes | No | Remarkable | +|-------------------------------------------- | ----|----|-------------| +|The work is done before April 6, 2021 (in order to be useful for the course) | Yes | **No** | n-a| +|The automation task produces a PR status or issue / PR comment | **Yes**, PR comment and adds a label | No | Points to a generated page with valuable additional information | +|The automation task is reusable | **Yes (next year for this course)** | No | In other courses than this one | +|The task runs on a standard platform | **Yes**, will use Github action | No | Other platforms (e.g. Moodle, Canvas) | +|The task is praised by the other students of this course | Yes | No | n-a | +|The code for the task is available | **Yes**, will use a public repo | No | **Well documented repo** | \ No newline at end of file From 4b41520c880937060109a07ac6bf19c6164fd6c8 Mon Sep 17 00:00:00 2001 From: elin Date: Thu, 29 Apr 2021 22:28:04 +0200 Subject: [PATCH 2/3] Add yml file --- .github/workflows/group-of-three.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/group-of-three.yml diff --git a/.github/workflows/group-of-three.yml b/.github/workflows/group-of-three.yml new file mode 100644 index 0000000000..830f2116bc --- /dev/null +++ b/.github/workflows/group-of-three.yml @@ -0,0 +1,29 @@ + +name: "Workflow for group-of-3-action" +on: + pull_request_target: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + name: "Step 0" + - name: "Step 1" + id: get_file_changes + uses: trilom/file-changes-action@v1.2.4 + - id: echoPayload + run: | + payload=$(cat $GITHUB_EVENT_PATH) + payload="${payload//'%'/'%25'}" + payload="${payload//$'\n'/'%0A'}" + payload="${payload//$'\r'/'%0D'}" + echo "::set-output name=payload::$payload" + - uses: rymane/group-of-3-action/action@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + payload: ${{ steps.echoPayload.outputs.payload}} + filesAdded: ${{ steps.get_file_changes.outputs.files_added}} + filesChanged: ${{ steps.get_file_changes.outputs.files_modified }} + validTasks: course-automation/demo/essay/executable-tutorial/feedback/open-source/presentation + validTasksGroupThree: demo/essay/open-source + From f131e806c352ef49f13f8d71c2e741b35ff23de5 Mon Sep 17 00:00:00 2001 From: elin Date: Thu, 29 Apr 2021 23:02:48 +0200 Subject: [PATCH 3/3] Add README, remove yml file --- .github/workflows/group-of-three.yml | 29 ------------------ .../agnesfo-eryman/README.md | 30 +++++++++++++++++-- 2 files changed, 27 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/group-of-three.yml diff --git a/.github/workflows/group-of-three.yml b/.github/workflows/group-of-three.yml deleted file mode 100644 index 830f2116bc..0000000000 --- a/.github/workflows/group-of-three.yml +++ /dev/null @@ -1,29 +0,0 @@ - -name: "Workflow for group-of-3-action" -on: - pull_request_target: -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - name: "Step 0" - - name: "Step 1" - id: get_file_changes - uses: trilom/file-changes-action@v1.2.4 - - id: echoPayload - run: | - payload=$(cat $GITHUB_EVENT_PATH) - payload="${payload//'%'/'%25'}" - payload="${payload//$'\n'/'%0A'}" - payload="${payload//$'\r'/'%0D'}" - echo "::set-output name=payload::$payload" - - uses: rymane/group-of-3-action/action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - payload: ${{ steps.echoPayload.outputs.payload}} - filesAdded: ${{ steps.get_file_changes.outputs.files_added}} - filesChanged: ${{ steps.get_file_changes.outputs.files_modified }} - validTasks: course-automation/demo/essay/executable-tutorial/feedback/open-source/presentation - validTasksGroupThree: demo/essay/open-source - diff --git a/contributions/course-automation/agnesfo-eryman/README.md b/contributions/course-automation/agnesfo-eryman/README.md index a5a2842fbe..aaa2b848d2 100644 --- a/contributions/course-automation/agnesfo-eryman/README.md +++ b/contributions/course-automation/agnesfo-eryman/README.md @@ -7,7 +7,7 @@ github: agnesforsberg Elin Ryman (eryman@kth.se) github: rymane -### Group rules in this course regarding groups with 3 student. +## Group rules in this course regarding groups with 3 student. "We recommend 2 students. Three is also possible for ambitious essays, demos or contribution to open-source." ## Proposal @@ -18,7 +18,30 @@ which pull requests should be ambitious enough. We will also check that the pull demos or contributions to open-source since those categories are the only allowed for 3 students. The Github Action should create a PR comment with information about if 3 students are ok for the chosen category. -We aim to fulfill the following criterion: +## Submission +This GitHub action looks at pull requests and checks if the number of studens is appropriate for the task. If the group size is 3 a comment will be added to the pull request regarding this is an acceptable task for that group size. Since the course has a requirement that groups of 3 need a remarkable submission our action also adds a label to the pull request if the group has 3 students so that the TAs can take a more careful look at the proposal. + +### Link to action repo +https://github.com/rymane/group-of-3-action + +## Validation +We have created pull requests to check the different use cases and make sure that they work. +- [Test group of 3 students with valid task](https://github.com/rymane/group-of-3-action/pull/15) +- [Test group of 3 students with unvalid task](https://github.com/rymane/group-of-3-action/pull/17) +- [Test group of 2 students](https://github.com/rymane/group-of-3-action/pull/16) + +## Testing +The directory **contributions** is made for testing. It contains 2 additional directories, named after valid tasks in the course. To test, perform these steps: + +1. Checkout a new testing branch +2. Change something in one of the test files +3. Commit and push the changes +4. Create a new pull request + +This will trigger the workflow, and a comment will be written on the pull request. If the test was made on a "submission" with 3 names, a "GroupOfThree" label will also be added to the pull request. If the group size is change to 2 in a later stage, the "GroupOfThree" label is removed. + + +We think we have fulfilled the following criterion: | | Yes | No | Remarkable | |-------------------------------------------- | ----|----|-------------| @@ -27,4 +50,5 @@ We aim to fulfill the following criterion: |The automation task is reusable | **Yes (next year for this course)** | No | In other courses than this one | |The task runs on a standard platform | **Yes**, will use Github action | No | Other platforms (e.g. Moodle, Canvas) | |The task is praised by the other students of this course | Yes | No | n-a | -|The code for the task is available | **Yes**, will use a public repo | No | **Well documented repo** | \ No newline at end of file +|The code for the task is available | **Yes**, will use a public repo | No | **Well documented repo** | +