-
Notifications
You must be signed in to change notification settings - Fork 25
/
pyproject.toml
120 lines (93 loc) · 2.88 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
[tool.poetry]
name = "busylight-for-humans"
version = "0.32.0"
description = "Control USB connected LED lights, like a human."
authors = ["JnyJny <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/JnyJny/busylight.git"
packages = [ {include = "busylight"} ]
[tool.poetry.dependencies]
python = "^3.8"
bitvector-for-humans = "^0.14.0"
webcolors = ">=1.11.1,<25.0.0"
pyserial = "^3.5"
loguru = ">=0.6,<0.8"
hidapi = "^0.14.0"
typer = ">=0.12.3,<0.14.0"
fastapi = { version = ">=0.111,<0.116", optional = true }
uvicorn = { version = ">=0.24,<0.33", optional = true }
[tool.poetry.extras]
webapi = ["fastapi", "uvicorn"]
[tool.poetry.group.dev.dependencies]
pytest = ">=7,<9"
pytest-cov = ">=3,<6"
mypy = ">=0.991,<1.14"
requests = "^2.28.1"
pytest-mock = "^3.9.0"
httpx = ">=0.25.2,<0.28.0"
black = "^24.4.2"
poethepoet = ">=0.26.1,<0.31.0"
anyio = "^4.3.0"
[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.toml"
_commit = {shell = "git commit -m `poetry version -s`"}
_tag = { shell = "git tag `poetry version -s`" }
_push = "git push --all"
_push_tags = "git push --tags"
_update_pyproject = ["_add", "_commit", "_tag", "_push_tags", "_push"]
_patch_update = ["_patch_bump", "_update_pyproject"]
_minor_update = ["_minor_bump", "_update_pyproject"]
_major_update = ["_major_bump", "_update_pyproject"]
# build
_build = "poetry build"
# publish
_publish = "poetry publish"
publish_patch = ["_patch_update", "_build", "_publish"]
publish_minor = ["_minor_update", "_build", "_publish"]
publish_major = ["_major_update", "_build", "_publish"]
publish = {ref = "publish_patch"}
# clean
[[tool.poe.tasks.clean]]
cmd = "rm -rf htmlcov dist busylight.egg-info *.log"
[tool.pytest.ini_options]
addopts = "-p no:warnings"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.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