Skip to content

Commit af2b5f0

Browse files
Merge pull request #616 from ForgeFlow/16.0-upd-copier
[16.0][UPD] Update copier template
2 parents be0a917 + e66fa48 commit af2b5f0

File tree

5 files changed

+59
-18
lines changed

5 files changed

+59
-18
lines changed

.copier-answers.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.17.1
2+
_commit: v1.29
33
_src_path: https://github.com/OCA/oca-addons-repo-template.git
44
ci: GitHub
5+
convert_readme_fragments_to_markdown: false
6+
enable_checklog_odoo: false
57
generate_requirements_txt: false
68
github_check_license: true
79
github_ci_extra_env: {}
@@ -19,4 +21,6 @@ repo_description: Return Merchandise Authorization for Odoo
1921
repo_name: stock-rma
2022
repo_slug: https://github.com/ForgeFlow/stock-rma
2123
repo_website: https://github.com/ForgeFlow/stock-rma
24+
use_pyproject_toml: false
25+
use_ruff: false
2226

.github/workflows/pre-commit.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-22.04
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v2
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.11"
2020
- name: Get python version
2121
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22-
- uses: actions/cache@v1
22+
- uses: actions/cache@v4
2323
with:
2424
path: ~/.cache/pre-commit
2525
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/test.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
name: Detect unreleased dependencies
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- run: |
1919
for reqfile in requirements.txt test-requirements.txt ; do
2020
if [ -f ${reqfile} ] ; then
@@ -50,7 +50,7 @@ jobs:
5050
ports:
5151
- 5432:5432
5252
steps:
53-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5454
with:
5555
persist-credentials: false
5656
- name: Install addons and dependencies
@@ -63,7 +63,9 @@ jobs:
6363
run: oca_init_test_database
6464
- name: Run tests
6565
run: oca_run_tests
66-
- uses: codecov/codecov-action@v1
66+
- uses: codecov/codecov-action@v4
67+
with:
68+
token: ${{ secrets.CODECOV_TOKEN }}
6769
- name: Update .pot files
6870
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
6971
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'ForgeFlow' }}

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ __pycache__/
33
*.py[cod]
44
/.venv
55
/.pytest_cache
6+
/.ruff_cache
67

78
# C extensions
89
*.so
@@ -24,6 +25,19 @@ var/
2425
*.egg
2526
*.eggs
2627

28+
# Windows installers
29+
*.msi
30+
31+
# Debian packages
32+
*.deb
33+
34+
# Redhat packages
35+
*.rpm
36+
37+
# MacOS packages
38+
*.dmg
39+
*.pkg
40+
2741
# Installer logs
2842
pip-log.txt
2943
pip-delete-this-directory.txt

.pre-commit-config.yaml

+32-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: |
55
# Files and folders generated by bots, to avoid loops
66
^setup/|/static/description/index\.html$|
77
# We don't want to mess with tool-generated files
8-
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
8+
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
99
# Maybe reactivate this when all README files include prettier ignore tags?
1010
^README\.md$|
1111
# Library files can have extraneous formatting (even minimized)
@@ -14,6 +14,10 @@ exclude: |
1414
^docs/_templates/.*\.html$|
1515
# Don't bother non-technical authors with formatting issues in docs
1616
readme/.*\.(rst|md)$|
17+
# Ignore build and dist directories in addons
18+
/build/|/dist/|
19+
# Ignore test files in addons
20+
/tests/samples/.*|
1721
# You don't usually want a bot to modify your legal texts
1822
(LICENSE.*|COPYING.*)
1923
default_language_version:
@@ -35,12 +39,19 @@ repos:
3539
language: fail
3640
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
3741
- repo: https://github.com/oca/maintainer-tools
38-
rev: 969238e47c07d0c40573acff81d170f63245d738
42+
rev: d5fab7ee87fceee858a3d01048c78a548974d935
3943
hooks:
4044
# update the NOT INSTALLABLE ADDONS section above
4145
- id: oca-update-pre-commit-excluded-addons
4246
- id: oca-fix-manifest-website
4347
args: ["https://github.com/ForgeFlow/stock-rma"]
48+
- repo: https://github.com/OCA/odoo-pre-commit-hooks
49+
rev: v0.0.25
50+
hooks:
51+
- id: oca-checks-odoo-module
52+
- id: oca-checks-po
53+
args:
54+
- --disable=po-pretty-format
4455
- repo: https://github.com/myint/autoflake
4556
rev: v1.6.1
4657
hooks:
@@ -56,25 +67,35 @@ repos:
5667
rev: 22.8.0
5768
hooks:
5869
- id: black
59-
- repo: https://github.com/pre-commit/mirrors-prettier
60-
rev: v2.7.1
70+
- repo: local
6171
hooks:
6272
- id: prettier
6373
name: prettier (with plugin-xml)
74+
entry: prettier
75+
args:
76+
- --write
77+
- --list-different
78+
- --ignore-unknown
79+
types: [text]
80+
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
81+
language: node
6482
additional_dependencies:
6583
- "prettier@2.7.1"
6684
- "@prettier/plugin-xml@2.2.0"
67-
args:
68-
- --plugin=@prettier/plugin-xml
69-
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
70-
- repo: https://github.com/pre-commit/mirrors-eslint
71-
rev: v8.24.0
85+
- repo: local
7286
hooks:
7387
- id: eslint
74-
verbose: true
88+
name: eslint
89+
entry: eslint
7590
args:
7691
- --color
7792
- --fix
93+
verbose: true
94+
types: [javascript]
95+
language: node
96+
additional_dependencies:
97+
- "eslint@8.24.0"
98+
- "eslint-plugin-jsdoc@"
7899
- repo: https://github.com/pre-commit/pre-commit-hooks
79100
rev: v4.3.0
80101
hooks:
@@ -115,7 +136,7 @@ repos:
115136
hooks:
116137
- id: setuptools-odoo-make-default
117138
- repo: https://github.com/PyCQA/flake8
118-
rev: 3.9.2
139+
rev: 5.0.0
119140
hooks:
120141
- id: flake8
121142
name: flake8

0 commit comments

Comments
 (0)