-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathpyproject.toml
72 lines (58 loc) · 1.99 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
[project]
name = "coverage-comment"
version = "0.0.0"
description = "Publish diff coverage report as PR comment, and create a coverage badge to display on the readme, for Python projects."
authors = [{ name = "Joachim Jablon", email = "[email protected]" }]
requires-python = ">=3.12"
license = { file = "LICENSE" }
dependencies = ["coverage[toml]", "httpx[http2]", "Jinja2"]
[project.scripts]
coverage_comment = "coverage_comment.main:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = ["ruff", "mypy", "pytest", "pytest-cov", "pytest-mock", "tenacity"]
[tool.hatch.build.targets.sdist]
include = ["coverage_comment", "coverage_comment/default.md.j2"]
[tool.hatch.build.targets.wheel]
include = ["coverage_comment", "coverage_comment/default.md.j2"]
[tool.pytest.ini_options]
addopts = """
--cov-report term-missing --cov-branch --cov-report html --cov-report term
--cov=coverage_comment --cov-context=test -vv --strict-markers -rfE
--ignore=tests/end_to_end/repo
"""
testpaths = ["tests/unit", "tests/integration", "tests/end_to_end"]
filterwarnings = ["error"]
markers = [
"repo_suffix: Allows to use an additional suffix for the e2e test repo.",
"code_path: Allows to place the code in a subdirectory for the e2e test repo.",
"subproject_id: Allows to use a different subproject id for the e2e test repo.",
"add_branches: Adds branches besides 'main' and 'branch' to integration tests setup.",
]
[tool.coverage.run]
relative_files = true
[tool.coverage.report]
exclude_also = ["\\.\\.\\."]
[tool.coverage.html]
show_contexts = true
[tool.mypy]
no_implicit_optional = true
[tool.ruff]
target-version = "py312"
unsafe-fixes = true
[tool.ruff.lint]
extend-select = [
"UP", # pyupgrade
"I", # isort
"E", # pycodestyle errors
"W", # pycodestyle warnings
"RUF", # ruff
]
fixable = ["ALL"]
extend-ignore = [
"E501", # line too long
]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]