mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 18:41:50 +01:00
179 lines
5.0 KiB
TOML
179 lines
5.0 KiB
TOML
# https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
|
|
[build-system]
|
|
requires = ["pdm-pep517"]
|
|
build-backend = "pdm.pep517.api"
|
|
|
|
[project]
|
|
name = "kleinanzeigen-bot"
|
|
dynamic = ["version"]
|
|
description = "Command line tool to publish ads on ebay-kleinanzeigen.de"
|
|
readme = "README.md"
|
|
authors = [
|
|
{name = "sebthom", email = "sebthom@users.noreply.github.com"},
|
|
]
|
|
license = {text = "AGPL-3.0-or-later"}
|
|
|
|
classifiers = [ # https://pypi.org/classifiers/
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"Operating System :: OS Independent",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
"Topic :: Office/Business",
|
|
|
|
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
|
|
"Programming Language :: Python :: 3.10"
|
|
]
|
|
requires-python = ">=3.10,<3.11" # <3.11 to get newer versions of pyinstaller
|
|
dependencies = [
|
|
"coloredlogs~=15.0",
|
|
"inflect~=5.4",
|
|
"overrides~=6.1",
|
|
"ruamel.yaml~=0.17",
|
|
"pywin32==303; sys_platform == 'win32'",
|
|
"selenium~=4.1",
|
|
"selenium_stealth~=1.0",
|
|
"webdriver_manager~=3.5"
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/Second-Hand-Friends/kleinanzeigen-bot"
|
|
Repository = "https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git"
|
|
Documentation = "https://github.com/Second-Hand-Friends/kleinanzeigen-bot/README.md"
|
|
Issues = "https://github.com/Second-Hand-Friends/kleinanzeigen-bot/issues"
|
|
|
|
|
|
#####################
|
|
# pdm https://github.com/pdm-project/pdm/
|
|
#####################
|
|
[tool.pdm]
|
|
version = {use_scm = true}
|
|
|
|
[tool.pdm.dev-dependencies]
|
|
dev = [
|
|
"autopep8~=1.6",
|
|
"bandit~=1.7",
|
|
"pytest~=7.0",
|
|
"pyinstaller~=4.10",
|
|
"psutil",
|
|
"pylint~=2.12",
|
|
"mypy~=0.940",
|
|
]
|
|
|
|
[tool.pdm.scripts]
|
|
app = "python -m kleinanzeigen_bot"
|
|
compile = "python -O -m PyInstaller pyinstaller.spec --clean"
|
|
format = "autopep8 --recursive --in-place kleinanzeigen_bot tests"
|
|
lint = {shell = "pylint -v kleinanzeigen_bot tests && autopep8 -v --exit-code --recursive --diff kleinanzeigen_bot tests && echo No issues found."}
|
|
scan = "bandit -c pyproject.toml -r kleinanzeigen_bot"
|
|
test = "python -m pytest --capture=tee-sys -v"
|
|
utest = "python -m pytest --capture=tee-sys -v -m 'not itest'"
|
|
itest = "python -m pytest --capture=tee-sys -v -m 'itest'"
|
|
|
|
|
|
#####################
|
|
# autopep8
|
|
# https://pypi.org/project/autopep8/
|
|
# https://github.com/hhatto/autopep8
|
|
#####################
|
|
[tool.autopep8]
|
|
max_line_length = 160
|
|
ignore = [ # https://github.com/hhatto/autopep8#features
|
|
"E124", # Don't change indention of multi-line statements
|
|
"E128", # Don't change indention of multi-line statements
|
|
"E231", # Don't add whitespace after colon (:) on type declaration
|
|
"E251", # Don't remove whitespace around parameter '=' sign.
|
|
"E401" # Don't put imports on separate lines
|
|
]
|
|
aggressive = 3
|
|
|
|
|
|
#####################
|
|
# bandit
|
|
# https://pypi.org/project/bandit/
|
|
# https://github.com/PyCQA/bandit
|
|
#####################
|
|
[tool.bandit]
|
|
|
|
|
|
#####################
|
|
# mypy
|
|
# https://github.com/python/mypy
|
|
#####################
|
|
[tool.mypy]
|
|
python_version = "3.10"
|
|
strict = true
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
ignore_missing_imports = true
|
|
show_error_codes = true
|
|
warn_unused_ignores = true
|
|
|
|
|
|
#####################
|
|
# pylint
|
|
# https://pypi.org/project/pylint/
|
|
# https://github.com/PyCQA/pylint
|
|
#####################
|
|
[tool.pylint.master]
|
|
extension-pkg-whitelist = "win32api"
|
|
ignore = "version.py"
|
|
jobs = 4
|
|
persistent = "no"
|
|
load-plugins = [
|
|
"pylint.extensions.bad_builtin",
|
|
"pylint.extensions.comparetozero",
|
|
"pylint.extensions.check_elif",
|
|
"pylint.extensions.code_style",
|
|
"pylint.extensions.comparison_placement",
|
|
"pylint.extensions.empty_comment",
|
|
"pylint.extensions.for_any_all",
|
|
"pylint.extensions.overlapping_exceptions",
|
|
"pylint.extensions.redefined_variable_type",
|
|
"pylint.extensions.set_membership",
|
|
"pylint.extensions.typing",
|
|
]
|
|
|
|
[tool.pylint.basic]
|
|
good-names = ["i", "j", "k", "v", "by", "ex", "fd", "_", "T"]
|
|
|
|
[tool.pylint.format]
|
|
# https://pylint.pycqa.org/en/latest/technical_reference/features.html#format-checker
|
|
max-line-length = 160
|
|
|
|
[tool.pylint.logging]
|
|
logging-modules = "logging"
|
|
|
|
[tool.pylint.messages_control]
|
|
# https://pylint.pycqa.org/en/latest/technical_reference/features.html#messages-control-options
|
|
disable= [
|
|
"broad-except",
|
|
"consider-using-assignment-expr",
|
|
"missing-docstring",
|
|
"multiple-imports",
|
|
"multiple-statements",
|
|
"no-self-use",
|
|
"too-few-public-methods"
|
|
]
|
|
|
|
[tool.pylint.miscelaneous]
|
|
notes = [ "FIXME", "XXX", "TODO" ]
|
|
|
|
[tool.pylint.design]
|
|
max-attributes = 10
|
|
max-branches = 30
|
|
max-locals = 30
|
|
max-returns = 10
|
|
max-statements = 90
|
|
|
|
|
|
#####################
|
|
# pytest
|
|
# https://pypi.org/project/pytest/
|
|
#####################
|
|
[tool.pytest.ini_options]
|
|
# https://docs.pytest.org/en/stable/reference.html#confval-addopts
|
|
addopts = "--strict-markers -p no:cacheprovider --doctest-modules --ignore=__pypackages__ --ignore=kleinanzeigen_bot/__main__.py"
|
|
markers = [
|
|
"itest: marks a test as an integration test (i.e. a test with external dependencies)"
|
|
] |