Skip to content

Commit 33a64f2

Browse files
[UPD] dotfiels
1 parent 9122a07 commit 33a64f2

File tree

12 files changed

+1073
-257
lines changed

12 files changed

+1073
-257
lines changed

.copier-answers.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: v1.14.1
3+
_src_path: https://github.com/OCA/oca-addons-repo-template.git
4+
ci: GitHub
5+
dependency_installation_mode: PIP
6+
generate_requirements_txt: true
7+
github_check_license: true
8+
github_ci_extra_env: {}
9+
github_enable_codecov: true
10+
github_enable_makepot: false
11+
github_enable_stale_action: true
12+
github_enforce_dev_status_compatibility: true
13+
include_wkhtmltopdf: false
14+
odoo_version: 10.0
15+
org_name: Quartile Limited
16+
org_slug: qrtl
17+
rebel_module_groups: []
18+
repo_description: PCI Custom
19+
repo_name: null
20+
repo_slug: pci-custom
21+
repo_website: https://www.quartile.co
22+
travis_apt_packages: []
23+
travis_apt_sources: []
24+

.flake8

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[flake8]
2-
max-line-length = 80
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
2+
# E123,E133,E226,E241,E242 are ignored by default by pep8 and flake8
3+
# F811 is legal in odoo 8 when we implement 2 interfaces for a method
4+
# F601 pylint support this case with expected tests
5+
# W503 changed by W504 and OCA prefers allow both
6+
# E203: whitespace before ':' (black behaviour and not pep8 compliant)
7+
ignore = E123,E133,E226,E241,E242,F811,F601,W503,W504,E203
8+
max-line-length = 88
9+
per-file-ignores=
10+
__init__.py:F401
11+

.github/workflows/pre-commit.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,36 @@ name: pre-commit
22

33
on:
44
pull_request:
5+
branches:
6+
- "10.0*"
57
push:
8+
branches:
9+
- "10.0"
10+
- "10.0-ocabot-*"
611

712
jobs:
813
pre-commit:
9-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-20.04
1015
steps:
1116
- uses: actions/checkout@v2
1217
- uses: actions/setup-python@v2
13-
- uses: pre-commit/[email protected]
18+
with:
19+
python-version: "2.7"
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+
- name: Check that all files generated by pre-commit are in git
31+
run: |
32+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
33+
if [ "$newfiles" != "" ] ; then
34+
echo "Please check-in the following files:"
35+
echo "$newfiles"
36+
exit 1
37+
fi

.github/workflows/stale.yml

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "10.0*"
7+
push:
8+
branches:
9+
- "10.0"
10+
- "10.0-ocabot-*"
11+
12+
jobs:
13+
# unreleased-deps:
14+
# runs-on: ubuntu-latest
15+
# name: Detect unreleased dependencies
16+
# steps:
17+
# - uses: actions/checkout@v2
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-20.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/py2.7-ocb10.0:latest
39+
name: test with OCB
40+
services:
41+
postgres:
42+
image: postgres:9.6
43+
env:
44+
POSTGRES_USER: odoo
45+
POSTGRES_PASSWORD: odoo
46+
POSTGRES_DB: odoo
47+
ports:
48+
- 5432:5432
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
persist-credentials: false
53+
- name: Install addons and dependencies
54+
run: oca_install_addons
55+
- name: Check licenses
56+
run: manifestoo -d . check-licenses
57+
- name: Check development status
58+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
59+
- name: Initialize test db
60+
run: oca_init_test_database
61+
- name: Run tests
62+
run: oca_run_tests
63+
- uses: codecov/codecov-action@v1
64+
- name: Update .pot files
65+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
66+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'qrtl' }}

.gitignore

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
33
*.py[cod]
4+
/.venv
5+
/.pytest_cache
46

57
# C extensions
68
*.so
@@ -13,14 +15,14 @@ build/
1315
develop-eggs/
1416
dist/
1517
eggs/
16-
lib/
1718
lib64/
1819
parts/
1920
sdist/
2021
var/
2122
*.egg-info/
2223
.installed.cfg
2324
*.egg
25+
*.eggs
2426

2527
# Installer logs
2628
pip-log.txt
@@ -40,6 +42,19 @@ coverage.xml
4042
# Pycharm
4143
.idea
4244

45+
# Eclipse
46+
.settings
47+
48+
# Visual Studio cache/options directory
49+
.vs/
50+
.vscode
51+
52+
# OSX Files
53+
.DS_Store
54+
55+
# Django stuff:
56+
*.log
57+
4358
# Mr Developer
4459
.mr.developer.cfg
4560
.project
@@ -55,5 +70,5 @@ docs/_build/
5570
*~
5671
*.swp
5772

58-
# OSX Files
59-
*.DS_Store
73+
# OCA rules
74+
!static/lib/

0 commit comments

Comments
 (0)