From e8a10454eba4c7392cb301fbfbe796e5bfb2b729 Mon Sep 17 00:00:00 2001 From: Diego Russo Date: Tue, 21 Apr 2020 17:39:10 +0100 Subject: Add reorder-python-import pre-commit hook Also updated README.md Change-Id: I118309c61f4d00e8508d6b888c606995490fba39 Signed-off-by: Diego Russo --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4d7db1a5..4c779d56 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ Contributions are accepted under [Apache License 2.0](LICENSE.txt). Only submit ## License Vela is licensed under [Apache License 2.0](LICENSE.txt) + ## Contributions and Pull Requests Contributions are accepted under Apache-2.0. Only submit contributions where you have authored all of the code. @@ -117,7 +118,7 @@ Contributions are accepted under Apache-2.0. Only submit contributions where you ### Sanity checks The Python codebase is PEP8 compliant with the exception of 120 characters line length. -We run black and flake8 against the code base excluding "ethosu/vela/tflite/" and "ethosu/vela/ethos\_u55\_regs" directories because they are auto-generated by third party tools. +We run reorder-python-import, black and flake8 against the code base excluding "ethosu/vela/tflite/" and "ethosu/vela/ethos\_u55\_regs" directories because they are auto-generated by third party tools. Those tools are run using [pre-commit framework](https://pre-commit.com/). The configuration file is .pre-commit-config.yaml #### Install tools @@ -146,9 +147,17 @@ The checks will be run before the commit: if one of them fails, you need to fix Those checks can be run manually. This can be achievied running the following ``` +$ pre-commit run reorder-python-imports --all-files +... $ pre-commit run flake8 --all-files ... $ pre-commit run black --all-files ``` If you don't specify anything after run, it will execute all the checks. +``` +$ pre-commit run --all-files +Reorder python imports...................................................Passed +black....................................................................Passed +flake8...................................................................Passed +``` -- cgit v1.2.1