Skip to content
Snippets Groups Projects
Commit 9cca3534b24d authored by Etienne Ferriere's avatar Etienne Ferriere
Browse files

Update project following template update, fix flake8 errors, package the module.

parent d940cb24f4ee
No related branches found
1 merge request!14Add CI files.
Pipeline #116186 passed with warnings
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="114" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="114" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h72v20H0z" />
<path fill="#000000" d="M72 0h42v20H72z" />
<path fill="url(#b)" d="M0 0h114v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text>
<text x="36.0" y="14">code style</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="94.0" y="15" fill="#010101" fill-opacity=".3">black</text>
<text x="93.0" y="14">black</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="129" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="129" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h72v20H0z" />
<path fill="#ff69b4" d="M72 0h57v20H72z" />
<path fill="url(#b)" d="M0 0h129v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text>
<text x="36.0" y="14">code style</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="101.5" y="15" fill="#010101" fill-opacity=".3">prettier</text>
<text x="100.5" y="14">prettier</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="107" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h53v20H0z" />
<path fill="#0000FF" d="M53 0h54v20H53z" />
<path fill="url(#b)" d="M0 0h107v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="27.5" y="15" fill="#010101" fill-opacity=".3">licence</text>
<text x="26.5" y="14">licence</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="81.0" y="15" fill="#010101" fill-opacity=".3">AGPL-3</text>
<text x="80.0" y="14">AGPL-3</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="103" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="103" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h61v20H0z" />
<path fill="#e05d44" d="M61 0h42v20H61z" />
<path fill="url(#b)" d="M0 0h103v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">maturity</text>
<text x="30.5" y="14">maturity</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="83.0" y="15" fill="#010101" fill-opacity=".3">Alpha</text>
<text x="82.0" y="14">Alpha</text>
</g>
</svg>
# Configuration for known file extensions
[*.{css,htm,html,js,json,jsx,less,markdown,md,py,rst,sass,scss,toml,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{json,yml,yaml,rst,markdown,md,toml}]
indent_size = 2
# Do not configure editor for libs
[{*/static/{lib,src/lib}/**}]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false
[flake8]
per-file-ignores=
__init__.py:F401
__manifest__.py:B018
include:
- project: xcg/ci-templates
file: /odoo/13.0/gitlab-ci.yaml
variables:
CI_TEMPLATE_NO_INSTALL_MODULE: ""
# Pylint does not like that the module is installed in a different path than odoo other addons
pylint:
variables:
CI_TEMPLATE_NO_INSTALL_MODULE: "no"
syntax: glob
./doc/_build
./doc/autotodo
.project
# Defaults for all prettier-supported languages.
# Prettier will complete this with settings from .editorconfig file.
bracketSpacing: false
printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "ignore"
rules:
document-start: disable
indentation:
indent-sequences: true
......@@ -43,20 +43,9 @@
def _extract(
method,
fileobj,
keywords={
"N_": None,
"_": None,
"dgettext": (2,),
"dngettext": (2, 3),
"gettext": None,
"ngettext": (1, 2),
"npgettext": ((1, "c"), 2, 3),
"pgettext": ((1, "c"), 2),
"ugettext": None,
"ungettext": (1, 2),
},
comment_tags=(),
keywords=None,
comment_tags=None,
options=None,
# strip tag by default
strip_comment_tags=True,
):
......@@ -59,7 +48,25 @@
options=None,
# strip tag by default
strip_comment_tags=True,
):
if keywords is None:
keywords = {
"N_": None,
"_": None,
"dgettext": (2,),
"dngettext": (2, 3),
"gettext": None,
"ngettext": (1, 2),
"npgettext": ((1, "c"), 2, 3),
"pgettext": ((1, "c"), 2),
"ugettext": None,
"ungettext": (1, 2),
}
if comment_tags is None:
comment_tags = ()
if method == "python":
if __ICU_FORMAT_TRANSLATE not in keywords:
keywords[__ICU_FORMAT_TRANSLATE] = (1,)
......
[project]
name = "odoo-addon-icuformat"
dynamic = ["version"]
readme = "README.rst"
requires-python = "~=3.8"
license = { file = "LICENSE", name = "GNU Affero General Public License v3" }
keywords = ["odoo"]
authors = [{ name = "XCG Consulting" }]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Framework :: Odoo",
"Framework :: Odoo :: 13.0",
"License :: OSI Approved :: GNU Affero General Public License v3"
]
dependencies = ["odoo ==13.0.*"]
[project.optional-dependencies]
doc = ["sphinx", "sphinx-odoo-autodoc", "odoo-scripts"]
test = []
[project.urls]
repository = "https://orus.io/xcg/odoo-modules/icuformat"
changelog = "https://orus.io/xcg/odoo-modules/icuformat/-/blob/branch/13.0/NEWS.rst"
[build-system]
requires = ["hatchling >=1.19", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [
"/doc/",
"/.editorconfig",
"/.eslintrc.yml",
"/.flake8",
"/.gitlab-ci.yml",
"/.hgignore",
"/.hgtags",
"/.prettierrc.yml",
"/.yamllint.yaml"
]
[tool.hatch.build.targets.wheel]
include = [
"*.csv",
"/i18n/",
"/static/",
"README.rst",
"*.xml",
"*.py",
"*.svg",
"*.png"
]
[tool.hatch.build.targets.wheel.sources]
"" = "odoo/addons/icuformat"
[tool.hatch.version]
source = "vcs"
[tool.black]
line-length = 79
target-version = ["py38"]
required-version = "19.3b0"
[tool.isort]
py_version = 38
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true
sections = [
"FUTURE",
"STDLIB",
"SPECIAL_THIRD_PARTY",
"ODOO",
"ODOO_ADDONS",
"LOCALFOLDER",
"THIRDPARTY"
]
known_odoo = ["odoo"]
known_odoo_addons = ["odoo.addons"]
known_special_third_party = [
"dateutil",
"lxml",
"mock",
"requests",
"minio",
"werkzeug"
]
default_section = "THIRDPARTY"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment