Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from lalithkota/17.0-develop
Browse files Browse the repository at this point in the history
Migrated latest modules from 15.0. Fixed Precommit linters formatters according to 17.0
  • Loading branch information
shibu-narayanan authored Mar 26, 2024
2 parents e26bdad + 2987b55 commit 2e18122
Show file tree
Hide file tree
Showing 54 changed files with 244 additions and 587 deletions.
18 changes: 10 additions & 8 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.14.1
_commit: v1.20
_src_path: https://github.com/OCA/oca-addons-repo-template.git
additional_ruff_rules: []
ci: GitHub
dependency_installation_mode: PIP
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_check_license: false
github_ci_extra_env: {}
github_enable_codecov: false
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: false
github_enforce_dev_status_compatibility: true
github_enforce_dev_status_compatibility: false
include_wkhtmltopdf: false
odoo_version: 15.0
odoo_test_flavor: Both
odoo_version: 17.0
org_name: OpenG2P
org_slug: OpenG2P
rebel_module_groups: []
repo_description: This repo is contains modules used by OpenG2P for Security
repo_name: OpenG2P Security
repo_slug: openg2p-security
repo_website: https://github.com/OpenG2P/openg2p-security
travis_apt_packages: []
travis_apt_sources: []
use_pyproject_toml: true
use_ruff: true

2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ parserOptions:
overrides:
- files:
- "**/*.esm.js"
- "**/*.js"
parserOptions:
sourceType: module

Expand All @@ -23,6 +22,7 @@ globals:
odoo: readonly
openerp: readonly
owl: readonly
luxon: readonly

# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
Expand Down
12 changes: 0 additions & 12 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand Down
13 changes: 0 additions & 13 deletions .isort.cfg

This file was deleted.

76 changes: 30 additions & 46 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ exclude: |
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.18.0"
node: "16.17.0"
repos:
- repo: local
hooks:
Expand All @@ -27,6 +31,15 @@ repos:
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
- id: en-po-files
name: en.po files cannot exist
entry: found a en.po file
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/sbidoul/whool
rev: v0.5
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
hooks:
Expand All @@ -37,50 +50,38 @@ repos:
- id: oca-gen-addon-readme
args:
- --addons-dir=.
- --branch=15.0-develop
- --branch=17.0-develop
- --org-name=OpenG2P
- --repo-name=openg2p-security
- --if-source-changed
- --keep-source-digest
- id: oca-gen-external-dependencies
- repo: https://github.com/myint/autoflake
rev: v1.4
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args:
- --line-length=110
- id: oca-checks-odoo-module
- id: oca-checks-po
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
rev: v2.7.1
hooks:
- id: prettier
name: prettier (with plugin-xml)
additional_dependencies:
- "prettier@2.4.1"
- "@prettier/plugin-xml@1.1.0"
- "prettier@2.7.1"
- "@prettier/plugin-xml@2.2.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.32.0
rev: v8.24.0
hooks:
- id: eslint
verbose: true
args:
- --color
- --fix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.3.0
hooks:
- id: trailing-whitespace
# exclude autogenerated files
Expand All @@ -101,31 +102,14 @@ repos:
- id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort except __init__.py
args:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.1.8
hooks:
- id: setuptools-odoo-make-default
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/OCA/pylint-odoo
rev: 7.0.2
rev: v9.0.4
hooks:
- id: pylint_odoo
name: pylint with optional checks
Expand Down
13 changes: 7 additions & 6 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ load-plugins=pylint_odoo
score=n

