-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (153 loc) · 3.93 KB
/
pyproject.toml
File metadata and controls
177 lines (153 loc) · 3.93 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
175
176
177
# pyproject.toml
[build-system]
requires = ["uv_build~=0.9.0"]
build-backend = "uv_build"
[project]
name = "openfeature_sdk"
version = "0.8.4"
description = "Standardizing Feature Flagging for Everyone"
readme = "README.md"
authors = [{ name = "OpenFeature", email = "openfeature-core@groups.io" }]
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
keywords = [
"openfeature",
"feature",
"flags",
"toggles",
]
dependencies = []
requires-python = ">=3.10"
[project.urls]
Homepage = "https://github.com/open-feature/python-sdk"
[dependency-groups]
dev = [
"behave",
"coverage[toml]>=6.5",
"poethepoet>=0.40.0",
"pytest>=9.0.0",
"pytest-asyncio>=1.3.0",
"pre-commit"
]
[tool.uv]
required-version = "~=0.9.0"
[tool.uv.build-backend]
module-name = "openfeature"
module-root = ""
namespace = true
[tool.mypy]
files = "openfeature,tests/typechecking"
python_version = "3.10" # should be identical to the minimum supported version
namespace_packages = true
explicit_package_bases = true
local_partial_types = true # will become the new default from version 2
allow_redefinition_new = true # will become the new default from version 2
fixed_format_cache = true # new caching mechanism
pretty = true
strict = true
disallow_any_generics = false
[tool.pytest]
strict = true
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]
[tool.ruff]
exclude = [
".git",
".venv",
"__pycache__",
"spec",
"venv",
]
target-version = "py310"
[tool.ruff.lint]
select = [
"A",
"B",
"C4",
"C90",
"E",
"F",
"FLY",
"FURB",
"I",
"ICN003",
"LOG",
"N",
"PERF",
"PGH",
"PLC",
"PLR0913",
"PLR0915",
"RUF",
"S",
"SIM",
"T10",
"T20",
"TID251",
"UP",
"W",
"YTT",
]
ignore = [
"E501", # the formatter will handle any too long line
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["PLR0913", "S101"]
[tool.ruff.lint.pylint]
max-args = 6
max-statements = 30
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.lint.flake8-import-conventions]
banned-from = ["typing"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.Awaitable".msg = "Use collections.abc.Awaitable instead"
"typing.Callable".msg = "Use collections.abc.Callable instead"
"typing.Collection".msg = "Use collections.abc.Collection instead"
"typing.Mapping".msg = "Use collections.abc.Mapping instead"
"typing.Sequence".msg = "Use collections.abc.Sequence instead"
"typing.MutableMapping".msg = "Use collections.abc.MutableMapping instead"
"typing.MutableSequence".msg = "Use collections.abc.MutableSequence instead"
[tool.poe]
executor = "uv"
[tool.poe.tasks]
test = "pytest tests"
test-cov = "coverage run -m pytest tests"
cov-report = "coverage xml"
cov = [
"test-cov",
"cov-report"
]
e2e = [
{ cmd = "git submodule update --init --recursive" },
{ cmd = "cp spec/specification/assets/gherkin/* tests/features/" },
{ cmd = "behave tests/features/" },
{ cmd = "rm tests/features/*.feature" },
]
pre-commit = "pre-commit run -a"
[tool.poe.tasks.test-py310]
cmd = "pytest tests"
executor = { python = "3.10", isolated = true, frozen = true }
[tool.poe.tasks.test-py311]
cmd = "pytest tests"
executor = { python = "3.11", isolated = true, frozen = true }
[tool.poe.tasks.test-py312]
cmd = "pytest tests"
executor = { python = "3.12", isolated = true, frozen = true }
[tool.poe.tasks.test-py313]
cmd = "pytest tests"
executor = { python = "3.13", isolated = true, frozen = true }
[tool.poe.tasks.test-py314]
cmd = "pytest tests"
executor = { python = "3.14", isolated = true, frozen = true }
[tool.poe.tasks.test-all]
parallel = ["test-py310", "test-py311", "test-py312", "test-py313", "test-py314"]