-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (141 loc) · 3.34 KB
/
pyproject.toml
File metadata and controls
167 lines (141 loc) · 3.34 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[tool.poetry]
name = "nhs_context_logging"
version = "0.0.0"
description = ""
authors = ["spinecore"]
license = "GPLv3"
packages = [
{ include = "nhs_context_logging" },
{ include = "tests", format = "sdist" },
]
readme = "README.md"
repository = "https://github.com/NHSDigital/nhs-context-logging"
[tool.poetry.dependencies]
# core dependencies
python = ">=3.10"
[tool.poetry.extras]
pytest = ["pytest", "petname"]
[tool.setuptools.package-data]
"nhs_context_logging" = ["py.typed"]
[tool.poetry.group.dev.dependencies]
# ci / testing dependencies
petname = "^2.9"
black = "^26.3.1"
mypy = "^2.0.0"
coverage = "^7.14.0"
pytest = "^9.0.2"
pytest-asyncio = "^1"
tox = "^4.54.0"
tox-gh-actions = "^3.5.0"
ruff = "^0"
[tool.poetry.group.local.dependencies]
ipython = "^8.39.0"
[tool.ruff]
lint.select = [
# See https://beta.ruff.rs/docs/rules/ for a full list
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"Q", # flake8-quotes
"YTT", # flake8-2020
"RSE", # flake8-raise
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"EXE", # flake8-executable
"A", # flake8-builtins
"UP", # pyupgrade
"PT", # flake8-pytest-style
"PERF", # Perflint #
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
]
src = ["."]
lint.ignore = []
exclude = [".git", ".venv"]
lint.unfixable = ["SIM112"]
line-length = 120
target-version = "py310"
[tool.black]
line-length = 120
target-version = ['py310', 'py311', 'py312', 'py313']
include = '\.pyi?$'
#extend-exclude = '''
#/(
# # The following are specific to Black, you probably don't want those.
# | blib2to3
# | tests/data
# | profiling
#)/
#'''
[tool.coverage.run]
branch = true
omit = [".venv/*"]
source = ["."]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = ["pragma: no cover", "from .*", "import .*"]
omit = ["tests/*"]
sort = "-cover"
ignore_errors = true
precision = 2
fail_under = 70
show_missing = true
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.pytest.ini_options]
asyncio_mode = "auto"
python_classes = "NoTestClasses"
python_files = "*_tests.py test_*.py"
norecursedirs = ".git .venv .eggs build dist .tox"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
show_error_codes = true
check_untyped_defs = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py310,py311,py312,py313,py314
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
[testenv]
deps =
pytest
pytest-asyncio
allowlist_externals =
which
pytest
commands =
python --version
which python
which pytest
pytest
"""
[tool.poetry-dynamic-versioning]
enable = true
metadata = false
vcs = "git"
style = "pep440"
format-jinja = """
{%- if distance == 0 -%}
{{ serialize_pep440(base, stage, revision) }}
{%- else -%}
{{ serialize_pep440(bump_version(base), stage, revision, dev=timestamp) }}
{%- endif -%}
"""
[tool.poetry-dynamic-versioning.substitution]
folders = [{ path = "./" }]
[build-system]
requires = ["poetry>=1.2", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"