[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=OpenG2P
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,Other OSI approved licence
valid_odoo_versions=15.0
readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest-required-authors=OpenG2P
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,Other OSI approved licence
valid-odoo-versions=17.0

[MESSAGES CONTROL]
disable=all
Expand Down Expand Up @@ -98,6 +98,7 @@ enable=anomalous-backslash-in-string,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
external-request-timeout,
# messages that do not cause the lint step to fail
consider-merging-classes-inherited,
create-user-wo-reset-password,
Expand Down
15 changes: 8 additions & 7 deletions .pylintrc-mandatory
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ load-plugins=pylint_odoo
score=n

[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=OpenG2P
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,Other OSI approved licence
valid_odoo_versions=15.0
readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest-required-authors=OpenG2P
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,Other OSI approved licence
valid-odoo-versions=17.0

[MESSAGES CONTROL]
disable=all
Expand Down Expand Up @@ -89,7 +89,8 @@ enable=anomalous-backslash-in-string,
website-manifest-key-not-valid-uri,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute
xml-deprecated-tree-attribute,
external-request-timeout

[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
Expand Down
31 changes: 31 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

target-version = "py310"
fix = true
line-length = 110

[lint]
extend-select = [
"B",
"C90",
"E501", # line too long (default 88)
"I", # isort
"UP", # pyupgrade
]
exclude = ["setup/*"]

[format]
exclude = ["setup/*"]

[per-file-ignores]
"__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py
"__manifest__.py" = ["B018"] # useless expression

[isort]
section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"]

[isort.sections]
"odoo" = ["odoo"]
"odoo-addons" = ["odoo.addons"]

[mccabe]
max-complexity = 16
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<!-- /!\ Non OCA Context : Set here the badge of your runbot / runboat instance. -->
[![Pre-commit Status](https://github.com/OpenG2P/openg2p-security/actions/workflows/pre-commit.yml/badge.svg?branch=15.0-develop)](https://github.com/OpenG2P/openg2p-security/actions/workflows/pre-commit.yml?query=branch%3A15.0-develop)
[![Build Status](https://github.com/OpenG2P/openg2p-security/actions/workflows/test.yml/badge.svg?branch=15.0-develop)](https://github.com/OpenG2P/openg2p-security/actions/workflows/test.yml?query=branch%3A15.0-develop)
[![codecov](https://codecov.io/gh/OpenG2P/openg2p-security/branch/15.0-develop/graph/badge.svg)](https://codecov.io/gh/OpenG2P/openg2p-security)
[![Pre-commit Status](https://github.com/OpenG2P/openg2p-security/actions/workflows/pre-commit.yml/badge.svg?branch=17.0-develop)](https://github.com/OpenG2P/openg2p-security/actions/workflows/pre-commit.yml?query=branch%3A17.0-develop)
[![Build Status](https://github.com/OpenG2P/openg2p-security/actions/workflows/test.yml/badge.svg?branch=17.0-develop)](https://github.com/OpenG2P/openg2p-security/actions/workflows/test.yml?query=branch%3A17.0-develop)
[![codecov](https://codecov.io/gh/OpenG2P/openg2p-security/branch/17.0-develop/graph/badge.svg)](https://codecov.io/gh/OpenG2P/openg2p-security)
<!-- /!\ Non OCA Context : Set here the badge of your translation instance. -->

<!-- /!\ do not modify above this line -->
Expand All @@ -22,10 +22,10 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[g2p_encryption](g2p_encryption/) | 15.0.1.2.0 | | G2P Encryption: Base
[g2p_encryption_keymanager](g2p_encryption_keymanager/) | 15.0.1.2.0 | | G2P Encryption: Keymanager
[g2p_encryption_rest_api](g2p_encryption_rest_api/) | 15.0.1.2.0 | | G2P Encryption: Rest API
[g2p_registry_encryption](g2p_registry_encryption/) | 15.0.1.2.0 | | G2P Registry: Encryption
[g2p_encryption](g2p_encryption/) | 17.0.1.2.0 | | G2P Encryption: Base
[g2p_encryption_keymanager](g2p_encryption_keymanager/) | 17.0.1.2.0 | | G2P Encryption: Keymanager
[g2p_encryption_rest_api](g2p_encryption_rest_api/) | 17.0.1.2.0 | | G2P Encryption: Rest API
[g2p_registry_encryption](g2p_registry_encryption/) | 17.0.1.2.0 | | G2P Registry: Encryption

[//]: # (end addons)

Expand Down
8 changes: 4 additions & 4 deletions g2p_encryption/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ G2P Encryption: Base
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2be24ba9e884952b98191815e8482ee2169686beba08fd5546a637202264487a
!! source digest: sha256:63403b39665dc57a132ba0ea64a6bb847f291abdea932f393ff6411054b19f54
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/github-OpenG2P%2Fopeng2p--security-lightgray.png?logo=github
:target: https://github.com/OpenG2P/openg2p-security/tree/15.0-develop/g2p_encryption
:target: https://github.com/OpenG2P/openg2p-security/tree/17.0-develop/g2p_encryption
:alt: OpenG2P/openg2p-security

|badge1| |badge2|
Expand All @@ -37,7 +37,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OpenG2P/openg2p-security/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OpenG2P/openg2p-security/issues/new?body=module:%20g2p_encryption%0Aversion:%2015.0-develop%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OpenG2P/openg2p-security/issues/new?body=module:%20g2p_encryption%0Aversion:%2017.0-develop%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -58,6 +58,6 @@ Contributors
Maintainers
~~~~~~~~~~~

This module is part of the `OpenG2P/openg2p-security <https://github.com/OpenG2P/openg2p-security/tree/15.0-develop/g2p_encryption>`_ project on GitHub.
This module is part of the `OpenG2P/openg2p-security <https://github.com/OpenG2P/openg2p-security/tree/17.0-develop/g2p_encryption>`_ project on GitHub.

You are welcome to contribute.
2 changes: 1 addition & 1 deletion g2p_encryption/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "G2P Encryption: Base",
"category": "G2P",
"version": "15.0.1.2.0",
"version": "17.0.1.2.0",
"sequence": 1,
"author": "OpenG2P",
"website": "https://openg2p.org",
Expand Down
Loading

0 comments on commit 2e18122

Please sign in to comment.