Contributing docs (#5147)

* Add more info for invoke test

* Update code style docs

* link fix
This commit is contained in:
Oliver 2023-07-04 13:30:33 +10:00 committed by GitHub
parent 5f61b5f120
commit aab7911a2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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