mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Contributing docs (#5147)
* Add more info for invoke test * Update code style docs * link fix
This commit is contained in:
parent
5f61b5f120
commit
aab7911a2b
@ -135,10 +135,27 @@ To run only partial tests, for example for a module use:
|
|||||||
invoke test --runtest order
|
invoke test --runtest order
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To see all the available options:
|
||||||
|
|
||||||
|
```
|
||||||
|
invoke test --help
|
||||||
|
```
|
||||||
|
|
||||||
## Code Style
|
## 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.
|
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.
|
||||||
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`.
|
|
||||||
|
### 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
|
### Django templates
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user