-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basically I'm replacing doodba-scaffolding. The README explains the important changes. @Tecnativa TT20357
- Loading branch information
1 parent
e6f8e81
commit e65754c
Showing
396 changed files
with
14,790 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Changes here will be overwritten by Copier | ||
{{ _copier_answers|to_nice_yaml }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PGPASSWORD={{ postgres_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
POSTGRES_PASSWORD={{ postgres_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ADMIN_PASSWORD={{ odoo_admin_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#jinja2: lstrip_blocks: "true", trim_blocks: "true" | ||
{%- if backup_aws_access_key_id %} | ||
AWS_ACCESS_KEY_ID={{ backup_aws_access_key_id }} | ||
{%- endif %} | ||
{%- if backup_aws_secret_access_key %} | ||
AWS_SECRET_ACCESS_KEY={{ backup_aws_secret_access_key }} | ||
{%- endif %} | ||
PASSPHRASE={{ backup_passphrase }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RELAY_PASSWORD={{ smtp_relay_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Odoo | ||
ODOO_MAJOR={{ "%.0f"|format(odoo_version) }} | ||
ODOO_MINOR={{ "%.1f"|format(odoo_version) }} | ||
INITIAL_LANG={{ odoo_initial_lang }} | ||
{%- if odoo_oci_image %} | ||
ODOO_IMAGE={{ odoo_oci_image }} | ||
{%- endif %} | ||
ODOO_PROXY_MODE={{ (odoo_proxy is not none)|string|lower }} | ||
|
||
# Domains | ||
DOMAIN_TEST={{ domain_test or "" }} | ||
DOMAIN_PROD={{ domain_prod or "" }} | ||
{%- if domain_prod_alternatives %} | ||
{%- for domain in domain_prod_alternatives %} | ||
DOMAIN_PROD_ALT_{{ loop.index0 }}={{ domain }} | ||
{%- endfor %} | ||
{%- endif %} | ||
|
||
# Database | ||
DB_VERSION={{ postgres_version }} | ||
DB_USER={{ postgres_username }} | ||
DB_FILTER={{ odoo_dbfilter }} | ||
|
||
# Real SMTP relay | ||
SMTP_DEFAULT_FROM={{ smtp_default_from or "" }} | ||
{%- if smtp_relay_host %} | ||
SMTP_REAL_MAILNAME={{ smtp_canonical_default }} | ||
SMTP_REAL_RELAY_HOST={{ smtp_relay_host }} | ||
SMTP_REAL_RELAY_PORT={{ smtp_relay_port }} | ||
SMTP_REAL_RELAY_USER={{ smtp_relay_user }} | ||
SMTP_REAL_CANONICAL_DOMAINS={{ | ||
([smtp_canonical_default] + (smtp_canonical_domains or [])) | ||
|unique|sort|join(",") | ||
}} | ||
SMTP_REAL_NON_CANONICAL_DEFAULT={{ smtp_canonical_default }} | ||
{%- endif %} | ||
{%- if backup_dst %} | ||
|
||
# Backup | ||
BACKUP_DST={{ backup_dst }} | ||
{%- if smtp_relay_host %} | ||
BACKUP_EMAIL_FROM={{ backup_email_from }} | ||
BACKUP_EMAIL_TO={{ backup_email_to }} | ||
{%- endif %} | ||
BACKUP_TZ={{ backup_tz }} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.eslintrc.yml" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.flake8" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: automerge | ||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- labeled | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
- synchronize | ||
- unlabeled | ||
- unlocked | ||
pull_request_review: | ||
types: | ||
- submitted | ||
status: {} | ||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: automerge | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_DELETE_BRANCH: "true" | ||
MERGE_LABELS: "automerge,!work in progress" | ||
MERGE_METHOD: "rebase" | ||
UPDATE_METHOD: "rebase" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install python | ||
uses: actions/setup-python@v1 | ||
- name: Generate cache key PY | ||
run: | ||
echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' | ||
-f1)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: .venv | ||
key: venv|${{ env.PY }}|${{ hashFiles('poetry.lock') }} | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache | ||
key: | ||
pre-commit|${{ env.PY }}|${{ hashFiles('poetry.lock') }}|${{ | ||
hashFiles('.pre-commit-config.yaml') }} | ||
- run: pip install invoke poetry | ||
- run: invoke develop | ||
- run: invoke lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Docker | ||
uses: docker-practice/[email protected] | ||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Generate cache key PY for python ${{ matrix.python-version }} | ||
run: | ||
echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' | ||
-f1)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: .venv | ||
key: venv|${{ env.PY }}|${{ hashFiles('poetry.lock') }} | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache | ||
key: | ||
pre-commit|${{ env.PY }}|${{ hashFiles('poetry.lock') }}|${{ | ||
hashFiles('.pre-commit-config.yaml') }} | ||
- run: git config --global user.name CI | ||
- run: git config --global user.email CI@GITHUB | ||
- run: pip install invoke poetry | ||
- run: invoke develop | ||
# Precreate shared networks to avoid race conditions | ||
- run: docker network create inverseproxy_shared | ||
- run: docker network create globalwhitelist_shared | ||
- run: invoke test --verbose | ||
env: | ||
QA_TEST: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Ignore all src directories except private and files with a dot | ||
/odoo/auto | ||
/odoo/custom/src/.git/.. | ||
|
||
# Ignore docker-compose.yml by default, to allow easy defaults per clone | ||
/docker-compose.yml | ||
|
||
# Compiled formats, cache, temporary files, git garbage | ||
**.~ | ||
**.mo | ||
**.py[co] | ||
**.egg-info | ||
**.orig | ||
**.rej | ||
|
||
# User-specific or editor-specific development files and settings | ||
/.venv | ||
/doodba.*.code-workspace | ||
/src | ||
|
||
# Project-specific docker configurations | ||
/.docker/*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "vendor/maintainer-quality-tools"] | ||
path = vendor/maintainer-quality-tools | ||
url = https://github.com/OCA/maintainer-quality-tools.git | ||
branch = master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.isort.cfg" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{# We cannot use the same pre-commit config as MQT's because paths don't match | ||
and it's designed only for Odoo 13.0+, so we design our own version, which | ||
should be as close as possible to MQT's -#} | ||
exclude: | | ||
(?x) | ||
# Files and folders generated by bots, to avoid loops | ||
|/static/description/index\.html$| | ||
# Library files can have extraneous formatting (even minimized) | ||
/static/(src/)?lib/| | ||
# You don't usually want a bot to modify your legal texts | ||
(LICENSE.*|COPYING.*) | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/prettier/prettier | ||
rev: "1.19.1" | ||
hooks: | ||
- id: prettier | ||
# TODO Avoid awebdeveloper/pre-commit-prettier if possible | ||
# HACK https://github.com/prettier/prettier/issues/7407 | ||
- repo: https://github.com/awebdeveloper/pre-commit-prettier | ||
rev: v0.0.1 | ||
hooks: | ||
- id: prettier | ||
name: prettier xml plugin | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "@prettier/[email protected]" | ||
files: \.xml$ | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v6.8.0 | ||
hooks: | ||
- id: eslint | ||
verbose: true | ||
args: | ||
- --color | ||
- --fix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- id: flake8 | ||
name: flake8 except __init__.py | ||
exclude: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- id: flake8 | ||
name: flake8 only __init__.py | ||
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py | ||
files: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- id: fix-encoding-pragma | ||
{%- if odoo_version >= 11 %} | ||
args: ["--remove"] | ||
{%- endif %} | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v2.4.4 | ||
hooks: | ||
- id: pylint | ||
name: pylint with optional checks | ||
args: ["--rcfile=.pylintrc", "--exit-zero"] | ||
verbose: true | ||
additional_dependencies: ["pylint-odoo==3.1.0"] | ||
- id: pylint | ||
name: pylint with mandatory checks | ||
args: ["--rcfile=.pylintrc-mandatory"] | ||
additional_dependencies: ["pylint-odoo==3.1.0"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.26.2 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 4.3.21 | ||
hooks: | ||
- id: isort | ||
name: isort except __init__.py | ||
exclude: /__init__\.py$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.prettierrc.yml" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.pylintrc-mandatory" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include "vendor/maintainer-quality-tools/sample_files/pre-commit-13.0/.pylintrc" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// See spec in https://code.visualstudio.com/docs/editor/userdefinedsnippets | ||
{ | ||
// See https://github.com/Tecnativa/doodba#optodoocustomsrcreposyaml | ||
"Git aggregator repo": { | ||
"prefix": "repo", | ||
"scope": "yaml", | ||
"body": [ | ||
"${10:repo-name}:", | ||
"\tdefaults:", | ||
"\t\tdepth: \\$DEPTH_MERGE", | ||
"\tremotes:", | ||
"\t\t${40:origin}: ${30:https://github.com/${20:OCA}/${10}.git}", | ||
"\ttarget: ${40} \\$ODOO_VERSION", | ||
"\tmerges:", | ||
"\t\t- ${40} \\$ODOO_VERSION", | ||
"\t\t- ${40} refs/pull/${50:1234}/head" | ||
], | ||
"description": "Git-aggregator repo definition with merges" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"dchanco.vsc-invoke", | ||
"EditorConfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"mrorz.language-gettext", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.python", | ||
"qub.qub-xml-vscode", | ||
"samuelcolvin.jinjahtml", | ||
"syler.sass-indented" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
// More info on this file: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: pytest", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/.venv/bin/pytest", | ||
"args": ["tests"], | ||
"console": "integratedTerminal", | ||
"subProcess": true | ||
}, | ||
{ | ||
"name": "Python: pytest verbose", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/.venv/bin/pytest", | ||
"args": ["-vv", "tests"], | ||
"console": "integratedTerminal", | ||
"justMyCode": false, | ||
"subProcess": true | ||
} | ||
] | ||
} |
Oops, something went wrong.