[UPDATE] copier from template

This commit is contained in:
AaronHForgeFlow
2022-04-22 11:01:21 +02:00
committed by Aaron ForgeFlow
parent e942dc7bcc
commit 4ae550b76e
9 changed files with 154 additions and 79 deletions

View File

@@ -1,14 +1,17 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.3.7
_commit: v1.6.1
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: false
include_wkhtmltopdf: true
odoo_version: 15.0
org_name: ForgeFlow
org_slug: ForgeFlow
rebel_module_groups: []
repo_description: Return Merchandise Authorization for Odoo
repo_name: stock-rma
repo_slug: https://github.com/ForgeFlow/stock-rma
repo_website: https://github.com/ForgeFlow/stock-rma
travis_apt_packages: []
travis_apt_sources: []

View File

@@ -4,7 +4,7 @@ env:
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2017
ecmaVersion: 2019
overrides:
- files:

View File

@@ -3,10 +3,11 @@ name: pre-commit
on:
pull_request:
branches:
- "15.0"
- "15.0*"
push:
branches:
- "15.0"
- "15.0-ocabot-*"
jobs:
pre-commit:
@@ -14,14 +15,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
# The pylint-odoo version we use here does not support python 3.10
# https://github.com/OCA/oca-addons-repo-template/issues/80
# We also need to pin to an older version of python for older odoo versions
# where we are not using black > 21. Older black versions won't work with
# Python 3.9.8+, and we can't bump black without reformatting.
python-version: "3.9.7"
- uses: pre-commit/action@v2.0.3
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"

View File

@@ -1,22 +1,45 @@
name: test Odoo addons
name: tests
on:
pull_request:
branches:
- "15.0"
- "15.0*"
push:
branches:
- "15.0"
- "15.0-ocabot-*"
jobs:
unreleased-deps:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v2
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
fi
fi
done
test:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest
makepot: "true"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest
name: test with OCB
services:
postgres:
image: postgres:9.6
@@ -32,6 +55,10 @@ jobs:
persist-credentials: false
- name: Install addons and dependencies
run: oca_install_addons
- name: Check licenses
run: manifestoo -d . check-licenses
- name: Check development status
run: manifestoo -d . check-dev-status --default-dev-status=Beta
- name: Initialize test db
run: oca_init_test_database
- name: Run tests
@@ -39,4 +66,4 @@ jobs:
- uses: codecov/codecov-action@v1
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'ForgeFlow' }}

View File

@@ -1,3 +1,4 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
@@ -16,7 +17,7 @@ exclude: |
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.13.0"
node: "14.18.0"
repos:
- repo: local
hooks:
@@ -28,7 +29,7 @@ repos:
language: fail
files: "\\.rej$"
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
rev: dfba427ba03900b69e0a7f2c65890dc48921d36a
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
@@ -46,22 +47,22 @@ repos:
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.1.2
rev: v2.4.1
hooks:
- id: prettier
name: prettier (with plugin-xml)
additional_dependencies:
- "prettier@2.1.2"
- "@prettier/plugin-xml@0.12.0"
- "prettier@2.4.1"
- "@prettier/plugin-xml@1.1.0"
args:
- --plugin=@prettier/plugin-xml
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.8.1
rev: v7.32.0
hooks:
- id: eslint
verbose: true
@@ -69,7 +70,7 @@ repos:
- --color
- --fix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.0.1
hooks:
- id: trailing-whitespace
# exclude autogenerated files
@@ -91,12 +92,12 @@ repos:
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.29.0
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort
rev: 5.5.1
rev: 5.9.3
hooks:
- id: isort
name: isort except __init__.py
@@ -104,17 +105,17 @@ repos:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.0.4
rev: 3.0.3
hooks:
- id: setuptools-odoo-make-default
- repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.3
rev: 3.9.2
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==20.1.4"]
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/PyCQA/pylint
rev: pylint-2.5.3
rev: v2.11.1
hooks:
- id: pylint
name: pylint with optional checks
@@ -123,7 +124,7 @@ repos:
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==3.5.0
- pylint-odoo==5.0.5
- id: pylint
name: pylint with mandatory checks
args:

View File

