From 76c216f43a1e3401c360d8bb72e763a690685376 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Tue, 9 Nov 2021 07:25:03 -0800 Subject: [PATCH] Updared pre-commit checklist as per issue 2700. --- CONTRIBUTING.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0ed9605..1d47d563 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,16 +84,31 @@ When in doubt, 📛 [ Open an issue ][open-an-issue]📛 . We wil
⚠️  Pre-Commit Checklist ⚠️
+ + +
+
- 1.  Run [`configlet-lint`][configlet-lint] if the track [config.json](config-json) has been modified. - 2.  Run [Prettier][prettier] on all markdown files. - - (_Optionally_) run [yapf][yapf] ([_config file_][.style.yapf]) to help format your code, and give you a head start on making the linters happy. - 3.  Run [flake8][flake8] ([_config file_][.flake8]) & [pylint][pylint] ([_config file_][pylintrc]) to ensure all Python code files conform to general code style standards. - 4.  Run `test/check-exercises.py [EXERCISE]` to check if your test changes function correctly. - 5.  Run the `example.py` or `exemplar.py` file against the exercise test file to ensure that it passes without error. - 6.  If you modified or created a `hints.md` file for a practice exercise, [regenerate](#generating-practice-exercise-documents) it. + - [ ]  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. - +
+