From 9e26f90a9b594c514476eb46a06e1de5e2951f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Felipe=20Mil=C3=A9o?= Date: Tue, 14 May 2024 10:31:38 -0300 Subject: [PATCH] [MIG] 16.0 repo template --- .copier-answers.yml | 4 ++-- .github/workflows/pre-commit.yml | 6 +++--- .github/workflows/test.yml | 10 ++++----- .oca_hooks.cfg | 2 -- .pre-commit-config.yaml | 26 ++++++++++++------------ .pylintrc | 33 ++++++++++++++++++++++++++++++ .pylintrc-mandatory | 35 +++++++++++++++++++++++++++++++- README.md | 6 +++--- 8 files changed, 93 insertions(+), 29 deletions(-) delete mode 100644 .oca_hooks.cfg diff --git a/.copier-answers.yml b/.copier-answers.yml index e6fd05b..c2488af 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -12,8 +12,8 @@ github_enable_stale_action: true github_enforce_dev_status_compatibility: true include_wkhtmltopdf: true odoo_test_flavor: OCB -odoo_version: 14.0 -org_name: KMEE, Odoo Community Association (OCA) +odoo_version: 16.0 +org_name: KMEE org_slug: KMEE rebel_module_groups: [] repo_description: Welcome to our repository, dedicated to incubating OCA modules developed diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 602ecbc..38b0ba1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -3,11 +3,11 @@ name: pre-commit on: pull_request: branches: - - "14.0*" + - "16.0*" push: branches: - - "14.0" - - "14.0-ocabot-*" + - "16.0" + - "16.0-ocabot-*" jobs: pre-commit: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 120ad52..e61a386 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,11 +3,11 @@ name: tests on: pull_request: branches: - - "14.0*" + - "16.0*" push: branches: - - "14.0" - - "14.0-ocabot-*" + - "16.0" + - "16.0-ocabot-*" jobs: unreleased-deps: @@ -35,12 +35,12 @@ jobs: fail-fast: false matrix: include: - - container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest + - container: ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest name: test with OCB makepot: "true" services: postgres: - image: postgres:9.6 + image: postgres:12.0 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo diff --git a/.oca_hooks.cfg b/.oca_hooks.cfg deleted file mode 100644 index 1f3e3e4..0000000 --- a/.oca_hooks.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[MESSAGES_CONTROL] -disable=xml-deprecated-data-node,xml-deprecated-tree-attribute diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5face99..4d983e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ exclude: | (LICENSE.*|COPYING.*) default_language_version: python: python3 - node: "14.13.0" + node: "16.17.0" repos: - repo: local hooks: @@ -48,7 +48,7 @@ repos: - id: oca-gen-addon-readme args: - --addons-dir=. - - --branch=14.0 + - --branch=16.0 - --org-name=KMEE - --repo-name=kmee-odoo-addons - --if-source-changed @@ -59,7 +59,7 @@ repos: - id: oca-checks-odoo-module - id: oca-checks-po - repo: https://github.com/myint/autoflake - rev: v1.4 + rev: v1.6.1 hooks: - id: autoflake args: @@ -70,22 +70,22 @@ repos: - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.8.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.1.2 + rev: v2.7.1 hooks: - id: prettier name: prettier (with plugin-xml) additional_dependencies: - - "prettier@2.1.2" - - "@prettier/plugin-xml@0.12.0" + - "prettier@2.7.1" + - "@prettier/plugin-xml@2.2.0" args: - --plugin=@prettier/plugin-xml files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ - repo: https://github.com/pre-commit/mirrors-eslint - rev: v7.8.1 + rev: v8.24.0 hooks: - id: eslint verbose: true @@ -93,7 +93,7 @@ repos: - --color - --fix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.3.0 hooks: - id: trailing-whitespace # exclude autogenerated files @@ -115,7 +115,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/asottile/pyupgrade - rev: v2.7.2 + rev: v2.38.2 hooks: - id: pyupgrade args: ["--keep-percent-format"] @@ -138,13 +138,13 @@ repos: - --header - "# generated from manifests external_dependencies" - repo: https://github.com/PyCQA/flake8 - rev: 3.8.3 + rev: 3.9.2 hooks: - id: flake8 name: flake8 - additional_dependencies: ["flake8-bugbear==20.1.4"] + additional_dependencies: ["flake8-bugbear==21.9.2"] - repo: https://github.com/OCA/pylint-odoo - rev: 7.0.2 + rev: v8.0.19 hooks: - id: pylint_odoo name: pylint with optional checks diff --git a/.pylintrc b/.pylintrc index afcffcd..e7b2414 100644 --- a/.pylintrc +++ b/.pylintrc @@ -66,6 +66,39 @@ enable=anomalous-backslash-in-string, use-vim-comment, wrong-tabs-instead-of-spaces, xml-syntax-error, + attribute-string-redundant, + character-not-valid-in-resource-link, + consider-merging-classes-inherited, + context-overridden, + create-user-wo-reset-password, + dangerous-filter-wo-user, + dangerous-qweb-replace-wo-priority, + deprecated-data-xml-node, + deprecated-openerp-xml-node, + duplicate-po-message-definition, + except-pass, + file-not-used, + invalid-commit, + manifest-maintainers-list, + missing-newline-extrafiles, + missing-readme, + missing-return, + odoo-addons-relative-import, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + renamed-field-parameter, + resource-not-exist, + str-format-used, + test-folder-imported, + translation-contains-variable, + translation-positional-used, + unnecessary-utf8-coding-comment, + website-manifest-key-not-valid-uri, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + external-request-timeout, # messages that do not cause the lint step to fail consider-merging-classes-inherited, create-user-wo-reset-password, diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index a6805ac..d568aae 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -57,7 +57,40 @@ enable=anomalous-backslash-in-string, unreachable, use-vim-comment, wrong-tabs-instead-of-spaces, - xml-syntax-error + xml-syntax-error, + attribute-string-redundant, + character-not-valid-in-resource-link, + consider-merging-classes-inherited, + context-overridden, + create-user-wo-reset-password, + dangerous-filter-wo-user, + dangerous-qweb-replace-wo-priority, + deprecated-data-xml-node, + deprecated-openerp-xml-node, + duplicate-po-message-definition, + except-pass, + file-not-used, + invalid-commit, + manifest-maintainers-list, + missing-newline-extrafiles, + missing-readme, + missing-return, + odoo-addons-relative-import, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + renamed-field-parameter, + resource-not-exist, + str-format-used, + test-folder-imported, + translation-contains-variable, + translation-positional-used, + unnecessary-utf8-coding-comment, + website-manifest-key-not-valid-uri, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + external-request-timeout [REPORTS] msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} diff --git a/README.md b/README.md index cadfd2b..f96b61b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[![Pre-commit Status](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/pre-commit.yml?query=branch%3A14.0) -[![Build Status](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/test.yml?query=branch%3A14.0) -[![codecov](https://codecov.io/gh/KMEE/kmee-odoo-addons/branch/14.0/graph/badge.svg)](https://codecov.io/gh/KMEE/kmee-odoo-addons) +[![Pre-commit Status](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/pre-commit.yml/badge.svg?branch=16.0)](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/pre-commit.yml?query=branch%3A16.0) +[![Build Status](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/test.yml/badge.svg?branch=16.0)](https://github.com/KMEE/kmee-odoo-addons/actions/workflows/test.yml?query=branch%3A16.0) +[![codecov](https://codecov.io/gh/KMEE/kmee-odoo-addons/branch/16.0/graph/badge.svg)](https://codecov.io/gh/KMEE/kmee-odoo-addons)