From d4cb35f848d3337a057f426500d21ef22d289526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Tue, 6 Jun 2023 10:48:04 +0200 Subject: [PATCH] Update copier --- .copier-answers.yml | 2 +- .github/workflows/pre-commit.yml | 6 ++-- .github/workflows/test.yml | 12 +++---- .pre-commit-config.yaml | 24 +++++++------- .pylintrc | 35 +++++++++++++++++++- .pylintrc-mandatory | 37 ++++++++++++++++++++-- .travis/travis_delete_algolia_index | 10 ------ README.md | 6 ++-- setup/.setuptools-odoo-make-default-ignore | 2 -- setup/README | 2 -- 10 files changed, 94 insertions(+), 42 deletions(-) delete mode 100755 .travis/travis_delete_algolia_index delete mode 100644 setup/.setuptools-odoo-make-default-ignore delete mode 100644 setup/README diff --git a/.copier-answers.yml b/.copier-answers.yml index debf63749c..2282f962ae 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -13,7 +13,7 @@ github_enable_makepot: true github_enable_stale_action: false github_enforce_dev_status_compatibility: false include_wkhtmltopdf: false -odoo_version: 14.0 +odoo_version: 16.0 org_name: Shopinvader org_slug: shopinvader rebel_module_groups: [] diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 755f8a2251..23e6e58d6b 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 f2d5170cd2..6d9b7c7efc 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: test: @@ -18,14 +18,14 @@ jobs: fail-fast: false matrix: include: - - container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest + - container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest makepot: "true" name: test with Odoo - - 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 services: postgres: - image: postgres:9.6 + image: postgres:12.0 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4c9e3ded2..10184207da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -99,7 +99,7 @@ exclude: | (LICENSE.*|COPYING.*) default_language_version: python: python3 - node: "14.13.0" + node: "16.17.0" repos: - repo: local hooks: @@ -116,14 +116,14 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: ab1d7f6 + rev: 4cd2b852214dead80822e93e6749b16f2785b2fe hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons - id: oca-fix-manifest-website args: ["https://github.com/shopinvader/odoo-shopinvader"] - repo: https://github.com/myint/autoflake - rev: v1.4 + rev: v1.6.1 hooks: - id: autoflake args: @@ -134,22 +134,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 @@ -157,7 +157,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 @@ -179,7 +179,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"] @@ -202,11 +202,11 @@ 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 hooks: diff --git a/.pylintrc b/.pylintrc index 3463c92fdf..75a72dc41b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -10,7 +10,7 @@ manifest_required_authors=Shopinvader manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=16.0 [MESSAGES CONTROL] disable=all @@ -65,6 +65,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 06c60e29be..cfae38be58 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -9,7 +9,7 @@ manifest_required_authors=Shopinvader manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=16.0 [MESSAGES CONTROL] disable=all @@ -56,7 +56,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/.travis/travis_delete_algolia_index b/.travis/travis_delete_algolia_index deleted file mode 100755 index 1c8c14700b..0000000000 --- a/.travis/travis_delete_algolia_index +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python - -import os - -from algoliasearch import algoliasearch - -client = algoliasearch.Client(os.environ["ALGOLIA_APP"], os.environ["ALGOLIA_API_KEY"]) -job = os.environ["TRAVIS_JOB_NUMBER"].replace(".", "_") -client.delete_index("%s-algolia-product" % job) -client.delete_index("%s-algolia-category" % job) diff --git a/README.md b/README.md index f6c85422f0..3c4508733b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[![Pre-commit Status](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/pre-commit.yml?query=branch%3A14.0) -[![Build Status](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/test.yml?query=branch%3A14.0) -[![codecov](https://codecov.io/gh/shopinvader/odoo-shopinvader/branch/14.0/graph/badge.svg)](https://codecov.io/gh/shopinvader/odoo-shopinvader) +[![Pre-commit Status](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/pre-commit.yml/badge.svg?branch=16.0)](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/pre-commit.yml?query=branch%3A16.0) +[![Build Status](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/test.yml/badge.svg?branch=16.0)](https://github.com/shopinvader/odoo-shopinvader/actions/workflows/test.yml?query=branch%3A16.0) +[![codecov](https://codecov.io/gh/shopinvader/odoo-shopinvader/branch/16.0/graph/badge.svg)](https://codecov.io/gh/shopinvader/odoo-shopinvader) diff --git a/setup/.setuptools-odoo-make-default-ignore b/setup/.setuptools-odoo-make-default-ignore deleted file mode 100644 index 207e615334..0000000000 --- a/setup/.setuptools-odoo-make-default-ignore +++ /dev/null @@ -1,2 +0,0 @@ -# addons listed in this file are ignored by -# setuptools-odoo-make-default (one addon per line) diff --git a/setup/README b/setup/README deleted file mode 100644 index a63d633e86..0000000000 --- a/setup/README +++ /dev/null @@ -1,2 +0,0 @@ -To learn more about this directory, please visit -https://pypi.python.org/pypi/setuptools-odoo