From aab7911a2b38c5fe4572d950790cf0ca07e8d555 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 4 Jul 2023 13:30:33 +1000 Subject: [PATCH] Contributing docs (#5147) * Add more info for invoke test * Update code style docs * link fix --- CONTRIBUTING.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 79e4ba027d..7b39f05ef1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -135,10 +135,27 @@ To run only partial tests, for example for a module use: invoke test --runtest order ``` +To see all the available options: + +``` +invoke test --help +``` + ## Code Style -Submitted Python code is automatically checked against PEP style guidelines. Locally you can run `invoke style` to ensure the style checks will pass, before submitting the PR. -Please write docstrings for each function and class - we follow the [google doc-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for python. Docstrings for general javascript code is encouraged! Docstyles are checked by `invoke style`. +Code style is automatically checked as part of the project's CI pipeline on GitHub. This means that any pull requests which do not conform to the style guidelines will fail CI checks. + +### Backend Code + +Backend code (Python) is checked against the [PEP style guidelines](https://peps.python.org/pep-0008/). Please write docstrings for each function and class - we follow the [google doc-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for python. + +### Frontend Code + +Frontend code (Javascript) is checked using [eslint](https://eslint.org/). While docstrings are not enforced for front-end code, good code documentation is encouraged! + +### Running Checks Locally + +If you have followed the setup devtools procedure, then code style checking is performend automatically whenever you commit changes to the code. ### Django templates