Skip to content

Commit f1484ac

Browse files
committed
Initialize 15.0 branch
0 parents  commit f1484ac

19 files changed

+1559
-0
lines changed

.copier-answers.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: v1.3.2
3+
_src_path: gh:oca/oca-addons-repo-template
4+
ci: GitHub
5+
dependency_installation_mode: PIP
6+
generate_requirements_txt: true
7+
include_wkhtmltopdf: false
8+
odoo_version: 15.0
9+
rebel_module_groups: []
10+
repo_description: 'TODO: add repo description.'
11+
repo_name: delivery-carrier
12+
repo_slug: delivery-carrier
13+
travis_apt_packages: []
14+
travis_apt_sources: []

.editorconfig

+20
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

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

.flake8

+12
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

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
- uses: pre-commit/action@v2.0.0

.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@v4
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@v4
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

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: test Odoo addons
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "15.0*"
7+
push:
8+
branches:
9+
- "15.0*"
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
container: ${{ matrix.container }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- container: ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest
20+
makepot: "true"
21+
- container: ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest
22+
services:
23+
postgres:
24+
image: postgres:9.6
25+
env:
26+
POSTGRES_USER: odoo
27+
POSTGRES_PASSWORD: odoo
28+
POSTGRES_DB: odoo
29+
ports:
30+
- 5432:5432
31+
steps:
32+
- uses: actions/checkout@v2
33+
with:
34+
persist-credentials: false
35+
- name: Install addons and dependencies
36+
run: oca_install_addons
37+
- name: Check licenses
38+
run: manifestoo -d . check-licenses
39+
- name: Check development status
40+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
41+
- name: Initialize test db
42+
run: oca_init_test_database
43+
- name: Run tests
44+
run: oca_run_tests
45+
- uses: codecov/codecov-action@v1
46+
- name: Update .pot files
47+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
48+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}

0 commit comments

Comments
 (0)