forked from JnyJny/busylight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
121 lines (93 loc) · 2.85 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[tool.poetry]
name = "busylight-for-humans"
version = "0.26.0"
description = "Control USB connected LED lights, like a human."
authors = ["JnyJny <erik.oshaughnessy@gmail.com>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/JnyJny/busylight.git"
packages = [ {include = "busylight"} ]
[tool.poetry.dependencies]
python = "^3.7"
bitvector-for-humans = "^0.14.0"
webcolors = "^1.11.1"
pyserial = "^3.5"
importlib-metadata = {version = ">=4.11.3,<7.0.0", python = "<3.8"}
hidapi = "^0.13.1"
loguru = ">=0.6,<0.8"
typer = "^0.7.0"
fastapi = ">=0.92,<0.96"
[tool.poetry.extras]
webapi = ["fastapi", "uvicorn"]
[tool.poetry.dev-dependencies]
anyio = {extras = ["trio"], version = "^3.6.2"}
[tool.poetry.scripts]
busylight="busylight.__main__:cli"
busyserve="busylight.__main__:webcli"
[tool.poe.tasks]
# testing
_generate_coverage = "pytest --cov=./busylight --cov-report=html"
_open_report = "open htmlcov/index.html"
coverage = [ "_generate_coverage", "_open_report"]
mypy = "mypy --config-file pyproject.toml busylight"
# requirements
requirements = [
{ cmd = "poetry export -o requirements.txt" },
{ cmd = "git add requirements.txt" },
{ cmd = "git commit -m 'requirements.txt updated from poetry.lock'"},
]
# update version in pyproject
_patch_bump = "poetry version patch"
_minor_bump = "poetry version minor"
_major_bump = "poetry version major"
# add, commit, tag and commit updated pyproject
_add = "git add pyproject.tml"
_commit = {shell = "git commit -m `poetry version -s`"}
_tag = { shell = "git tag `poetry version -s`" }
_push = "git push --all"
_update_pyproject = ["_add", "_commit", "_tag", "_push"]
_patch_update = ["_patch_bump", "_update_pyproject"]
_minor_update = ["_minor_bump", "_update_pyproject"]
_major_update = ["_major_bump", "_update_pyproject"]
# publish
_publish = "poetry publish"
publish_patch = ["_patch_update", "_publish"]
publish_minor = ["_minor_update", "_publish"]
publish_major = ["_major_update", "_publish"]
publish = {ref = "publish_patch"}
# clean
[[tool.poe.tasks.clean]]
cmd = "rm -rf htmlcov dist busylight.egg-info *.log"
[tool.poetry.group.dev.dependencies]
pytest = "^7"
black = ">=22.12,<24.0"
pytest-cov = "^3.0.0"
mypy = ">=0.991,<1.3"
requests = "^2.28.1"
httpx = ">=0.23.2,<0.25.0"
pytest-mock = "^3.9.0"
poethepoet = "^0.19.0"
[tool.poetry.group.webapi.dependencies]
uvicorn = ">=0.20,<0.22"
[tool.pytest.ini_options]
addopts = "-p no:warnings"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[mypy]
[mypy-webcolors]
ignore_missing_imports = true
[mypy-hid]
ignore_missing_imports = true
[mypy-fastapi]
ignore_missing_imports = true
[mypy-pydantic]
ignore_missing_imports = true
[mypy-uvicorn]
ignore_missing_imports = true
[mypy-loguru]
ignore_missing_imports = true
[mypy-bitvector]
ignore_missing_imports = true
[mypy-fastapi.responses]
ignore_missing_imports = true