Update python package configuration
This commit is contained in:
parent
0bf94a6238
commit
501f97243c
117
pyproject.toml
117
pyproject.toml
@ -1,3 +1,120 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=56.2.0", "wheel"]
|
requires = ["setuptools>=56.2.0", "wheel"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
exclude_lines = [
|
||||||
|
"pragma: no cover",
|
||||||
|
"if TYPE_CHECKING:",
|
||||||
|
"if __name__ == '__main__':",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
source = [
|
||||||
|
"src",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.flake8]
|
||||||
|
avoid_escape = false
|
||||||
|
docstring_convention = "all"
|
||||||
|
docstring_style = "google"
|
||||||
|
extend_exclude = ["venv*", ".venv*"]
|
||||||
|
ignore = [
|
||||||
|
# do not require annotation of `self`
|
||||||
|
"ANN101",
|
||||||
|
# do not apply to google convention
|
||||||
|
"D203",
|
||||||
|
"D213",
|
||||||
|
"D215",
|
||||||
|
"D406",
|
||||||
|
"D407",
|
||||||
|
"D408",
|
||||||
|
"D409",
|
||||||
|
# handled by B001
|
||||||
|
"E722",
|
||||||
|
# allow line break after binary operator
|
||||||
|
"W504",
|
||||||
|
]
|
||||||
|
max_line_length = 100
|
||||||
|
strictness = "long"
|
||||||
|
suppress_none_returning = true
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
include_trailing_comma = true
|
||||||
|
line_length = 100
|
||||||
|
multi_line_output = 3
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
explicit_package_bases = true
|
||||||
|
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
|
||||||
|
namespace_packages = true
|
||||||
|
strict = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "lz4.frame"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[tool.pydocstyle]
|
||||||
|
convention = "google"
|
||||||
|
add_select = ["D204", "D400", "D401", "D404", "D413"]
|
||||||
|
|
||||||
|
[tool.pylint.'MESSAGES CONTROL']
|
||||||
|
enable = "all"
|
||||||
|
disable = [
|
||||||
|
"duplicate-code",
|
||||||
|
"locally-disabled",
|
||||||
|
"suppressed-message",
|
||||||
|
"ungrouped-imports",
|
||||||
|
# isort (pylint FAQ)
|
||||||
|
"wrong-import-order",
|
||||||
|
# mccabe (pylint FAQ)
|
||||||
|
"too-many-branches",
|
||||||
|
# fixme
|
||||||
|
"fixme",
|
||||||
|
# pep8-naming (pylint FAQ", keep: invalid-name)
|
||||||
|
"bad-classmethod-argument",
|
||||||
|
"bad-mcs-classmethod-argument",
|
||||||
|
"no-self-argument",
|
||||||
|
# pycodestyle (pylint FAQ)
|
||||||
|
"bad-indentation",
|
||||||
|
"bare-except",
|
||||||
|
"line-too-long",
|
||||||
|
"missing-final-newline",
|
||||||
|
"multiple-statements",
|
||||||
|
"trailing-whitespace",
|
||||||
|
"unnecessary-semicolon",
|
||||||
|
"unneeded-not",
|
||||||
|
# pydocstyle (pylint FAQ)
|
||||||
|
"missing-class-docstring",
|
||||||
|
"missing-function-docstring",
|
||||||
|
"missing-module-docstring",
|
||||||
|
# pyflakes (pylint FAQ)
|
||||||
|
"undefined-variable",
|
||||||
|
"unused-import",
|
||||||
|
"unused-variable",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = [
|
||||||
|
"-v",
|
||||||
|
"--flake8",
|
||||||
|
"--mypy",
|
||||||
|
"--pylint",
|
||||||
|
"--yapf",
|
||||||
|
"--cov",
|
||||||
|
"--cov-branch",
|
||||||
|
"--cov-report=html",
|
||||||
|
"--cov-report=term",
|
||||||
|
"--cov-report=xml",
|
||||||
|
"--no-cov-on-fail",
|
||||||
|
"--junitxml=report.xml",
|
||||||
|
]
|
||||||
|
junit_family = "xunit2"
|
||||||
|
|
||||||
|
[tool.yapf]
|
||||||
|
based_on_style = "google"
|
||||||
|
column_limit = 100
|
||||||
|
allow_split_before_dict_value = false
|
||||||
|
dedent_closing_brackets = true
|
||||||
|
indent_dictionary_value = false
|
||||||
|
|||||||
116
setup.cfg
116
setup.cfg
@ -46,9 +46,6 @@ packages = find_namespace:
|
|||||||
zip_safe = false
|
zip_safe = false
|
||||||
python_requires =
|
python_requires =
|
||||||
>=3.8.2
|
>=3.8.2
|
||||||
setup_requires =
|
|
||||||
setuptools >=40.8.0
|
|
||||||
wheel
|
|
||||||
install_requires =
|
install_requires =
|
||||||
lz4
|
lz4
|
||||||
numpy
|
numpy
|
||||||
@ -72,12 +69,14 @@ dev =
|
|||||||
flake8-isort
|
flake8-isort
|
||||||
flake8-mutable
|
flake8-mutable
|
||||||
flake8-print
|
flake8-print
|
||||||
|
flake8-pyprojecttoml
|
||||||
flake8-pytest-style
|
flake8-pytest-style
|
||||||
flake8-quotes
|
flake8-quotes
|
||||||
flake8-return
|
flake8-return
|
||||||
flake8-simplify
|
flake8-simplify
|
||||||
flake8-type-checking
|
flake8-type-checking
|
||||||
flake8-use-fstring
|
flake8-use-fstring
|
||||||
|
mypy
|
||||||
pep8-naming
|
pep8-naming
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
@ -98,114 +97,3 @@ where = src
|
|||||||
|
|
||||||
[sdist]
|
[sdist]
|
||||||
formats = gztar, zip
|
formats = gztar, zip
|
||||||
|
|
||||||
[coverage:report]
|
|
||||||
exclude_lines =
|
|
||||||
pragma: no cover
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
if __name__ == '__main__':
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
avoid-escape = False
|
|
||||||
docstring_convention = google
|
|
||||||
docstring_style = google
|
|
||||||
extend-exclude = venv*,.venv*
|
|
||||||
extend-select =
|
|
||||||
# docstrings
|
|
||||||
D204,
|
|
||||||
D400,
|
|
||||||
D401,
|
|
||||||
D404,
|
|
||||||
D413,
|
|
||||||
ignore =
|
|
||||||
# do not require annotation of `self`
|
|
||||||
ANN101,
|
|
||||||
# handled by B001
|
|
||||||
E722,
|
|
||||||
# allow line break after binary operator
|
|
||||||
W504,
|
|
||||||
max-line-length = 100
|
|
||||||
strictness = long
|
|
||||||
suppress-none-returning = True
|
|
||||||
|
|
||||||
[isort]
|
|
||||||
include_trailing_comma = True
|
|
||||||
line_length = 100
|
|
||||||
multi_line_output = 3
|
|
||||||
|
|
||||||
[mypy]
|
|
||||||
explicit_package_bases = True
|
|
||||||
mypy_path = $MYPY_CONFIG_FILE_DIR/src
|
|
||||||
namespace_packages = True
|
|
||||||
strict = True
|
|
||||||
|
|
||||||
[mypy-lz4.frame]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[mypy-ruamel.yaml]
|
|
||||||
implicit_reexport = True
|
|
||||||
|
|
||||||
[pydocstyle]
|
|
||||||
convention = google
|
|
||||||
add-select = D204,D400,D401,D404,D413
|
|
||||||
|
|
||||||
[pylint.FORMAT]
|
|
||||||
max-line-length = 100
|
|
||||||
|
|
||||||
[pylint.'MESSAGES CONTROL']
|
|
||||||
enable = all
|
|
||||||
disable =
|
|
||||||
duplicate-code,
|
|
||||||
locally-disabled,
|
|
||||||
suppressed-message,
|
|
||||||
ungrouped-imports,
|
|
||||||
# isort (pylint FAQ)
|
|
||||||
wrong-import-order,
|
|
||||||
# mccabe (pylint FAQ)
|
|
||||||
too-many-branches,
|
|
||||||
# fixme
|
|
||||||
fixme,
|
|
||||||
# pep8-naming (pylint FAQ, keep: invalid-name)
|
|
||||||
bad-classmethod-argument,
|
|
||||||
bad-mcs-classmethod-argument,
|
|
||||||
no-self-argument,
|
|
||||||
# pycodestyle (pylint FAQ)
|
|
||||||
bad-indentation,
|
|
||||||
bare-except,
|
|
||||||
line-too-long,
|
|
||||||
missing-final-newline,
|
|
||||||
multiple-statements,
|
|
||||||
trailing-whitespace,
|
|
||||||
unnecessary-semicolon,
|
|
||||||
unneeded-not,
|
|
||||||
# pydocstyle (pylint FAQ)
|
|
||||||
missing-class-docstring,
|
|
||||||
missing-function-docstring,
|
|
||||||
missing-module-docstring,
|
|
||||||
# pyflakes (pylint FAQ)
|
|
||||||
undefined-variable,
|
|
||||||
unused-import,
|
|
||||||
unused-variable,
|
|
||||||
|
|
||||||
[yapf]
|
|
||||||
based_on_style = google
|
|
||||||
column_limit = 100
|
|
||||||
allow_split_before_dict_value = false
|
|
||||||
dedent_closing_brackets = true
|
|
||||||
indent_dictionary_value = false
|
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
addopts =
|
|
||||||
-v
|
|
||||||
--flake8
|
|
||||||
--mypy
|
|
||||||
--pylint
|
|
||||||
--yapf
|
|
||||||
--cov=src
|
|
||||||
--cov-branch
|
|
||||||
--cov-report=html
|
|
||||||
--cov-report=term
|
|
||||||
--cov-report=xml
|
|
||||||
--no-cov-on-fail
|
|
||||||
--junitxml=report.xml
|
|
||||||
junit_family=xunit2
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user