forked from BrewBlox/brewblox-ctl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (105 loc) · 2.8 KB
/
pyproject.toml
File metadata and controls
115 lines (105 loc) · 2.8 KB
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
[project]
name = "brewblox-ctl"
version = "1.1.0"
description = "Brewblox management tool"
readme = "README.md"
authors = [
{name = "BrewPi", email = "development@brewpi.com"},
]
license = {text = "GPL-3.0"}
requires-python = "<4,>=3.8"
dependencies = [
"requests<3.0.0,>=2.32.3",
"click<9.0.0,>=8.1.7",
"python-dotenv[cli]<1.0.0,>=0.21.1",
"configobj<6.0.0,>=5.0.6",
"zeroconf<1.0.0,>=0.47.3",
"pyusb<2.0.0,>=1.2.1",
"pyserial<4.0,>=3.5",
"psutil<6.0.0,>=5.9.4",
"ruamel-yaml<1.0.0,>=0.17.21",
"packaging<24.0,>=23.0",
"passlib<2.0.0,>=1.7.4",
"pydantic<3.0.0,>=2.6.4",
"jinja2<4.0.0,>=3.1.3",
]
[dependency-groups]
dev = [
"pytest-cov",
"flake8>=5",
"autopep8",
"pytest-mock",
"flake8-quotes",
"httpretty==1.0.5",
"pyyaml<7.0,>=6.0",
"flake8-pyproject<2.0.0,>=1.2.3",
"ruff>=0.8.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
addopts = """
--cov=brewblox_ctl
--cov-branch
--cov-report=term-missing:skip-covered
--cov-fail-under=100
--no-cov-on-fail
--durations=3
"""
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"except asyncio.CancelledError:",
]
[tool.coverage.run]
omit = [
"brewblox_ctl/utils.py",
"brewblox_ctl/deployed/*",
"brewblox_ctl/templates/*",
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D211",
"D203",
"D213",
"D212",
"D401",
"COM812",
"ISC001",
"Q000",
"Q003",
]
[tool.ruff.format]
indent-style = "space"
line-ending = "lf"
quote-style = "single"
[tool.ruff.lint.extend-per-file-ignores]
"test/**/*.py" = [
# at least this three should be fine in tests:
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"D103", # Missing docstring in public function
"ANN201", # Missing return type annotation
"SLF001", # private member accessed
"D200", # One-line docstring should fit on one line with quotes
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D415", # First line should end with a period, question mark, or exclamation point
"FLY002", # Consider f-string instead of string join
"ANN", # Missing type annotation for variable
]