-
Notifications
You must be signed in to change notification settings - Fork 63
Contributions
mrampant edited this page May 30, 2023
·
3 revisions
Contributions are welcomed. Please follow the following guidelines when contributing code.
These guidelines and settings are for PyCharm. Adapt them to whichever IDE you are using.
- Tabs are used in NEMO's codebase.
- 120 characters limit per line, after which code should be wrapped.
- Always use
organize imports
before checking any code - Imports should be sorted (Editor -> Code Style -> Python -> Imports ->
Sort imported names
) - Imports should be chopped down and wrapped in parentheses (Editor -> Code Style -> Python -> Wrapping and Braces -> From Imports Statements ->
Chop down if long
) - All boxes under
From Imports Statements
should be checked:- Align when multiline
- New line after '('
- Place '(' on new line
- Force parentheses if multiline
- Force trailing comma if multiline
Always run the tests after changing any code in NEMO, even if the changes seem isolated and don't seem to interfere with the rest.
- run
export PYTHONPATH="$PYTHONPATH:$(pwd)/NEMO/tests"
- run
python manage.py test tests --settings=test_settings