From bff5e318f50b09ed56b9190cef4dbb70d10a3740 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 13 Feb 2024 13:34:45 +0100 Subject: [PATCH] Update README file --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 407ca32..4b0d1b4 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,31 @@ # Docker image to run pre-commit on Python apps/libraries -Image with common dependencies to run pre-commit in Python apps/libraries: +Debian stable based image with common dependencies to run `pre-commit` on Python apps/libraries: -- common python packages: `python3-all python3-dev python3-pip python3-venv pylint3` +- common python packages: `python3-all python3-dev python3-pip python3-venv pylint` - `build-essential` to allow local python package using `pip` - `pre-commit` and `git` commands -- pre-install `pre-commit` environments for `pylint`, `pyupgrade`, `black` and `isort` +- pre-install `pre-commit` environments for `ruff`, `pyupgrade`, `black`, `isort`, + `flake8`, `codespell`, `yamllint`, `prettier`, `pylint` and `bandit`. To use it: ```bash -docker run -it -v "$(pwd)":/src -w /src brenard/python-pre-commit -pre-commit run --all-files +docker run \ + -it --rm \ + -v "$(pwd)":/src -w /src \ + brenard/python-pre-commit \ + pre-commit run --all-files ``` **Note:** an example `.pre-commit-config.yaml` file is provided with Docker image source. +To test it on your project, use to following command: + +```bash +docker run \ + -it --rm \ + -v "$(pwd)":/src -w /src \ + -v "$(pwd)/.pre-commit-config.yaml":/src/.pre-commit-config.yaml \ + brenard/python-pre-commit \ + pre-commit run --all-files +```