python-kasa/pyproject.toml

127 lines
2.6 KiB
TOML
Raw Permalink Normal View History

2024-06-17 17:28:52 +00:00
[project]
name = "python-kasa"
version = "0.7.0.dev5"
2024-06-17 17:28:52 +00:00
description = "Python API for TP-Link Kasa and Tapo devices"
license = {text = "GPL-3.0-or-later"}
authors = [ { name = "python-kasa developers" }]
#repository = "https://github.com/python-kasa/python-kasa"
readme = "README.md"
2024-06-17 17:28:52 +00:00
requires-python = ">=3.8.0"
dependencies = [
"anyio",
"asyncclick>=8",
"pydantic>=1.10.15",
"cryptography>=1.9",
"async-timeout>=3.0.0",
"aiohttp>=3"
]
2024-06-17 17:28:52 +00:00
[tool.setuptools.packages.find]
include = ["kasa*"]
exclude = ["kasa.tests*"]
[project.urls]
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
"Documentation" = "https://python-kasa.readthedocs.io"
2024-06-17 17:28:52 +00:00
[project.scripts]
kasa = "kasa.cli:cli"
2024-06-17 17:28:52 +00:00
[project.optional-dependencies]
docs = ["sphinx==5.*", "sphinx_rtd_theme==2.*", "sphinxcontrib-programoutput>0", "myst-parser", "docutils>=0.17"]
speedups = ["orjson>=3.9.1", "kasa-crypt>=0.2.0"]
shell = ["ptpython", "rich"]
2024-06-17 17:28:52 +00:00
[tool.uv]
dev-dependencies = [
"pytest",
"pytest-cov",
"pytest-asyncio",
"pytest-sugar",
"pre-commit",
"voluptuous",
"toml",
"tox",
"pytest-mock",
"codecov",
"xdoctest",
"coverage",
"pytest-timeout>=2",
"pytest-freezer>=0.4"
]
[tool.coverage.run]
source = ["kasa"]
branch = true
omit = ["kasa/tests/*"]
[tool.coverage.report]
exclude_lines = [
# ignore debug logging
"if debug_enabled:",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about missing debug-only code:
"def __repr__",
# Have to re-enable the standard pragma
"pragma: no cover",
# TYPE_CHECKING and @overload blocks are never executed during pytest run
"if TYPE_CHECKING:",
"@overload"
]
[tool.pytest.ini_options]
markers = [
"requires_dummy: test requires dummy data to pass, skipped on real devices",
]
asyncio_mode = "auto"
timeout = 10
[tool.doc8]
paths = ["docs"]
ignore = ["D001"]
ignore-path-errors = ["docs/source/index.rst;D000"]
[build-system]
2024-06-17 17:28:52 +00:00
requires = ["setuptools==69.2.0"]
build-backend = "setuptools.build_meta"
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"D", # pydocstyle
"F", # pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"FA", # flake8-future-annotations
"I", # isort
"S", # bandit
]
ignore = [
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.per-file-ignores]
"kasa/tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"S101", # allow asserts
"E501", # ignore line-too-longs
]
"docs/source/conf.py" = [
"D100",
"D103",
]