-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
80 lines (70 loc) · 3.45 KB
/
Copy pathpyproject.toml
File metadata and controls
80 lines (70 loc) · 3.45 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
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "hook0-client"
version = "2.0.3"
description = "Python SDK for Hook0 Open-Source Webhooks as a service for SaaS"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
keywords = ["webhooks", "webhook", "webhook-server", "events", "saas"]
authors = [
{ name = "David Sferruzza", email = "david@hook0.com" },
{ name = "François-Guillaume Ribreau", email = "fg@hook0.com" },
]
# The SDK reaches the network, verifies signatures and decodes what the API answers with nothing
# but the standard library, so installing it can never drag a transitive dependency into an
# application that only wanted to send an event.
dependencies = []
[project.urls]
Homepage = "https://www.hook0.com/"
Documentation = "https://documentation.hook0.com/"
Source = "https://gitlab.com/hook0/hook0"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
# The suites exercise the package as an installed one would see it, without an install step
# standing between an edit and the run that checks it.
pythonpath = ["src"]
testpaths = ["tests"]
# A suite that talks to a loopback socket has no reason to run long, and one that hangs has to
# fail rather than hold the pipeline until the runner gives up on it.
timeout = 120
# Coverage is measured on every run rather than behind a flag of its own, because the floor under
# `[tool.coverage.report]` is only enforced when it is measured. That keeps the gate inside
# `pytest`, the command the pipeline already runs, rather than in a job or a script beside it.
addopts = "--strict-markers --strict-config --cov --cov-branch"
[tool.coverage.run]
# What is shipped. The suites themselves are not part of the package, and holding them to a number
# would make the floor about the tests rather than about the client.
source = ["hook0"]
[tool.coverage.report]
# Two decimals, because the floor is stated to two and a figure rounded to none would let a
# hundredth of a percent of decay through without a word.
precision = 2
show_missing = true
# What this suite reaches today, exactly. Not headroom: every case here talks to a loopback socket
# and the property suites are derandomised, so there is no run-to-run noise to leave room for, and
# room would only buy silent decay. It is the same figure on 3.12 and on the 3.13 the job runs.
#
# It is not 100% because five statements cannot be reached from a test. `signature.py` carries the
# arm a signature naming neither a `v0` nor a `v1` code would take, which parsing refuses first —
# making that state unrepresentable is a change across every client and the generator, not a test.
# In `transport.py`: a header line above the ceiling, which both readers under this package refuse
# earlier for their own reasons; the truncated-body arm of the blocking transport, which cannot be
# reached because `HTTPResponse.read(amt)` answers a short read instead of raising; and the two
# lines that run when closing a connection itself fails.
#
# Raise this when the suite covers more. Lowering it is a decision somebody has to write down here.
fail_under = 99.74
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]
[tool.ruff.lint.isort]
# Plain string ordering, which is what the generator sorts its own import blocks with: the two
# agreeing is what keeps a regenerated file from being reported as unsorted.
case-sensitive = true
order-by-type = false