Skip to content

Commit 61add22

Browse files
authored
fix: replace project.scripts with poethepoet (#335)
* replace project.scripts with poethepoet Signed-off-by: gruebel <anton.gruebel@gmail.com> * update lock file Signed-off-by: gruebel <anton.gruebel@gmail.com> * fix merge conflict Signed-off-by: gruebel <anton.gruebel@gmail.com> --------- Signed-off-by: gruebel <anton.gruebel@gmail.com>
1 parent a835c77 commit 61add22

File tree

14 files changed

+324
-699
lines changed

14 files changed

+324
-699
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7
6969
with:
7070
python-version: ${{ matrix.python-version }}
71+
activate-environment: true
7172

7273
- name: Install dependencies
7374
working-directory: ${{ matrix.package }}
@@ -80,11 +81,11 @@ jobs:
8081
- name: Type checking
8182
if: matrix.python-version == '3.13'
8283
working-directory: ${{ matrix.package }}
83-
run: uv run mypy-check --frozen
84+
run: poe mypy
8485

8586
- name: Test with pytest
8687
working-directory: ${{ matrix.package }}
87-
run: uv run cov --frozen
88+
run: poe cov
8889

8990
- if: matrix.python-version == '3.13'
9091
name: Upload coverage to Codecov

hooks/openfeature-hooks-opentelemetry/pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
2929
dev = [
3030
"coverage[toml]>=7.10.0,<8.0.0",
3131
"mypy>=1.18.0,<2.0.0",
32+
"poethepoet>=0.37.0",
3233
"pytest>=8.4.0,<9.0.0",
3334
]
3435

@@ -52,12 +53,12 @@ pretty = true
5253
strict = true
5354
disallow_any_generics = false
5455

55-
[project.scripts]
56-
# workaround while UV doesn't support scripts directly in the pyproject.toml
57-
# see: https://github.com/astral-sh/uv/issues/5903
58-
cov-report = "scripts.scripts:cov_report"
59-
cov = "scripts.scripts:cov"
60-
# don't name it `mypy` otherwise `uv` will override the actual binary
61-
mypy-check = "scripts.scripts:mypy"
62-
test = "scripts.scripts:test"
63-
test-cov = "scripts.scripts:test_cov"
56+
[tool.poe.tasks]
57+
test = "pytest tests"
58+
test-cov = "coverage run -m pytest tests"
59+
cov-report = "coverage xml"
60+
cov = [
61+
"test-cov",
62+
"cov-report"
63+
]
64+
mypy = "mypy"

hooks/openfeature-hooks-opentelemetry/src/scripts/scripts.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

providers/openfeature-provider-env-var/pyproject.toml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
2727
dev = [
2828
"coverage[toml]>=7.10.0,<8.0.0",
2929
"mypy>=1.18.0,<2.0.0",
30+
"poethepoet>=0.37.0",
3031
"pytest>=8.4.0,<9.0.0",
3132
]
3233

@@ -50,25 +51,17 @@ pretty = true
5051
strict = true
5152
disallow_any_generics = false
5253

53-
[tool.hatch.envs.hatch-test]
54-
dependencies = [
55-
"pytest>=8.3.5",
56-
"pytest-cov>=6.1.1",
57-
"pytest",
58-
]
59-
6054
[tool.coverage.run]
6155
omit = [
6256
"tests/**",
6357
]
6458

65-
[project.scripts]
66-
# workaround while UV doesn't support scripts directly in the pyproject.toml
67-
# see: https://github.com/astral-sh/uv/issues/5903
68-
cov-report = "scripts.scripts:cov_report"
69-
cov = "scripts.scripts:cov"
70-
# don't name it `mypy` otherwise `uv` will override the actual binary
71-
mypy-check = "scripts.scripts:mypy"
72-
test = "scripts.scripts:test"
73-
test-cov = "scripts.scripts:test_cov"
74-
59+
[tool.poe.tasks]
60+
test = "pytest tests"
61+
test-cov = "coverage run -m pytest tests"
62+
cov-report = "coverage xml"
63+
cov = [
64+
"test-cov",
65+
"cov-report"
66+
]
67+
mypy = "mypy"

providers/openfeature-provider-env-var/src/scripts/scripts.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

providers/openfeature-provider-flagd/pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dev = [
3737
"coverage[toml]>=7.10.0,<8.0.0",
3838
"grpcio-health-checking>=1.74.0,<2.0.0",
3939
"mypy>=1.18.0,<2.0.0",
40+
"poethepoet>=0.37.0",
4041
"pytest>=8.4.0,<9.0.0",
4142
"pytest-bdd>=8.1.0,<9.0.0",
4243
"testcontainers>=4.12.0,<5.0.0",
@@ -108,12 +109,12 @@ module = [
108109
]
109110
warn_unused_ignores = false
110111

111-
[project.scripts]
112-
# workaround while UV doesn't support scripts directly in the pyproject.toml
113-
# see: https://github.com/astral-sh/uv/issues/5903
114-
cov-report = "scripts.scripts:cov_report"
115-
cov = "scripts.scripts:cov"
116-
# don't name it `mypy` otherwise `uv` will override the actual binary
117-
mypy-check = "scripts.scripts:mypy"
118-
test = "scripts.scripts:test"
119-
test-cov = "scripts.scripts:test_cov"
112+
[tool.poe.tasks]
113+
test = "pytest tests"
114+
test-cov = "coverage run -m pytest tests"
115+
cov-report = "coverage xml"
116+
cov = [
117+
"test-cov",
118+
"cov-report"
119+
]
120+
mypy = "mypy"

providers/openfeature-provider-flagd/src/scripts/scripts.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

providers/openfeature-provider-flipt/pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
2828
dev = [
2929
"coverage[toml]>=7.10.0,<8.0.0",
3030
"mypy>=1.18.0,<2.0.0",
31+
"poethepoet>=0.37.0",
3132
"pytest>=8.4.0,<9.0.0",
3233
"requests-mock>=1.12.0,<2.0.0",
3334
"types-requests>=2.31.0,<3.0.0", # NOTE: types-requests>=2.32.0 has dependency conflicts with boto3/moto on Python 3.9
@@ -58,12 +59,12 @@ pretty = true
5859
strict = true
5960
disallow_any_generics = false
6061

61-
[project.scripts]
62-
# workaround while UV doesn't support scripts directly in the pyproject.toml
63-
# see: https://github.com/astral-sh/uv/issues/5903
64-
cov-report = "scripts.scripts:cov_report"
65-
cov = "scripts.scripts:cov"
66-
# don't name it `mypy` otherwise `uv` will override the actual binary
67-
mypy-check = "scripts.scripts:mypy"
68-
test = "scripts.scripts:test"
69-
test-cov = "scripts.scripts:test_cov"
62+
[tool.poe.tasks]
63+
test = "pytest tests"
64+
test-cov = "coverage run -m pytest tests"
65+
cov-report = "coverage xml"
66+
cov = [
67+
"test-cov",
68+
"cov-report"
69+
]
70+
mypy = "mypy"

providers/openfeature-provider-flipt/src/scripts/scripts.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

providers/openfeature-provider-ofrep/pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
2929
dev = [
3030
"coverage[toml]>=7.10.0,<8.0.0",
3131
"mypy>=1.18.0,<2.0.0",
32+
"poethepoet>=0.37.0",
3233
"pytest>=8.4.0,<9.0.0",
3334
"requests-mock>=1.12.0,<2.0.0",
3435
"types-requests>=2.31.0,<3.0.0", # NOTE: types-requests>=2.32.0 has dependency conflicts with boto3/moto on Python 3.9
@@ -64,12 +65,12 @@ pretty = true
6465
strict = true
6566
disallow_any_generics = false
6667

67-
[project.scripts]
68-
# workaround while UV doesn't support scripts directly in the pyproject.toml
69-
# see: https://github.com/astral-sh/uv/issues/5903
70-
cov-report = "scripts.scripts:cov_report"
71-
cov = "scripts.scripts:cov"
72-
# don't name it `mypy` otherwise `uv` will override the actual binary
73-
mypy-check = "scripts.scripts:mypy"
74-
test = "scripts.scripts:test"
75-
test-cov = "scripts.scripts:test_cov"
68+
[tool.poe.tasks]
69+
test = "pytest tests"
70+
test-cov = "coverage run -m pytest tests"
71+
cov-report = "coverage xml"
72+
cov = [
73+
"test-cov",
74+
"cov-report"
75+
]
76+
mypy = "mypy"

0 commit comments

Comments
 (0)