Skip to content

Commit dbf30b8

Browse files
committed
[IMP] update dotfiles
1 parent 2330c03 commit dbf30b8

7 files changed

+87
-26
lines changed

.copier-answers.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.14.2
2+
_commit: v1.29
33
_src_path: gh:oca/oca-addons-repo-template
44
ci: GitHub
5-
dependency_installation_mode: PIP
5+
convert_readme_fragments_to_markdown: false
6+
enable_checklog_odoo: false
67
generate_requirements_txt: true
78
github_check_license: true
89
github_ci_extra_env: {}
@@ -11,6 +12,7 @@ github_enable_makepot: true
1112
github_enable_stale_action: true
1213
github_enforce_dev_status_compatibility: true
1314
include_wkhtmltopdf: false
15+
odoo_test_flavor: Both
1416
odoo_version: 15.0
1517
org_name: Odoo Community Association (OCA)
1618
org_slug: OCA
@@ -19,6 +21,6 @@ repo_description: 'TODO: add repo description.'
1921
repo_name: connector
2022
repo_slug: connector
2123
repo_website: https://github.com/OCA/connector
22-
travis_apt_packages: []
23-
travis_apt_sources: []
24+
use_pyproject_toml: false
25+
use_ruff: false
2426

.eslintrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ globals:
2222
odoo: readonly
2323
openerp: readonly
2424
owl: readonly
25+
luxon: readonly
2526

2627
# Styling is handled by Prettier, so we only need to enable AST rules;
2728
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890

.github/workflows/pre-commit.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,29 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-22.04
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-python@v2
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
1820
- name: Get python version
1921
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
20-
- uses: actions/cache@v1
22+
- uses: actions/cache@v4
2123
with:
2224
path: ~/.cache/pre-commit
2325
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
2426
- name: Install pre-commit
2527
run: pip install pre-commit
2628
- name: Run pre-commit
2729
run: pre-commit run --all-files --show-diff-on-failure --color=always
30+
env:
31+
# Consider valid a PR that changes README fragments but doesn't
32+
# change the README.rst file itself. It's not really a problem
33+
# because the bot will update it anyway after merge. This way, we
34+
# lower the barrier for functional contributors that want to fix the
35+
# readme fragments, while still letting developers get README
36+
# auto-generated (which also helps functionals when using runboat).
37+
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
38+
SKIP: oca-gen-addon-readme
2839
- name: Check that all files generated by pre-commit are in git
2940
run: |
3041
newfiles="$(git ls-files --others --exclude-from=.gitignore)"

.github/workflows/stale.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Stale PRs and issues policy
12-
uses: actions/stale@v4
12+
uses: actions/stale@v9
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
# General settings.
@@ -48,7 +48,7 @@ jobs:
4848
# * Issues that are pending more information
4949
# * Except Issues marked as "no stale"
5050
- name: Needs more information stale issues policy
51-
uses: actions/stale@v4
51+
uses: actions/stale@v9
5252
with:
5353
repo-token: ${{ secrets.GITHUB_TOKEN }}
5454
ascending: true

.github/workflows/test.yml

+6-4
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@v2
17+
- uses: actions/checkout@v4
1818
- run: |
1919
for reqfile in requirements.txt test-requirements.txt ; do
2020
if [ -f ${reqfile} ] ; then
@@ -36,10 +36,10 @@ jobs:
3636
matrix:
3737
include:
3838
- container: ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest
39-
makepot: "true"
4039
name: test with Odoo
4140
- container: ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest
4241
name: test with OCB
42+
makepot: "true"
4343
services:
4444
postgres:
4545
image: postgres:9.6
@@ -50,7 +50,7 @@ jobs:
5050
ports:
5151
- 5432:5432
5252
steps:
53-
- uses: actions/checkout@v2
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 == 'OCA' }}

.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

+44-13
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ 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)
1212
/static/(src/)?lib/|
1313
# Repos using Sphinx to generate docs don't need prettying
1414
^docs/_templates/.*\.html$|
15+
# Don't bother non-technical authors with formatting issues in docs
16+
readme/.*\.(rst|md)$|
17+
# Ignore build and dist directories in addons
18+
/build/|/dist/|
19+
# Ignore test files in addons
20+
/tests/samples/.*|
1521
# You don't usually want a bot to modify your legal texts
1622
(LICENSE.*|COPYING.*)
1723
default_language_version:
@@ -33,14 +39,29 @@ repos:
3339
language: fail
3440
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
3541
- repo: https://github.com/oca/maintainer-tools
36-
rev: dfba427ba03900b69e0a7f2c65890dc48921d36a
42+
rev: d5fab7ee87fceee858a3d01048c78a548974d935
3743
hooks:
3844
# update the NOT INSTALLABLE ADDONS section above
3945
- id: oca-update-pre-commit-excluded-addons
4046
- id: oca-fix-manifest-website
4147
args: ["https://github.com/OCA/connector"]
48+
- id: oca-gen-addon-readme
49+
args:
50+
- --addons-dir=.
51+
- --branch=15.0
52+
- --org-name=OCA
53+
- --repo-name=connector
54+
- --if-source-changed
55+
- --keep-source-digest
56+
- repo: https://github.com/OCA/odoo-pre-commit-hooks
57+
rev: v0.0.25
58+
hooks:
59+
- id: oca-checks-odoo-module
60+
- id: oca-checks-po
61+
args:
62+
- --disable=po-pretty-format
4263
- repo: https://github.com/myint/autoflake
43-
rev: v1.4
64+
rev: v1.5.3
4465
hooks:
4566
- id: autoflake
4667
args:
@@ -54,25 +75,35 @@ repos:
5475
rev: 22.3.0
5576
hooks:
5677
- id: black
57-
- repo: https://github.com/pre-commit/mirrors-prettier
58-
rev: v2.4.1
78+
- repo: local
5979
hooks:
6080
- id: prettier
6181
name: prettier (with plugin-xml)
82+
entry: prettier
83+
args:
84+
- --write
85+
- --list-different
86+
- --ignore-unknown
87+
types: [text]
88+
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
89+
language: node
6290
additional_dependencies:
6391
- "prettier@2.4.1"
6492
- "@prettier/plugin-xml@1.1.0"
65-
args:
66-
- --plugin=@prettier/plugin-xml
67-
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
68-
- repo: https://github.com/pre-commit/mirrors-eslint
69-
rev: v7.32.0
93+
- repo: local
7094
hooks:
7195
- id: eslint
72-
verbose: true
96+
name: eslint
97+
entry: eslint
7398
args:
7499
- --color
75100
- --fix
101+
verbose: true
102+
types: [javascript]
103+
language: node
104+
additional_dependencies:
105+
- "eslint@v7.32.0"
106+
- "eslint-plugin-jsdoc@"
76107
- repo: https://github.com/pre-commit/pre-commit-hooks
77108
rev: v4.0.1
78109
hooks:
@@ -119,13 +150,13 @@ repos:
119150
- --header
120151
- "# generated from manifests external_dependencies"
121152
- repo: https://github.com/PyCQA/flake8
122-
rev: 3.9.2
153+
rev: 5.0.0
123154
hooks:
124155
- id: flake8
125156
name: flake8
126157
additional_dependencies: ["flake8-bugbear==21.9.2"]
127158
- repo: https://github.com/OCA/pylint-odoo
128-
rev: 7.0.2
159+
rev: 7.0.5
129160
hooks:
130161
- id: pylint_odoo
131162
name: pylint with optional checks

0 commit comments

Comments
 (0)