Skip to content

Commit e198581

Browse files
authored
[3829][UPD] dotfiles (#27)
* [3829][16.0][UPD] dotfiles
1 parent d9dd715 commit e198581

File tree

21 files changed

+1495
-13
lines changed

21 files changed

+1495
-13
lines changed

.copier-answers.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: v1.27
3+
_src_path: https://github.com/OCA/oca-addons-repo-template.git
4+
ci: GitHub
5+
convert_readme_fragments_to_markdown: true
6+
enable_checklog_odoo: false
7+
generate_requirements_txt: true
8+
github_check_license: true
9+
github_ci_extra_env: {}
10+
github_enable_codecov: false
11+
github_enable_makepot: false
12+
github_enable_stale_action: false
13+
github_enforce_dev_status_compatibility: false
14+
include_wkhtmltopdf: false
15+
odoo_test_flavor: OCB
16+
odoo_version: 16.0
17+
org_name: Odoo Community Association (OCA)
18+
org_slug: qrtl
19+
rebel_module_groups: []
20+
repo_description: ''
21+
repo_name: FAL OCA
22+
repo_slug: fal-oca
23+
repo_website: ''
24+
use_pyproject_toml: false
25+
use_ruff: false
26+

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Configuration for known file extensions
2+
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
3+
charset = utf-8
4+
end_of_line = lf
5+
indent_size = 4
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{json,yml,yaml,rst,md}]
11+
indent_size = 2
12+
13+
# Do not configure editor for libs and autogenerated content
14+
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
15+
charset = unset
16+
end_of_line = unset
17+
indent_size = unset
18+
indent_style = unset
19+
insert_final_newline = false
20+
trim_trailing_whitespace = false

.eslintrc.yml

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
env:
2+
browser: true
3+
es6: true
4+
5+
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
6+
parserOptions:
7+
ecmaVersion: 2019
8+
9+
overrides:
10+
- files:
11+
- "**/*.esm.js"
12+
parserOptions:
13+
sourceType: module
14+
15+
# Globals available in Odoo that shouldn't produce errorings
16+
globals:
17+
_: readonly
18+
$: readonly
19+
fuzzy: readonly
20+
jQuery: readonly
21+
moment: readonly
22+
odoo: readonly
23+
openerp: readonly
24+
owl: readonly
25+
luxon: readonly
26+
27+
# Styling is handled by Prettier, so we only need to enable AST rules;
28+
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
29+
rules:
30+
accessor-pairs: warn
31+
array-callback-return: warn
32+
callback-return: warn
33+
capitalized-comments:
34+
- warn
35+
- always
36+
- ignoreConsecutiveComments: true
37+
ignoreInlineComments: true
38+
complexity:
39+
- warn
40+
- 15
41+
constructor-super: warn
42+
dot-notation: warn
43+
eqeqeq: warn
44+
global-require: warn
45+
handle-callback-err: warn
46+
id-blacklist: warn
47+
id-match: warn
48+
init-declarations: error
49+
max-depth: warn
50+
max-nested-callbacks: warn
51+
max-statements-per-line: warn
52+
no-alert: warn
53+
no-array-constructor: warn
54+
no-caller: warn
55+
no-case-declarations: warn
56+
no-class-assign: warn
57+
no-cond-assign: error
58+
no-const-assign: error
59+
no-constant-condition: warn
60+
no-control-regex: warn
61+
no-debugger: error
62+
no-delete-var: warn
63+
no-div-regex: warn
64+
no-dupe-args: error
65+
no-dupe-class-members: error
66+
no-dupe-keys: error
67+
no-duplicate-case: error
68+
no-duplicate-imports: error
69+
no-else-return: warn
70+
no-empty-character-class: warn
71+
no-empty-function: error
72+
no-empty-pattern: error
73+
no-empty: warn
74+
no-eq-null: error
75+
no-eval: error
76+
no-ex-assign: error
77+
no-extend-native: warn
78+
no-extra-bind: warn
79+
no-extra-boolean-cast: warn
80+
no-extra-label: warn
81+
no-fallthrough: warn
82+
no-func-assign: error
83+
no-global-assign: error
84+
no-implicit-coercion:
85+
- warn
86+
- allow: ["~"]
87+
no-implicit-globals: warn
88+
no-implied-eval: warn
89+
no-inline-comments: warn
90+
no-inner-declarations: warn
91+
no-invalid-regexp: warn
92+
no-irregular-whitespace: warn
93+
no-iterator: warn
94+
no-label-var: warn
95+
no-labels: warn
96+
no-lone-blocks: warn
97+
no-lonely-if: error
98+
no-mixed-requires: error
99+
no-multi-str: warn
100+
no-native-reassign: error
101+
no-negated-condition: warn
102+
no-negated-in-lhs: error
103+
no-new-func: warn
104+
no-new-object: warn
105+
no-new-require: warn
106+
no-new-symbol: warn
107+
no-new-wrappers: warn
108+
no-new: warn
109+
no-obj-calls: warn
110+
no-octal-escape: warn
111+
no-octal: warn
112+
no-param-reassign: warn
113+
no-path-concat: warn
114+
no-process-env: warn
115+
no-process-exit: warn
116+
no-proto: warn
117+
no-prototype-builtins: warn
118+
no-redeclare: warn
119+
no-regex-spaces: warn
120+
no-restricted-globals: warn
121+
no-restricted-imports: warn
122+
no-restricted-modules: warn
123+
no-restricted-syntax: warn
124+
no-return-assign: error
125+
no-script-url: warn
126+
no-self-assign: warn
127+
no-self-compare: warn
128+
no-sequences: warn
129+
no-shadow-restricted-names: warn
130+
no-shadow: warn
131+
no-sparse-arrays: warn
132+
no-sync: warn
133+
no-this-before-super: warn
134+
no-throw-literal: warn
135+
no-undef-init: warn
136+
no-undef: error
137+
no-unmodified-loop-condition: warn
138+
no-unneeded-ternary: error
139+
no-unreachable: error
140+
no-unsafe-finally: error
141+
no-unused-expressions: error
142+
no-unused-labels: error
143+
no-unused-vars: error
144+
no-use-before-define: error
145+
no-useless-call: warn
146+
no-useless-computed-key: warn
147+
no-useless-concat: warn
148+
no-useless-constructor: warn
149+
no-useless-escape: warn
150+
no-useless-rename: warn
151+
no-void: warn
152+
no-with: warn
153+
operator-assignment: [error, always]
154+
prefer-const: warn
155+
radix: warn
156+
require-yield: warn
157+
sort-imports: warn
158+
spaced-comment: [error, always]
159+
strict: [error, function]
160+
use-isnan: error
161+
valid-jsdoc:
162+
- warn
163+
- prefer:
164+
arg: param
165+
argument: param
166+
augments: extends
167+
constructor: class
168+
exception: throws
169+
func: function
170+
method: function
171+
prop: property
172+
return: returns
173+
virtual: abstract
174+
yield: yields
175+
preferType:
176+
array: Array
177+
bool: Boolean
178+
boolean: Boolean
179+
number: Number
180+
object: Object
181+
str: String
182+
string: String
183+
requireParamDescription: false
184+
requireReturn: false
185+
requireReturnDescription: false
186+
requireReturnType: false
187+
valid-typeof: warn
188+
yoda: warn

