initial commit
This commit is contained in:
commit
9acd59dfaf
117
.gitignore
vendored
Normal file
117
.gitignore
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
pylint-out.txt
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
coverage.xml
|
||||
test-report.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
_version.py
|
||||
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
||||
History
|
||||
=======
|
||||
|
||||
Pending
|
||||
-------
|
||||
|
||||
* Initial release
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright © 2021 Mike Bloy
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
11
pyproject.toml
Normal file
11
pyproject.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools >= 42",
|
||||
"wheel",
|
||||
"sphinx",
|
||||
"setuptools_scm[toml]",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools_scm]
|
||||
write_to = "src/hasskiosk/_version.py"
|
||||
44
setup.cfg
Normal file
44
setup.cfg
Normal file
@ -0,0 +1,44 @@
|
||||
# https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
|
||||
|
||||
[metadata]
|
||||
name = hasskisok
|
||||
author = Mike Bloy
|
||||
author_email = mike@bloy.org
|
||||
description = Helper application for homeassistant kiosk screens
|
||||
long_description = file: README.md
|
||||
license = MIT
|
||||
url = https://git.bloy.org/mike/hasskiosk
|
||||
|
||||
[options]
|
||||
setup_requires=
|
||||
zip_safe = False
|
||||
include_package_data = True
|
||||
package_dir =
|
||||
=src
|
||||
packages = find:
|
||||
install_requires =
|
||||
paho-mqtt
|
||||
|
||||
[options.extras_require]
|
||||
dev =
|
||||
bpython
|
||||
flake8
|
||||
flake8-bandit
|
||||
flake8-blind-except
|
||||
flake8-builtins
|
||||
flake8-docstrings
|
||||
flake8-executable
|
||||
flake8-isort
|
||||
flake8-logging-format
|
||||
mypy
|
||||
pdbpp
|
||||
pycodestyle
|
||||
pydocstyle
|
||||
pytest
|
||||
pytest-cov
|
||||
python-language-server
|
||||
rope
|
||||
sphinx
|
||||
|
||||
[options.packages.find]
|
||||
where=src
|
||||
8
setup.py
Normal file
8
setup.py
Normal file
@ -0,0 +1,8 @@
|
||||
"""Setup."""
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
setup_requires=["setuptools-scm", "wheel"],
|
||||
use_scm_version={"write_to": "src/hasskiosk/_version.py"},
|
||||
)
|
||||
7
src/hasskiosk/__init__.py
Normal file
7
src/hasskiosk/__init__.py
Normal file
@ -0,0 +1,7 @@
|
||||
"""Home Assistant Kiosk."""
|
||||
|
||||
from ._version import version as __version__
|
||||
|
||||
__all__ = [
|
||||
"__version__",
|
||||
]
|
||||
82
tox.ini
Normal file
82
tox.ini
Normal file
@ -0,0 +1,82 @@
|
||||
[tox]
|
||||
envlist = py37,security,lint,bundle
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
wheel = true
|
||||
wheel_build_env = build
|
||||
extras=
|
||||
dev
|
||||
|
||||
[testenv:build]
|
||||
deps = setuptools
|
||||
|
||||
|
||||
[testenv:py37]
|
||||
commands =
|
||||
pytest --cov={envsitepackagesdir}/hasskiosk \
|
||||
--cov-report=term-missing \
|
||||
--cov-report=xml:coverage.xml \
|
||||
--junitxml=test-report.xml \
|
||||
--cov-branch \
|
||||
--cov-fail-under=80
|
||||
|
||||
[testenv:security]
|
||||
commands =
|
||||
bandit {envsitepackagesdir}/hasskiosk -r
|
||||
|
||||
[testenv:lint]
|
||||
commands =
|
||||
flake8 --output-file pylint-out.txt --format pylint --tee
|
||||
|
||||
[testenv:bundle]
|
||||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 87
|
||||
|
||||
[pydocstyle]
|
||||
ignore = D203,D213,D400,D401,D407,D413
|
||||
|
||||
[flake8]
|
||||
ignore = D401
|
||||
enable-extensions = G,M
|
||||
max_line_length = 87
|
||||
exclude =
|
||||
build/
|
||||
dist/
|
||||
docs/
|
||||
tests/
|
||||
.tox/
|
||||
_version.py
|
||||
.*
|
||||
|
||||
[isort]
|
||||
line_length = 87
|
||||
|
||||
[mypy]
|
||||
files = src/**/*.py,test/**/*.py
|
||||
mypy_path =
|
||||
|
||||
[pytest]
|
||||
addopts=
|
||||
-ra
|
||||
--cov-report=term-missing
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
|
||||
include =
|
||||
.tox/**/hasskiosk/
|
||||
omit =
|
||||
**/hasskiosk/_version.py
|
||||
setup.py
|
||||
tests/*
|
||||
|
||||
[coverage:paths]
|
||||
# map these two directories as equivalent, so that covered packaged code shows
|
||||
# up as coverage of the git paths actually being reported
|
||||
source =
|
||||
./src/
|
||||
.tox/**/site-packages/
|
||||
Loading…
x
Reference in New Issue
Block a user