diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..82108547 --- /dev/null +++ b/.flake8 @@ -0,0 +1,22 @@ +[flake8] +exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build,tests/encodings +max-complexity = 25 +doctests = True +# To work with Black +# E501: line too long +# W503: Line break occurred before a binary operator +# E203: Whitespace before ':' +# D202 No blank lines allowed after function docstring +# W504 line break after binary operator +# E128 continuation line under-indented for visual indent +ignore = + E501, + W503, + E203, + D202, + W504, + E128 +noqa-require-code = True + +per-file-ignores = + paradox/lib/crypto.py: E221, E241, E302, E303, E305 diff --git a/pyproject.toml b/pyproject.toml index 9a970802..7d129da1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,75 @@ requires = ["setuptools>=46.4.0"] build-backend = "setuptools.build_meta" +[project] +name = "paradox-alarm-interface" +dynamic = ["version"] +authors = [ + {name = "Jevgeni Kiski", email = "yozik04@gmail.com"}, + {name = "João Paulo Barraca", email = "jpbarraca@gmail.com"}, +] +description = "Interface to Paradox Alarm Panels" +readme = "README.md" +license = {file = "LICENSE"} +keywords = ["paradox", "alarm", "ip150", "serial", "home-assistant", "smarthome", "mqtt"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +requires-python = ">=3.8" +dependencies = [ + "construct~=2.10.70", + "argparse>=1.4.0", + "python-slugify>=4.0.1", + "pytz>=2021.3", + "paho_mqtt>=2.1.0,<3", + "requests>=2.20.0", + "pyserial-asyncio>=0.4", +] + +[project.urls] +Homepage = "https://github.com/ParadoxAlarmInterface/pai" +"Bug Tracker" = "https://github.com/ParadoxAlarmInterface/pai/issues" + +[project.scripts] +ip150-connection-decrypt = "paradox.console_scripts.ip150_connection_decrypt:main" +pai-service = "paradox.console_scripts.pai_run:main" +pai-dump-memory = "paradox.console_scripts.pai_dump_memory:main" + +[project.optional-dependencies] +YAML = [ + "pyyaml>=5.2.0", +] +Pushbullet = [ + "pushbullet.py>=0.11.0", + "ws4py>=0.4.2", +] +Signal = [ + "pygobject>=3.20.0", + "pydbus>=0.6.0", + "gi>=1.2", +] + +[tool.setuptools] +zip-safe = true + +[tool.setuptools.packages.find] +exclude = ["tests", "tests.*", "config.*", "docs.*"] + +[tool.setuptools.dynamic] +version = {attr = "paradox.__version__"} + [tool.black] target-version = ["py38", "py39", "py310", "py311", "py312", "py313", "py314"] exclude = 'generated' @@ -23,3 +92,9 @@ combine_as_imports = true [tool.pytest.ini_options] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" + +[tool.coverage.report] +show_missing = true + +[tool.codespell] +skip = "*.ipynb" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 09dc5844..00000000 --- a/setup.cfg +++ /dev/null @@ -1,93 +0,0 @@ -[metadata] -name = paradox-alarm-interface -version = attr: paradox.__version__ -author = Jevgeni Kiski, João Paulo Barraca -author_email = yozik04@gmail.com, jpbarraca@gmail.com -description = Interface to Paradox Alarm Panels -long_description = file: README.md, LICENSE -long_description_content_type = text/markdown -keywords = paradox alarm ip150 serial home-assistant smarthome mqtt -url = https://github.com/ParadoxAlarmInterface/pai -project_urls = - Bug Tracker = https://github.com/ParadoxAlarmInterface/pai/issues -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0) - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: 3.13 - Programming Language :: Python :: 3.14 -license = EPL - -[options] -zip_safe = True -packages = find: -python_requires = >=3.8 -install_requires = - construct~=2.10.70 - argparse>=1.4.0 - python-slugify>=4.0.1 - pytz>=2021.3 - paho_mqtt>=2.1.0,<3 - requests>=2.20.0 - pyserial-asyncio>=0.4 - -[options.packages.find] -exclude = - tests - tests.* - config.* - docs.* - -[options.entry_points] -console_scripts = - ip150-connection-decrypt = paradox.console_scripts.ip150_connection_decrypt:main [YAML] - pai-service = paradox.console_scripts.pai_run:main - pai-dump-memory = paradox.console_scripts.pai_dump_memory:main - -[options.extras_require] -YAML = - pyyaml>=5.2.0 -Pushbullet = - pushbullet.py>=0.11.0 - ws4py>=0.4.2 -Signal = - pygobject>=3.20.0 - pydbus>=0.6.0 - gi>=1.2 - -[flake8] -exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build,tests/encodings -max-complexity = 25 -doctests = True -# To work with Black -# E501: line too long -# W503: Line break occurred before a binary operator -# E203: Whitespace before ':' -# D202 No blank lines allowed after function docstring -# W504 line break after binary operator -# E128 continuation line under-indented for visual indent -ignore = - E501, - W503, - E203, - D202, - W504, - E128 -noqa-require-code = True - -per-file-ignores = - paradox/lib/crypto.py: E221, E241, E302, E303, E305 - -[coverage:report] -show_missing = true - -[codespell] -skip = *.ipynb