-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (157 loc) · 3.84 KB
/
pyproject.toml
File metadata and controls
174 lines (157 loc) · 3.84 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
168
169
170
171
172
173
174
[tool.poetry]
name = "Mesh-Client"
version = "0.0.0"
description = "Client for NHS England's MESH messaging system"
repository = "https://github.com/NHSDigital/mesh-client"
authors = ["spinecore"]
license = "MIT"
packages = [
{ include = "mesh_client" },
]
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
# including this would turn on pyproject.toml for setuptools and fail validation
#[tool.setuptools.package-data]
#"mesh_client" = [
# "py.typed",
# "*.pem"
#]
[tool.poetry.dependencies]
# core dependencies
python = ">=3.10,<3.15.0"
urllib3 = ">=1.25.4"
requests = ">=2.32.0,<3.0.0"
werkzeug = ">=3.0.3,<4.0.0"
[tool.poetry.group.dev.dependencies]
black = ">=25,<27"
mypy = "^1.4.1"
types-six = "^1.16.21.8"
types-requests = "^2.31.0.1"
types-mock = "^5.0.0.7"
mock = "^5.0.2"
build = "^1.0.3"
toml = "^0.10.2"
tox = "^4.6.3"
types-setuptools = ">=80,<83"
coverage = "^7.2.7"
pytest = ">=7.4,<10.0"
importlib-metadata = {version = ">=4.11.4", python = "<3.12"}
pytest-httpserver = "^1.0.8"
ruff = ">=0,<1"
boto3 = "^1.33.7"
[tool.poetry.group.local.dependencies]
ipython = "^8.14.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 = ["RUF100"]
exclude = [
".git",
".venv",
]
lint.unfixable = ["SIM112"]
line-length = 120
target-version = "py310"
[tool.pytest.ini_options]
#asyncio_mode = "auto"
python_classes = "NoTestClassesPlease"
python_files = "*_testz.py test_*.py *_tests.py"
norecursedirs = ".git .venv .eggs build dist terraform features"
[tool.black]
line-length = 120
target-version = ['py310']
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 = [
"features/*",
".venv/lib/*",
"build/*",
"**/build/*",
"dist/*",
"**/dist/*",
"src/shared/aws.py",
"scripts/*",
"mesh_client/types.py"
]
source = [
"."
]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
"pragma: no cover",
"from .*",
"import .*"
]
omit = [
"*/conftest.py",
"*_tests.py",
"*/test_helpers*",
"*/test_mailbox_provider.py"
]
sort = "-cover"
ignore_errors = true
precision = 2
fail_under = 78
show_missing = true
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
show_error_codes = true
check_untyped_defs = true
[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 -%}
"""
pattern = "(?x)^((?P<epoch>\\d+)!)?(?P<base>\\d+(\\.\\d+)*)([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\\d+)?))?(\\+(?P<tagged_metadata>.+))?$"
[build-system]
requires = ["setuptools>=42", "toml", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"