diff --git a/.copier-answers.yml b/.copier-answers.yml index 09a9df244c..38d1a47172 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,7 +1,9 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.17.2 +_commit: v1.29 _src_path: https://github.com/OCA/oca-addons-repo-template.git ci: GitHub +convert_readme_fragments_to_markdown: false +enable_checklog_odoo: false generate_requirements_txt: true github_check_license: true github_ci_extra_env: {} @@ -19,4 +21,6 @@ repo_description: WMS modules for Odoo repo_name: Warehouse Management System (WMS) repo_slug: wms repo_website: https://github.com/OCA/wms +use_pyproject_toml: false +use_ruff: false diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 602ecbca24..10b8acad59 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,13 +13,13 @@ jobs: pre-commit: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1693a1253b..fa17fcd4e8 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Stale PRs and issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # General settings. @@ -48,7 +48,7 @@ jobs: # * Issues that are pending more information # * Except Issues marked as "no stale" - name: Needs more information stale issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ascending: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 326c125567..c5561694bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest name: Detect unreleased dependencies steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | for reqfile in requirements.txt test-requirements.txt ; do if [ -f ${reqfile} ] ; then @@ -50,7 +50,7 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false - name: Install addons and dependencies @@ -63,7 +63,9 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Update .pot files run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} diff --git a/.gitignore b/.gitignore index 9c283fd41f..6ec07a054b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[cod] /.venv /.pytest_cache +/.ruff_cache # C extensions *.so @@ -24,6 +25,19 @@ var/ *.egg *.eggs +# Windows installers +*.msi + +# Debian packages +*.deb + +# Redhat packages +*.rpm + +# MacOS packages +*.dmg +*.pkg + # Installer logs pip-log.txt pip-delete-this-directory.txt diff --git a/.oca_hooks.cfg b/.oca_hooks.cfg new file mode 100644 index 0000000000..1f3e3e4267 --- /dev/null +++ b/.oca_hooks.cfg @@ -0,0 +1,2 @@ +[MESSAGES_CONTROL] +disable=xml-deprecated-data-node,xml-deprecated-tree-attribute diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 79c39a0617..56ddb7774d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: | # Files and folders generated by bots, to avoid loops ^setup/|/static/description/index\.html$| # We don't want to mess with tool-generated files - .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| + .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs| # Maybe reactivate this when all README files include prettier ignore tags? ^README\.md$| # Library files can have extraneous formatting (even minimized) @@ -14,6 +14,10 @@ exclude: | ^docs/_templates/.*\.html$| # Don't bother non-technical authors with formatting issues in docs readme/.*\.(rst|md)$| + # Ignore build and dist directories in addons + /build/|/dist/| + # Ignore test files in addons + /tests/samples/.*| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -35,7 +39,7 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: 969238e47c07d0c40573acff81d170f63245d738 + rev: d5fab7ee87fceee858a3d01048c78a548974d935 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -48,13 +52,16 @@ repos: - --org-name=OCA - --repo-name=wms - --if-source-changed + - --keep-source-digest - repo: https://github.com/OCA/odoo-pre-commit-hooks rev: v0.0.25 hooks: - id: oca-checks-odoo-module - id: oca-checks-po + args: + - --disable=po-pretty-format - repo: https://github.com/myint/autoflake - rev: v1.4 + rev: v1.5.3 hooks: - id: autoflake args: @@ -68,29 +75,42 @@ repos: rev: 22.3.0 hooks: - id: black - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.1.2 + - repo: local hooks: - id: prettier name: prettier (with plugin-xml) + entry: prettier + args: + - --write + - --list-different + - --ignore-unknown + types: [text] + files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ + language: node additional_dependencies: - "prettier@2.1.2" - "@prettier/plugin-xml@0.12.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 + - repo: local hooks: - id: eslint - verbose: true + name: eslint + entry: eslint args: - --color - --fix +<<<<<<< before updating # SPECIAL CASE: barcode scanner app use Vue.js + # advanced JS (modules, classes, etc) # which are not supported by OCA rules yet. exclude: shopfloor_*/* +======= + verbose: true + types: [javascript] + language: node + additional_dependencies: + - "eslint@7.8.1" + - "eslint-plugin-jsdoc@" +>>>>>>> after updating - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: @@ -137,7 +157,7 @@ repos: - --header - "# generated from manifests external_dependencies" - repo: https://github.com/PyCQA/flake8 - rev: 3.8.3 + rev: 5.0.0 hooks: - id: flake8 name: flake8