From d3dffdac0d37e50b512184b08c16f296e1342784 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Fri, 29 Oct 2021 16:26:57 -0700 Subject: [PATCH 1/2] Added snippets to the auto-pr-commenter. --- .github/pr-commenter.yml | 361 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 .github/pr-commenter.yml diff --git a/.github/pr-commenter.yml b/.github/pr-commenter.yml new file mode 100644 index 0000000000..affc3d7511 --- /dev/null +++ b/.github/pr-commenter.yml @@ -0,0 +1,361 @@ +comment: + on-update: edit + header: | + Hi & Welcome! 👋🏽 👋 + +
+ + **Thank you** for contributing to `exercism/python` 💛 💙 -- we really appreciate it! 🌟 🌈 + + footer: | + +

🛠️    Maintainers   

+

Please take note 📒 of the following sections/review items 👀 ✨

+
+
+
+ 🌈  Acknowledgements and Reputation +
+ + +
+ + - ❓ Does this PR need to receive a label with a [`reputation modifier`](https://github.com/exercism/docs/blob/main/using/product/reputation.md#creating-a-pull-request)? + - `medium` is awarded by default. + - ❓ Does this contributor need to be added to the **exercise** [`authors` or `contributors`](https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md#file-metaconfigjson)? + - ❓ Does this contributor need to be added to the **concept** [`authors` or `contributors`](https://github.com/exercism/docs/blob/main/building/tracks/concepts.md#file-metaconfigjson)? + - ❓ Is there an associated issue or issues that should be linked to this PR? + +
+
+
+ 💫  General Code Quality + +
+
+
+ 🌿  Changes to Concept Exercises +
+ + - ❓ Are all required files still up-to-date & configured correctly for this change?_ + - ❓ Does `/.meta/design.md` need to be updated with new implementation/design decisions + - ❓ Do these changes require follow-on/supporting changes to related **concept** documents? + +
    +
    + ✨  Where applicable, check the following ✨ +
    +
      + + +
      + + (_as a reminder: [Concept Exercise Anatomy](https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md)_) + - [ ] Exercise `introduction.md` + - [ ] Do all code examples compile, run, and return the shown output? + - [ ] Are all the code examples formatted per the Python docs? + - [ ] Exercise `instructions.md` + - [ ] Exercise `hints.md` + - [ ] Check that exercise `design.md` was fulfilled or edited appropriately + - [ ] Exercise `exemplar.py` + - [ ] Only uses syntax previously introduced or explained. + - [ ] Is correct and appropriate for the exercise and story. + - [ ] Exercise `.py` (stub) + - [ ] Includes appropriate docstrings and function names. + - [ ] Includes `pass` for each function + - [ ] Includes an EOL at the end + - [ ] Exercise `_test.py` + - [ ] Tests cover all (reasonable) inputs and scenarios + - [ ] At least one test for each task in the exercise + - [ ] If using subtests or fixtures they're [formatted correctly](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#Test-File_style) for the runner + - [ ] Classnames are `Test` + - [ ] Test functions are `test_` + - [ ] Exercise `config.json` --> **valid UUID4** + - [ ] Corresponding concept `introduction.md` + - [ ] Corresponding concept `about.md` + - [ ] Concept `config.json` + - [ ] All Markdown Files : Prettier linting (_for all markdown docs_) + - [ ] All Code files: PyLint linting (**_except for test files_**) + - [ ] All files with text: Spell check & grammar review. + +
      +
    +
    +
+
+ +
+ 🚀  Changes to Practice Exercises +
+ +
+
+ 🐣  Brand-New Concept Exercises +
+ +
+
+

Our   💖   for all your review efforts! 🌟 🦄

+ + snippets: + - id: any-file-changed + files: + - any: ["**", "**/**"] + body: | +
+ + This is an automated [🤖 🤖  ] comment for the **`maintainers`** of this repository, notifying them of your contribution. 🎉 +   Someone will review/reply to your changes shortly. (_usually within **72 hours**._) + You can safely ignore the **`maintainers`** section below. + +
+
+ ⚠️  Please be aware ⚠️ + +      _This repo does not generally accept Pull Requests unless they follow our [contributing guidelines](https://github.com/exercism/python/blob/main/CONTRIBUTING.md) and are:_ + +      1️⃣     Small, contained fixes for typos/grammar/punctuation/code syntax on [one] exercise, +      2️⃣     Medium changes that have been agreed/discussed via a filed issue, +      3️⃣     Contributions from our [help wanted][help-wanted] issue list, +      4️⃣     Larger (_previously agreed-upon_) contributions from recent & regular (_within the last 6 months_) contributors. + +     Pull Requests not in these categories **will be closed**. 😞 + +
+
+ + + - id: change-concept-exercise + files: + - "concepts/**/*" + - "concepts/**/**/*" + - "exercises/concept/**/*" + - "exercises/concept/**/**/*" + body: | + --- + + #### **`💙 It looks like you are changing/adding files in a Concept Exercise! 💙 `** + +
+
+ ‼️  Did You... +
+ + +
+
+ + - [ ]  Update & rebase your branch with any (recent) upstream changes. + - [ ]  Spell and grammar check all prose changes. + - [ ]  Run [Prettier](https://prettier.io/) on all markdown and JSON files. + - (_Optionally_) run [yapf](https://github.com/google/yapf) ([_yapf config_](https://github.com/exercism/python/blob/main/.style.yapf)) to help format your code. + - [ ]  Run [flake8](http://flake8.pycqa.org/) with [_flake8 config_](https://github.com/exercism/python/blob/main/.flake8) to check general code style standards. + - [ ]   Run [pylint](https://pylint.pycqa.org/en/v2.11.1/user_guide/index.html) with [_pylint config_](https://github.com/exercism/python/blob/main/pylintrc) to check extended code style standards. + - [ ]  Use pytest or the [python-track-test-runner](https://github.com/exercism/python-test-runner) to test any changed `example.py`/`exemplar.py`files +  against their associated test files. + - [ ]  Similarly, use [pytest](https://docs.pytest.org/en/6.2.x/contents.html) or the [python-track-test-runner](https://github.com/exercism/python-test-runner) to test any changed _**test**_ files. + - Check that tests **fail** properly, as well as succeed. +  (_**e.g.**, make some tests fail on purpose to "test the tests" & failure messages_). + - [ ]  Double-check all files for proper EOL. + - [ ]  [Regenerate](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#generating-practice-exercise-documents) exercise documents when you modified or created a `hints.md` file for a practice exercise. + - [ ]  [Regenerate the test file](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#auto-generated-test-files-and-test-templates) if you modified or created a `JinJa2` template file for a practice exercise. + - Run the generated test file result against its `example.py`. + - [ ]  Run [`configlet-lint`](https://github.com/exercism/configlet#configlet-lint) if the track [config.json](https://github.com/exercism/docs/blob/main/building/tracks/config-json.md), or any other exercise `config.json` has been modified. + +
+
+
+
+ +
+ ✅️  Have You Checked: +
+ + +
+ + . + _**Are there any additional changes you need to make?**_ + Please make sure all associated files are present and consistent with your changes! + + [Concept Exercise Anatomy](https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md) + + - [ ] `.docs/hints.md` + - [ ] `.docs/instructions.md` + - [ ] `.docs/introduction.md` + - [ ] `.meta/config.json` + - [ ] `.meta/design.md` + - [ ] `.meta/exemplar.py` (_exemplar solution_) + - [ ] `_test.py` (_test file_) + - [ ] `.py` (_stub file_) + - [ ] `concepts/../introduction.md` + - [ ] `concepts/../about.md` + - [ ] `concepts/../links.json` + - [ ] `concepts/../.meta/config.json` + +
+
+
+ + - id: change-practice-exercise + files: + - "exercises/practice/**/*" + - "exercises/practice/**/**/*" + body: | + --- + + #### **`💙 It looks like you are changing/adding files in a Practice Exercise! 💙 `** + + **`Please note:`** generally, changes to existing [practice exercises](https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md) or the addition + of new ones are proposed & discussed in [problem-specifications](https://github.com/exercism/problem-specifications) first, so that all tracks can potentially benefit. + Once a change is approved there by three maintainers, it becomes available for various language tracks to then implement. + +
+
+ ‼️  Did You... +
+ + +

+ + - [ ]  Update & rebase your branch with any (recent) upstream changes. + - [ ]  Spell and grammar check all prose changes. + - [ ]  Run [Prettier](https://prettier.io/) on all markdown and JSON files. + - (_Optionally_) run [yapf](https://github.com/google/yapf) ([_yapf config_](https://github.com/exercism/python/blob/main/.style.yapf)) to help format your code. + - [ ]  Run [flake8](http://flake8.pycqa.org/) with [_flake8 config_](https://github.com/exercism/python/blob/main/.flake8) to check general code style standards. + - [ ]   Run [pylint](https://pylint.pycqa.org/en/v2.11.1/user_guide/index.html) with [_pylint config_](https://github.com/exercism/python/blob/main/pylintrc) to check extended code style standards. + - [ ]  Use pytest or the [python-track-test-runner](https://github.com/exercism/python-test-runner) to test any changed `example.py`/`exemplar.py`files +  against their associated test files. + - [ ]  Similarly, use [pytest](https://docs.pytest.org/en/6.2.x/contents.html) or the [python-track-test-runner](https://github.com/exercism/python-test-runner) to test any changed _**test**_ files. + - Check that tests **fail** properly, as well as succeed. +  (_**e.g.**, make some tests fail on purpose to "test the tests" & failure messages_). + - [ ]  Double-check all files for proper EOL. + - [ ]  [Regenerate](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#generating-practice-exercise-documents) exercise documents when you modified or created a `hints.md` file for a practice exercise. + - [ ]  [Regenerate the test file](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#auto-generated-test-files-and-test-templates) if you modified or created a `JinJa2` template file for a practice exercise. + - Run the generated test file result against its `example.py`. + - [ ]  Run [`configlet-lint`](https://github.com/exercism/configlet#configlet-lint) if the track [config.json](https://github.com/exercism/docs/blob/main/building/tracks/config-json.md), or any other exercise `config.json` has been modified. + +
+
+
+
+ +
+ ✅️  Have You Checked... +
+ + +
+ + . + _**Are there any additional changes you need to make?**_ + Please make sure all associated files are present and consistent with your changes! + + [Practice Exercise Anatomy](https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md) + + - [ ] `.docs/instructions.md`(**required**) + - [ ] `.docs/introduction.md`(_optional_) + - [ ] `.docs/introduction.append.md`(_optional_) + - [ ] `.docs/instructions.append.md` (_optional_) + - [ ] `.docs/hints.md`(_optional_) + - [ ] `.meta/config.json` (**required**) + - [ ] `.meta/example.py` (**required**) + - [ ] `.meta/design.md` (_optional_) + - [ ] `.meta/template.j2` (_template for generating tests from canonical data_) + - [ ] `.meta/tests.toml` (_do you need to include or exclude any cases?_) + - [ ] `_test.py` (_**do you need to regenerate this?**_) + - [ ] `.py` (**required**) + +
+
+
\ No newline at end of file From 01cfe1424180acbeaa0522d071c3cb0a7c82588f Mon Sep 17 00:00:00 2001 From: BethanyG Date: Fri, 29 Oct 2021 21:55:36 -0700 Subject: [PATCH 2/2] Added suggestions from PR review. --- .github/pr-commenter.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/pr-commenter.yml b/.github/pr-commenter.yml index affc3d7511..5008acfe0b 100644 --- a/.github/pr-commenter.yml +++ b/.github/pr-commenter.yml @@ -45,7 +45,7 @@ comment: (_**e.g.**, make some tests fail on purpose to "test the tests" & failure messages_). - [ ]  All files have proper EOL. - [ ]  If a `JinJa2` template was modified/created, was the test file [regenerated](https://github.com/exercism/python/blob/main/CONTRIBUTING.md#auto-generated-test-files-and-test-templates)? - - Does the regenerated test file successfully test the exercises `example.py` file? + - Does the regenerated test file successfully test the exercises `example.py` file? - [ ]  The branch passes all CI checks & [`configlet-lint`](https://github.com/exercism/configlet#configlet-lint).
@@ -358,4 +358,5 @@ comment: -
\ No newline at end of file +
+