diff --git a/.vscode/settings.json b/.vscode/settings.json index a695e6adc18513f6fdda6cb8fdb2e8875e22e14d..f70820d691324f7a4febce13a51ea0f3e9c51052 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,8 @@ { "python.formatting.provider": "autopep8", "python.pythonPath": "venv/bin/python", - "python.linting.enabled": true -} \ No newline at end of file + "python.linting.enabled": true, + "python.linting.banditEnabled": true, + "python.linting.pylintEnabled": true, + "python.linting.mypyEnabled": false, +} diff --git a/README.md b/README.md index 45c65f377d0484204048e1238c0dbb498920e26c..293ea7cd43665620c03a3a31816c3bf0edf9dbfd 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ## Development 1. Prerequisites - - Python 3.8 - - Docker 20.10 - - Docker Compose 1.25 + - Python > 3.8 + - Docker > 20.10 + - Docker Compose > 1.25 1. Create/activate virtual environment (ensure you use the correct python version!). ```sh @@ -51,3 +51,11 @@ Style constraints: Coding constraints: - Objects that are not supposed to be used outside the current scope MUST be named starting with `_` (underscore): [PEP 316](https://www.python.org/dev/peps/pep-0316/#id12) + +For your convenience, pre-commit hooks are configured to check against these constraints. Provided, you have installed the development requirements (see above), activate `pre-commit` to run on every `git commit`: + +```sh +pre-commit install +``` + +Also, a helper with conventional commits is installed with the development requirements that you could leverage to easily comply with it. Just use `cz c` instead of `git commit` diff --git a/requirements.dev.txt b/requirements.dev.txt index 9c6f1c6303c7aa4f3f0be3e4620c0956f09580fa..a8ca70e3797f76ee2b0c1eaccd4fca1c5cef3e1d 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,6 +1,8 @@ autopep8==1.5.7 +bandit==1.7.0 commitizen==2.20.0 mypy==0.910 pre-commit==2.15.0 pylint==2.11.1 rstcheck==3.3.1 +types-requests==2.25.11