-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
113 lines (100 loc) · 3 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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "example"
version = "0.0.0"
description = "This is a demonstration of the Make Python Devex concept project"
authors = ["Colin Dean <[email protected]>"]
license = "CC0"
readme = "README.md"
[tool.poetry.scripts]
example-make-python-devex = "example:main"
[tool.poetry.dependencies]
# set Python constraints
python = ">=3.9,<3.14"
## commonly used libraries
# retry failing method calls
retry2 = "^0.9"
# mark things as deprecated
deprecated = "^1.2"
# simple logging that just works
loguru = "*"
[tool.poetry.group.dev.dependencies]
# test framework
pytest = "^8"
# html output
pytest-html = "*"
# necessary for best html output
ansi2html = "*"
# Test Anything Protocol output
pytest-tap = "*"
# coverage.py integration
pytest-cov = "*"
# opinionated code formatter
black = ">=22"
# type hints checker
mypy = { version = "*", extras = ["faster-cache"] }
# xml library, used for outputting HTML reports from mypy, etc.
lxml = "*"
# lightning fast linter and style checker
ruff = "*"
# universal dependency retriver
peru = "*"
## types packages
types-Deprecated = "*"
types-retry = "*"
## Configure publish destination explicitly, for safety
## Default is PyPI but you probably don't want to do that internally.
## See also https://python-poetry.org/docs/repositories/#publishable-repositories
[[tool.poetry.source]]
name = "publish-source"
url = "https://pypi.example.com/pypi/example-repo"
# url = "https://pypi.org/simple/"
priority = "explicit"
###
# Below here are rarely-touched settings for the various tools used in this project.
# N.b. Change the Python versions below when changing tool.poetry.dependencies.python above.
###
[tool.black]
# 119 = GitHub's wrapping limit
line-length = 119
target-version = ['py313']
include = '\.pyi?$'
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
[tool.pytest.ini_options]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"unittest: marks tests as unit tests (deselect with '-m \"not unittest\"')"
]
minversion = "7.0"
testpaths = ["tests"]
# -vvvv = as verbose as it gets
# -ra = show extra test summary for all except passed
# coverage options passed via pytest-cov and reporting output in HTML, JUNIT, and TAP form
addopts = """
-vvvv -r A --quiet \
--cov --cov-report xml --cov-report html --cov-report term \
--junit-xml=build/report.junit.xml --html=build/report.html --self-contained-html \
--tap-outdir=build --tap-combined \
--durations=10
"""
# Configure coverage.py, which is enabled in the pytest addopts above
[tool.coverage.run]
branch = true
[tool.coverage.report]
skip_empty = true
[tool.coverage.html]
directory = "build/coverage"
[tool.coverage.xml]
output = "build/coverage/coverage.xml"
[tool.coverage.paths]
source = ["example"]
[tool.ruff]
# Same as Black.
line-length = 119
target-version = "py313"
exclude = [".*", "dist", "__pypackages__", "build", "venv"]