Skip to content

Commit 9fc2391

Browse files
committed
replace project.scripts with poethepoet
Signed-off-by: gruebel <anton.gruebel@gmail.com>
1 parent 45f7fd1 commit 9fc2391

3 files changed

Lines changed: 222 additions & 159 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
run: uv sync --frozen
3838

3939
- name: Test with pytest
40-
run: uv run cov --frozen
40+
run: poe cov
4141

4242
- name: Run E2E tests with behave
43-
run: uv run e2e --frozen
43+
run: poe e2e
4444

4545
- if: matrix.python-version == '3.13'
4646
name: Upload coverage to Codecov

pyproject.toml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Homepage = "https://github.com/open-feature/python-sdk"
3131
dev = [
3232
"behave",
3333
"coverage[toml]>=6.5",
34+
"poethepoet>=0.40.0",
3435
"pytest>=9.0.0",
3536
"pytest-asyncio>=1.3.0",
3637
"pre-commit"
@@ -133,12 +134,44 @@ banned-from = ["typing"]
133134
"typing.MutableMapping".msg = "Use collections.abc.MutableMapping instead"
134135
"typing.MutableSequence".msg = "Use collections.abc.MutableSequence instead"
135136

136-
[project.scripts]
137-
# workaround while UV doesn't support scripts directly in the pyproject.toml
138-
# see: https://github.com/astral-sh/uv/issues/5903
139-
test = "scripts.scripts:test"
140-
test-cov = "scripts.scripts:test_cov"
141-
cov-report = "scripts.scripts:cov_report"
142-
cov = "scripts.scripts:cov"
143-
e2e = "scripts.scripts:e2e"
144-
precommit = "scripts.scripts:precommit"
137+
[tool.poe]
138+
executor = "uv"
139+
140+
[tool.poe.tasks]
141+
test = "pytest tests"
142+
test-cov = "coverage run -m pytest tests"
143+
cov-report = "coverage xml"
144+
cov = [
145+
"test-cov",
146+
"cov-report"
147+
]
148+
e2e = [
149+
{ cmd = "git submodule update --init --recursive" },
150+
{ cmd = "cp spec/specification/assets/gherkin/* tests/features/" },
151+
{ cmd = "behave tests/features/" },
152+
{ cmd = "rm tests/features/*.feature" },
153+
]
154+
pre-commit = "pre-commit run -a"
155+
156+
[tool.poe.tasks.test-py310]
157+
cmd = "pytest tests"
158+
executor = { python = "3.10", isolated = true, frozen = true }
159+
160+
[tool.poe.tasks.test-py311]
161+
cmd = "pytest tests"
162+
executor = { python = "3.11", isolated = true, frozen = true }
163+
164+
[tool.poe.tasks.test-py312]
165+
cmd = "pytest tests"
166+
executor = { python = "3.12", isolated = true, frozen = true }
167+
168+
[tool.poe.tasks.test-py313]
169+
cmd = "pytest tests"
170+
executor = { python = "3.13", isolated = true, frozen = true }
171+
172+
[tool.poe.tasks.test-py314]
173+
cmd = "pytest tests"
174+
executor = { python = "3.14", isolated = true, frozen = true }
175+
176+
[tool.poe.tasks.test-all]
177+
parallel = ["test-py310", "test-py311", "test-py312", "test-py313", "test-py314"]

0 commit comments

Comments
 (0)