Skip to content

Commit fde0ea0

Browse files
[UPD] Update copier template
1 parent be0a917 commit fde0ea0

File tree

6 files changed

+131
-16
lines changed

6 files changed

+131
-16
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

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-22.04
1515
steps:
16+
<<<<<<< before updating
1617
- uses: actions/checkout@v3
1718
- uses: actions/setup-python@v2
19+
=======
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
>>>>>>> after updating
1823
with:
1924
python-version: "3.11"
2025
- name: Get python version
2126
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22-
- uses: actions/cache@v1
27+
- uses: actions/cache@v4
2328
with:
2429
path: ~/.cache/pre-commit
2530
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/stale.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 12 * * 0"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Stale PRs and issues policy
12+
uses: actions/stale@v9
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
# General settings.
16+
ascending: true
17+
remove-stale-when-updated: true
18+
# Pull Requests settings.
19+
# 120+30 day stale policy for PRs
20+
# * Except PRs marked as "no stale"
21+
days-before-pr-stale: 120
22+
days-before-pr-close: 30
23+
exempt-pr-labels: "no stale"
24+
stale-pr-label: "stale"
25+
stale-pr-message: >
26+
There hasn't been any activity on this pull request in the past 4 months, so
27+
it has been marked as stale and it will be closed automatically if no
28+
further activity occurs in the next 30 days.
29+
30+
If you want this PR to never become stale, please ask a PSC member to apply
31+
the "no stale" label.
32+
# Issues settings.
33+
# 180+30 day stale policy for open issues
34+
# * Except Issues marked as "no stale"
35+
days-before-issue-stale: 180
36+
days-before-issue-close: 30
37+
exempt-issue-labels: "no stale,needs more information"
38+
stale-issue-label: "stale"
39+
stale-issue-message: >
40+
There hasn't been any activity on this issue in the past 6 months, so it has
41+
been marked as stale and it will be closed automatically if no further
42+
activity occurs in the next 30 days.
43+
44+
If you want this issue to never become stale, please ask a PSC member to
45+
apply the "no stale" label.
46+
47+
# 15+30 day stale policy for issues pending more information
48+
# * Issues that are pending more information
49+
# * Except Issues marked as "no stale"
50+
- name: Needs more information stale issues policy
51+
uses: actions/stale@v9
52+
with:
53+
repo-token: ${{ secrets.GITHUB_TOKEN }}
54+
ascending: true
55+
only-labels: "needs more information"
56+
exempt-issue-labels: "no stale"
57+
days-before-stale: 15
58+
days-before-close: 30
59+
days-before-pr-stale: -1
60+
days-before-pr-close: -1
61+
remove-stale-when-updated: true
62+
stale-issue-label: "stale"
63+
stale-issue-message: >
64+
This issue needs more information and there hasn't been any activity
65+
recently, so it has been marked as stale and it will be closed automatically
66+
if no further activity occurs in the next 30 days.
67+
68+
If you think this is a mistake, please ask a PSC member to remove the "needs
69+
more information" label.

.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)