@@ -4,7 +4,7 @@ score=n
[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Odoo Community Association (OCA)
manifest_required_authors=ForgeFlow
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
@@ -63,6 +63,38 @@ enable=anomalous-backslash-in-string,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
attribute-string-redundant,
character-not-valid-in-resource-link,
consider-merging-classes-inherited,
context-overridden,
create-user-wo-reset-password,
dangerous-filter-wo-user,
dangerous-qweb-replace-wo-priority,
deprecated-data-xml-node,
deprecated-openerp-xml-node,
duplicate-po-message-definition,
except-pass,
file-not-used,
invalid-commit,
manifest-maintainers-list,
missing-newline-extrafiles,
missing-readme,
missing-return,
odoo-addons-relative-import,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
renamed-field-parameter,
resource-not-exist,
str-format-used,
test-folder-imported,
translation-contains-variable,
translation-positional-used,
unnecessary-utf8-coding-comment,
website-manifest-key-not-valid-uri,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
# messages that do not cause the lint step to fail
consider-merging-classes-inherited,
create-user-wo-reset-password,

View File

@@ -4,7 +4,7 @@ score=n
[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Odoo Community Association (OCA)
manifest_required_authors=ForgeFlow
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
@@ -55,7 +55,39 @@ enable=anomalous-backslash-in-string,
unreachable,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error
xml-syntax-error,
attribute-string-redundant,
character-not-valid-in-resource-link,
consider-merging-classes-inherited,
context-overridden,
create-user-wo-reset-password,
dangerous-filter-wo-user,
dangerous-qweb-replace-wo-priority,
deprecated-data-xml-node,
deprecated-openerp-xml-node,
duplicate-po-message-definition,
except-pass,
file-not-used,
invalid-commit,
manifest-maintainers-list,
missing-newline-extrafiles,
missing-readme,
missing-return,
odoo-addons-relative-import,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
renamed-field-parameter,
resource-not-exist,
str-format-used,
test-folder-imported,
translation-contains-variable,
translation-positional-used,
unnecessary-utf8-coding-comment,
website-manifest-key-not-valid-uri,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}

View File

@@ -1,43 +0,0 @@
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
python:
- "3.6"
addons:
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
stages:
- test
jobs:
include:
- stage: test
env:
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
- stage: test
env:
- TESTS=1 ODOO_REPO="OCA/OCB"
env:
global:
- VERSION="15.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
- WKHTMLTOPDF_VERSION="0.12.5"
- MQT_DEP=PIP
install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
script:
- travis_run_tests
after_success:
- travis_after_tests_success

View File

@@ -1,15 +1,35 @@
[![Build Status](https://travis-ci.com/ForgeFlow/stock-rma.svg?branch=15.0)](https://travis-ci.com/ForgeFlow/stock-rma)
[![codecov](https://codecov.io/gh/ForgeFlow/stock-rma/branch/15.0/graph/badge.svg)](https://codecov.io/gh/ForgeFlow/stock-rma)
<!-- /!\ Non OCA Context : Set here the badge of your runbot / runboat instance. -->
[![Pre-commit Status](https://github.com/ForgeFlow/https://github.com/ForgeFlow/stock-rma/actions/workflows/pre-commit.yml/badge.svg?branch=15.0)](https://github.com/ForgeFlow/https://github.com/ForgeFlow/stock-rma/actions/workflows/pre-commit.yml?query=branch%3A15.0)
[![Build Status](https://github.com/ForgeFlow/https://github.com/ForgeFlow/stock-rma/actions/workflows/test.yml/badge.svg?branch=15.0)](https://github.com/ForgeFlow/https://github.com/ForgeFlow/stock-rma/actions/workflows/test.yml?query=branch%3A15.0)
[![codecov](https://codecov.io/gh/ForgeFlow/https://github.com/ForgeFlow/stock-rma/branch/15.0/graph/badge.svg)](https://codecov.io/gh/ForgeFlow/https://github.com/ForgeFlow/stock-rma)
<!-- /!\ Non OCA Context : Set here the badge of your translation instance. -->
<!-- /!\ do not modify above this line -->
# stock-rma
Return Merchandise Authorization for Odoo
<!-- /!\ do not modify below this line -->
<!-- prettier-ignore-start -->
[//]: # (addons)
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
[//]: # (end addons)
<!-- prettier-ignore-end -->
## Licenses
This repository is licensed under [AGPL-3.0](LICENSE).
However, each module can have a totally different license, as long as they adhere to OCA
[Odoo Community Association](http://odoo-community.org/) policy.
Consult each module's `__manifest__.py` file, which contains a `license` key
However, each module can have a totally different license, as long as they adhere to ForgeFlow
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
that explains its license.
----
<!-- /!\ Non OCA Context : Set here the full description of your organization. -->