From fcd755b5b6cce066af543b25d99adc095284df81 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sat, 20 Mar 2021 21:07:24 -0400 Subject: [PATCH] [ADD] maintainer-tools to autopep8, flake8 and pylint-odoo --- .flake8 | 13 +++++++++++++ manifest/default.dev.xml | 1 + requirements.txt | 8 ++++++++ script/install_locally.sh | 1 + script/install_locally_dev.sh | 7 +++++++ source_repo_addons.csv | 1 + 6 files changed, 31 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..351bb72 --- /dev/null +++ b/.flake8 @@ -0,0 +1,13 @@ +[flake8] +max-line-length = 80 +max-complexity = 16 +# B = bugbear +# B9 = bugbear opinionated (incl line length) +select = C,E,F,W,B,B9 +# E203: whitespace before ':' (black behaviour) +# E501: flake8 line length (covered by bugbear B950) +# W503: line break before binary operator (black behaviour) +ignore = E203,E501,W503 +exclude = + ./.git + .eggs/ diff --git a/manifest/default.dev.xml b/manifest/default.dev.xml index 19219ae..bb6c1d9 100644 --- a/manifest/default.dev.xml +++ b/manifest/default.dev.xml @@ -75,6 +75,7 @@ + diff --git a/requirements.txt b/requirements.txt index d3dae6c..ee94530 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,6 +30,14 @@ voicent-python python-swiftclient python-keystoneclient +# For logical test +docutils==0.16 +flake8 +pylint-odoo +git+https://github.com/oca/pylint-odoo.git#egg=pylint-odoo +# oca-maintainers-tools +# git+https://github.com/OCA/maintainer-tools.git#egg=oca-maintainers-tools + # For updating poetry toml iscompatible diff --git a/script/install_locally.sh b/script/install_locally.sh index 362f5e9..e7d6c9f 100755 --- a/script/install_locally.sh +++ b/script/install_locally.sh @@ -155,6 +155,7 @@ if [[ ${EL_MINIMAL_ADDONS} = "False" ]]; then printf "${EL_HOME}/doc/itpp-labs_odoo-port-docs," >> ${EL_CONFIG_FILE} printf "${EL_HOME}/doc/itpp-labs_odoo-test-docs," >> ${EL_CONFIG_FILE} printf "${EL_HOME}/doc/odoo_documentation-user," >> ${EL_CONFIG_FILE} + printf "${EL_HOME}/script/OCA_maintainer-tools," >> ${EL_CONFIG_FILE} printf "${EL_HOME}/script/OCA_odoo-module-migrator," >> ${EL_CONFIG_FILE} fi printf "\n" >> ${EL_CONFIG_FILE} diff --git a/script/install_locally_dev.sh b/script/install_locally_dev.sh index 39afb4c..d5c78a9 100755 --- a/script/install_locally_dev.sh +++ b/script/install_locally_dev.sh @@ -6,3 +6,10 @@ # Update git-repo ./script/update_manifest_local_dev.sh + +# Install maintainer-tools +cd script/OCA_maintainer-tools +virtualenv env +. env/bin/activate +python setup.py install +#${VENV_PATH}/bin/pip install ./script/OCA_maintainer-tools/ diff --git a/source_repo_addons.csv b/source_repo_addons.csv index 1447f16..ff90149 100644 --- a/source_repo_addons.csv +++ b/source_repo_addons.csv @@ -125,6 +125,7 @@ https://github.com/itpp-labs/odoo-port-docs.git,doc,master, https://github.com/itpp-labs/odoo-test-docs.git,doc,master, https://github.com/odoo/documentation-user.git,doc,, https://github.com/OCA/odoo-module-migrator.git,script,master, +https://github.com/OCA/maintainer-tools.git,script,master, https://github.com/TechnoLibre/odoo-code-generator.git,addons,, https://github.com/TechnoLibre/odoo-code-generator-template.git,addons,, https://github.com/ERPLibre/ERPLibre_image_db.git,,,