-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
166 lines (144 loc) · 3.32 KB
/
pyproject.toml
File metadata and controls
166 lines (144 loc) · 3.32 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
[tool.poetry]
name = "terraform-aws-metrics-lambda"
version = "0.0.0"
description = "odin metriczzz"
authors = ["spine core"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/NHSDigital/terraform-aws-metrics-lambda"
package-mode = false
#packages = [
# { include = "shared", from = "./src" },
#]
[tool.poetry.dependencies]
python = "^3.12"
[tool.poetry.group.dev.dependencies]
# ci / testing dependencies
mypy = ">=1.19.0"
pytest = ">=8.4.2"
pytest-asyncio = ">=1.3.0"
pytest-cov = ">=7.0.0"
python-dotenv = ">=1.2.1"
httpx = ">=0.28.1"
pytest-httpx = ">=0.35.0"
pytest-httpserver = ">=1.1.2"
ruff = ">=0.14.8"
petname = ">=2.6"
black = ">=25.12.0"
boto3 = ">=1.42.4"
moto = ">=5.1.10"
pyparsing = ">=3.3.1"
types-python-dateutil = ">=2.9.0.20251115"
aws-lambda-powertools = ">=3.24.0"
[tool.poetry.group.local.dependencies]
ipython = ">=9.8.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 = [
"SIM112" # casing on environment variables
]
exclude = [
".git",
".venv",
]
lint.unfixable = ["SIM112"]
line-length = 120
target-version = "py312"
[tool.ruff.lint.per-file-ignores]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
show_error_codes = true
check_untyped_defs = true
exclude = [
"build",
"dist",
]
[[tool.mypy.overrides]]
module = "boto3.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "botocore.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "moto.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "requests.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
python_classes = "NoTestClasses"
python_files = "*_test.py test_*.py *_tests.py"
norecursedirs = ".git .venv .eggs build dist .tox"
testpaths = [
"tests",
]
[tool.coverage.run]
branch = true
omit = [
".venv/*",
".tox/*",
"tests/*",
]
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 = 55
show_missing = true
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.poetry-dynamic-versioning]
enable = true
metadata = false
pattern = 'v(?P<base>\d+\.\d+\.\d+)'
vcs = "git"
style = "pep440"
format-jinja = """
{%- if distance == 0 -%}
{{ serialize_pep440(base, stage, revision) }}
{%- else -%}
{{ serialize_pep440(bump_version(base), "pre", revision=timestamp) }}
{%- endif -%}
"""
[build-system]
requires = ["poetry>=1.6.1", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"