2020-05-12 10:11:47 +00:00
|
|
|
[tool.poetry]
|
|
|
|
name = "python-kasa"
|
2024-07-18 07:40:35 +00:00
|
|
|
version = "0.7.0.5"
|
2020-05-12 10:11:47 +00:00
|
|
|
description = "Python API for TP-Link Kasa Smarthome devices"
|
|
|
|
license = "GPL-3.0-or-later"
|
2023-02-18 21:40:42 +00:00
|
|
|
authors = ["python-kasa developers"]
|
2020-05-12 10:11:47 +00:00
|
|
|
repository = "https://github.com/python-kasa/python-kasa"
|
|
|
|
readme = "README.md"
|
|
|
|
packages = [
|
|
|
|
{ include = "kasa" }
|
|
|
|
]
|
2024-01-04 18:14:14 +00:00
|
|
|
include = [
|
|
|
|
{ path= "CHANGELOG.md", format = "sdist" }
|
|
|
|
]
|
2020-05-12 10:11:47 +00:00
|
|
|
|
2023-02-18 21:09:35 +00:00
|
|
|
[tool.poetry.urls]
|
|
|
|
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
|
|
|
|
"Documentation" = "https://python-kasa.readthedocs.io"
|
|
|
|
|
2020-05-12 10:11:47 +00:00
|
|
|
[tool.poetry.scripts]
|
2024-07-23 18:13:52 +00:00
|
|
|
kasa = "kasa.cli.__main__:cli"
|
2020-05-12 10:11:47 +00:00
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
2024-06-19 18:24:12 +00:00
|
|
|
python = "^3.9"
|
2024-06-19 11:36:00 +00:00
|
|
|
asyncclick = ">=8.1.7"
|
2024-05-01 13:59:35 +00:00
|
|
|
pydantic = ">=1.10.15"
|
2023-11-20 13:17:10 +00:00
|
|
|
cryptography = ">=1.9"
|
|
|
|
async-timeout = ">=3.0.0"
|
2024-01-18 17:32:26 +00:00
|
|
|
aiohttp = ">=3"
|
2020-05-12 10:11:47 +00:00
|
|
|
|
2023-06-17 23:03:04 +00:00
|
|
|
# speed ups
|
2023-06-30 00:43:01 +00:00
|
|
|
orjson = { "version" = ">=3.9.1", optional = true }
|
|
|
|
kasa-crypt = { "version" = ">=0.2.0", optional = true }
|
2023-06-17 23:03:04 +00:00
|
|
|
|
2020-06-30 00:29:52 +00:00
|
|
|
# required only for docs
|
2024-01-18 08:21:52 +00:00
|
|
|
sphinx = { version = "^5", optional = true }
|
2024-03-01 18:32:45 +00:00
|
|
|
sphinx_rtd_theme = { version = "^2", optional = true }
|
2020-07-29 17:28:00 +00:00
|
|
|
sphinxcontrib-programoutput = { version = "^0", optional = true }
|
2023-02-18 21:09:35 +00:00
|
|
|
myst-parser = { version = "*", optional = true }
|
|
|
|
docutils = { version = ">=0.17", optional = true }
|
2020-06-30 00:29:52 +00:00
|
|
|
|
2024-02-20 18:40:28 +00:00
|
|
|
# enhanced cli support
|
|
|
|
ptpython = { version = "*", optional = true }
|
|
|
|
rich = { version = "*", optional = true }
|
2024-02-06 13:48:19 +00:00
|
|
|
|
2023-08-03 11:19:31 +00:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
2023-02-18 21:09:35 +00:00
|
|
|
pytest = "*"
|
|
|
|
pytest-cov = "*"
|
|
|
|
pytest-asyncio = "*"
|
2020-05-12 10:11:47 +00:00
|
|
|
pytest-sugar = "*"
|
|
|
|
pre-commit = "*"
|
|
|
|
voluptuous = "*"
|
|
|
|
toml = "*"
|
|
|
|
tox = "*"
|
2023-02-18 21:09:35 +00:00
|
|
|
pytest-mock = "*"
|
|
|
|
codecov = "*"
|
|
|
|
xdoctest = "*"
|
|
|
|
coverage = {version = "*", extras = ["toml"]}
|
2024-05-19 09:34:52 +00:00
|
|
|
pytest-timeout = "^2"
|
2024-06-05 17:13:10 +00:00
|
|
|
pytest-freezer = "^0.4"
|
2024-06-19 18:24:12 +00:00
|
|
|
mypy = "^1"
|
2020-06-30 00:29:52 +00:00
|
|
|
|
|
|
|
[tool.poetry.extras]
|
2023-02-18 21:09:35 +00:00
|
|
|
docs = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-programoutput", "myst-parser", "docutils"]
|
2023-06-30 00:43:01 +00:00
|
|
|
speedups = ["orjson", "kasa-crypt"]
|
2024-02-20 18:40:28 +00:00
|
|
|
shell = ["ptpython", "rich"]
|
2020-06-30 00:29:52 +00:00
|
|
|
|
2020-05-12 10:11:47 +00:00
|
|
|
[tool.coverage.run]
|
|
|
|
source = ["kasa"]
|
|
|
|
branch = true
|
2020-05-27 14:55:18 +00:00
|
|
|
omit = ["kasa/tests/*"]
|
2020-05-12 10:11:47 +00:00
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
exclude_lines = [
|
2024-01-29 10:55:54 +00:00
|
|
|
# ignore debug logging
|
|
|
|
"if debug_enabled:",
|
2024-01-24 08:50:25 +00:00
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
|
|
"raise AssertionError",
|
2020-05-12 10:11:47 +00:00
|
|
|
"raise NotImplementedError",
|
2024-01-24 08:50:25 +00:00
|
|
|
# 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"
|
2020-05-12 10:11:47 +00:00
|
|
|
]
|
|
|
|
|
2021-09-19 21:45:48 +00:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
markers = [
|
|
|
|
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
|
|
|
]
|
2022-11-13 22:34:47 +00:00
|
|
|
asyncio_mode = "auto"
|
2024-05-19 09:34:52 +00:00
|
|
|
timeout = 10
|
2021-09-19 21:45:48 +00:00
|
|
|
|
2022-04-05 23:13:27 +00:00
|
|
|
[tool.doc8]
|
|
|
|
paths = ["docs"]
|
|
|
|
ignore = ["D001"]
|
2023-02-18 21:09:35 +00:00
|
|
|
ignore-path-errors = ["docs/source/index.rst;D000"]
|
2022-04-05 23:13:27 +00:00
|
|
|
|
2020-05-12 10:11:47 +00:00
|
|
|
[build-system]
|
2021-10-01 22:51:16 +00:00
|
|
|
requires = ["poetry-core>=1.0.0"]
|
|
|
|
build-backend = "poetry.core.masonry.api"
|
2023-10-29 22:15:42 +00:00
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py38"
|
2024-04-16 18:21:20 +00:00
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2023-10-29 22:15:42 +00:00
|
|
|
select = [
|
|
|
|
"E", # pycodestyle
|
|
|
|
"D", # pydocstyle
|
|
|
|
"F", # pyflakes
|
|
|
|
"UP", # pyupgrade
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
"SIM", # flake8-simplify
|
2024-04-17 13:39:24 +00:00
|
|
|
"FA", # flake8-future-annotations
|
2023-10-29 22:15:42 +00:00
|
|
|
"I", # isort
|
|
|
|
"S", # bandit
|
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
"D105", # Missing docstring in magic method
|
|
|
|
"D107", # Missing docstring in `__init__`
|
|
|
|
]
|
|
|
|
|
2024-04-16 18:21:20 +00:00
|
|
|
[tool.ruff.lint.pydocstyle]
|
2023-10-29 22:15:42 +00:00
|
|
|
convention = "pep257"
|
|
|
|
|
2024-04-16 18:21:20 +00:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
2023-10-29 22:15:42 +00:00
|
|
|
"kasa/tests/*.py" = [
|
|
|
|
"D100",
|
|
|
|
"D101",
|
|
|
|
"D102",
|
|
|
|
"D103",
|
|
|
|
"D104",
|
|
|
|
"S101", # allow asserts
|
|
|
|
"E501", # ignore line-too-longs
|
|
|
|
]
|
|
|
|
"docs/source/conf.py" = [
|
|
|
|
"D100",
|
|
|
|
"D103",
|
|
|
|
]
|
2024-06-19 13:07:59 +00:00
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
warn_unused_configs = true # warns if overrides sections unused/mis-spelled
|
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
module = [ "kasa.tests.*", "devtools.*" ]
|
|
|
|
disable_error_code = "annotation-unchecked"
|
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
module = [
|
|
|
|
"devtools.bench.benchmark",
|
|
|
|
"devtools.parse_pcap",
|
2024-07-15 12:18:43 +00:00
|
|
|
"devtools.parse_pcap_klap",
|
2024-06-19 13:07:59 +00:00
|
|
|
"devtools.perftest",
|
|
|
|
"devtools.create_module_fixtures"
|
|
|
|
]
|
|
|
|
disable_error_code = "import-not-found,import-untyped"
|