.flake8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
max-line-length = 88
3+
max-complexity = 16
4+
# B = bugbear
5+
# B9 = bugbear opinionated (incl line length)
6+
select = C,E,F,W,B,B9
7+
# E203: whitespace before ':' (black behaviour)
8+
# E501: flake8 line length (covered by bugbear B950)
9+
# W503: line break before binary operator (black behaviour)
10+
ignore = E203,E501,W503
11+
per-file-ignores=
12+
__init__.py:F401

.github/workflows/pre-commit.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "16.0*"
7+
push:
8+
branches:
9+
- "16.0"
10+
- "16.0-ocabot-*"
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: "3.11"
20+
- name: Get python version
21+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22+
- uses: actions/cache@v1
23+
with:
24+
path: ~/.cache/pre-commit
25+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
26+
- name: Install pre-commit
27+
run: pip install pre-commit
28+
- name: Run pre-commit
29+
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
39+
- name: Check that all files generated by pre-commit are in git
40+
run: |
41+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
42+
if [ "$newfiles" != "" ] ; then
43+
echo "Please check-in the following files:"
44+
echo "$newfiles"
45+
exit 1
46+
fi

.github/workflows/test.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "16.0*"
7+
push:
8+
branches:
9+
- "16.0"
10+
- "16.0-ocabot-*"
11+
12+
jobs:
13+
# unreleased-deps:
14+
# runs-on: ubuntu-latest
15+
# name: Detect unreleased dependencies
16+
# steps:
17+
# - uses: actions/checkout@v3
18+
# - run: |
19+
# for reqfile in requirements.txt test-requirements.txt ; do
20+
# if [ -f ${reqfile} ] ; then
21+
# result=0
22+
# # reject non-comment lines that contain a / (i.e. URLs, relative paths)
23+
# grep "^[^#].*/" ${reqfile} || result=$?
24+
# if [ $result -eq 0 ] ; then
25+
# echo "Unreleased dependencies found in ${reqfile}."
26+
# exit 1
27+
# fi
28+
# fi
29+
# done
30+
test:
31+
runs-on: ubuntu-22.04
32+
container: ${{ matrix.container }}
33+
name: ${{ matrix.name }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- container: ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest
39+
name: test with OCB
40+
makepot: "false"
41+
services:
42+
postgres:
43+
image: postgres:12.0
44+
env:
45+
POSTGRES_USER: odoo
46+
POSTGRES_PASSWORD: odoo
47+
POSTGRES_DB: odoo
48+
ports:
49+
- 5432:5432
50+
steps:
51+
- uses: actions/checkout@v3
52+
with:
53+
persist-credentials: false
54+
- name: Install addons and dependencies
55+
run: oca_install_addons
56+
- name: Check licenses
57+
run: manifestoo -d . check-licenses
58+
- name: Check development status
59+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
60+
continue-on-error: true
61+
- name: Initialize test db
62+
run: oca_init_test_database
63+
- name: Run tests
64+
run: oca_run_tests
65+
- name: Update .pot files
66+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
67+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'qrtl' }}

.gitignore

Lines changed: 14 additions & 0 deletions
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

0 commit comments

Comments
 (0)