Skip to content

Commit e56a6d2

Browse files
authored
Merge branch 'main' into cyphercodes/add-cross-platform-build-matrix
Signed-off-by: Casper Nielsen <casper@diagrid.io>
2 parents 232f8c4 + ddc7c1a commit e56a6d2

46 files changed

Lines changed: 4612 additions & 787 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ coverage:
99
ignore:
1010
- dapr/proto # - Generated GRPC client
1111
- tests # - tests
12-
- .tox # - environment
12+
- .venv # - environment
1313
- ext/dapr-ext-fastapi/tests # - fastapi extention tests

.devcontainer/postCreateCommand.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
# Install a project in a editable mode
2-
pip3 install -e .
3-
pip3 install -e ./ext/dapr-ext-grpc/
4-
pip3 install -e ./ext/dapr-ext-fastapi/
5-
pip3 install -e ./ext/dapr-ext-workflow/
6-
7-
# Install required packages
8-
pip3 install -r ./dev-requirements.txt
1+
# Install all packages and dev dependencies
2+
uv sync --all-packages --group dev

.github/dependabot.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "pip"
3+
- package-ecosystem: "uv"
44
directory: "/"
55
schedule:
66
interval: "daily"
7-
- package-ecosystem: "pip"
8-
directory: "/ext/dapr-ext-fastapi"
9-
schedule:
10-
interval: "daily"
11-
- package-ecosystem: "pip"
12-
directory: "/ext/dapr-ext-grpc"
13-
schedule:
14-
interval: "daily"
15-
- package-ecosystem: "pip"
16-
directory: "/ext/flask_dapr"
17-
schedule:
18-
interval: "daily"
197
- package-ecosystem: "github-actions"
208
directory: "/"
219
schedule:
22-
interval: "daily"
10+
interval: "daily"

.github/workflows/build-push-to-main.yaml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.10'
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
1820
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel tox
21+
run: uv sync --frozen --all-packages --group dev
2222
- name: Run Autoformatter
2323
run: |
24-
tox -e ruff
24+
uv run ruff check --fix && uv run ruff format
2525
statusResult=$(git status -u --porcelain)
26-
if [ -z $statusResult ]
26+
if [ -z "$statusResult" ]
2727
then
2828
exit 0
2929
else
30-
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
30+
echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'."
3131
exit 1
3232
fi
3333
@@ -44,16 +44,20 @@ jobs:
4444
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python_ver }}
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v5
4749
- name: Install dependencies
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install setuptools wheel tox
50+
run: uv sync --frozen --all-packages --group dev
5151
- name: Check Typing
52-
run: |
53-
tox -e type
52+
run: uv run mypy
5453
- name: Run unit-tests
5554
run: |
56-
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
55+
uv run coverage run -m unittest discover -v ./tests
56+
for dir in ext/*/tests; do
57+
uv run coverage run -a -m unittest discover -v "./$dir"
58+
done
59+
uv run coverage run -a -m pytest -m "not e2e" ./ext/dapr-ext-workflow/tests/durabletask/
60+
uv run coverage xml
5761
- name: Upload test coverage
5862
uses: codecov/codecov-action@v6
5963
publish:
@@ -71,52 +75,52 @@ jobs:
7175
- name: Install dependencies
7276
run: |
7377
python -m pip install --upgrade pip
74-
pip install setuptools wheel twine tox
78+
pip install build twine
7579
- name: Build and publish Dapr Python SDK
7680
env:
7781
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
7882
run: |
79-
python setup.py sdist bdist_wheel
83+
python -m build
8084
twine upload dist/*
8185
- name: Build and publish dapr-ext-workflow
8286
env:
8387
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
8488
run: |
8589
cd ext/dapr-ext-workflow
86-
python setup.py sdist bdist_wheel
90+
python -m build
8791
twine upload dist/*
8892
- name: Build and publish Dapr Flask Extension
8993
env:
9094
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
9195
run: |
9296
cd ext/flask_dapr
93-
python setup.py sdist bdist_wheel
97+
python -m build
9498
twine upload dist/*
9599
- name: Build and publish dapr-ext-grpc
96100
env:
97101
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
98102
run: |
99103
cd ext/dapr-ext-grpc
100-
python setup.py sdist bdist_wheel
104+
python -m build
101105
twine upload dist/*
102106
- name: Build and publish dapr-ext-fastapi
103107
env:
104108
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
105109
run: |
106110
cd ext/dapr-ext-fastapi
107-
python setup.py sdist bdist_wheel
111+
python -m build
108112
twine upload dist/*
109113
- name: Build and publish dapr-ext-langgraph
110114
env:
111115
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
112116
run: |
113117
cd ext/dapr-ext-langgraph
114-
python setup.py sdist bdist_wheel
118+
python -m build
115119
twine upload dist/*
116120
- name: Build and publish dapr-ext-strands
117121
env:
118122
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
119123
run: |
120124
cd ext/dapr-ext-strands
121-
python setup.py sdist bdist_wheel
125+
python -m build
122126
twine upload dist/*

.github/workflows/build-tag.yaml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.10'
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
1820
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel tox
21+
run: uv sync --frozen --all-packages --group dev
2222
- name: Run Autoformatter
2323
run: |
24-
tox -e ruff
24+
uv run ruff check --fix && uv run ruff format
2525
statusResult=$(git status -u --porcelain)
26-
if [ -z $statusResult ]
26+
if [ -z "$statusResult" ]
2727
then
2828
exit 0
2929
else
30-
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
30+
echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'."
3131
exit 1
3232
fi
3333
@@ -44,16 +44,20 @@ jobs:
4444
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python_ver }}
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v5
4749
- name: Install dependencies
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install setuptools wheel tox
50+
run: uv sync --frozen --all-packages --group dev
5151
- name: Check Typing
52-
run: |
53-
tox -e type
52+
run: uv run mypy
5453
- name: Run unit-tests
5554
run: |
56-
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
55+
uv run coverage run -m unittest discover -v ./tests
56+
for dir in ext/*/tests; do
57+
uv run coverage run -a -m unittest discover -v "./$dir"
58+
done
59+
uv run coverage run -a -m pytest -m "not e2e" ./ext/dapr-ext-workflow/tests/durabletask/
60+
uv run coverage xml
5761
- name: Upload test coverage
5862
uses: codecov/codecov-action@v6
5963
publish:
@@ -71,52 +75,52 @@ jobs:
7175
- name: Install dependencies
7276
run: |
7377
python -m pip install --upgrade pip
74-
pip install setuptools wheel twine tox
78+
pip install build twine
7579
- name: Build and publish Dapr Python SDK
7680
env:
7781
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
7882
run: |
79-
python setup.py sdist bdist_wheel
83+
python -m build
8084
twine upload dist/*
8185
- name: Build and publish dapr-ext-workflow
8286
env:
8387
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
8488
run: |
8589
cd ext/dapr-ext-workflow
86-
python setup.py sdist bdist_wheel
90+
python -m build
8791
twine upload dist/*
8892
- name: Build and publish Dapr Flask Extension
8993
env:
9094
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
9195
run: |
9296
cd ext/flask_dapr
93-
python setup.py sdist bdist_wheel
97+
python -m build
9498
twine upload dist/*
9599
- name: Build and publish dapr-ext-grpc
96100
env:
97101
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
98102
run: |
99103
cd ext/dapr-ext-grpc
100-
python setup.py sdist bdist_wheel
104+
python -m build
101105
twine upload dist/*
102106
- name: Build and publish dapr-ext-fastapi
103107
env:
104108
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
105109
run: |
106110
cd ext/dapr-ext-fastapi
107-
python setup.py sdist bdist_wheel
111+
python -m build
108112
twine upload dist/*
109113
- name: Build and publish dapr-ext-langgraph
110114
env:
111115
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
112116
run: |
113117
cd ext/dapr-ext-langgraph
114-
python setup.py sdist bdist_wheel
118+
python -m build
115119
twine upload dist/*
116120
- name: Build and publish dapr-ext-strands
117121
env:
118122
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
119123
run: |
120124
cd ext/dapr-ext-strands
121-
python setup.py sdist bdist_wheel
125+
python -m build
122126
twine upload dist/*

.github/workflows/build.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ jobs:
2121
uses: actions/setup-python@v6
2222
with:
2323
python-version: '3.10'
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
2426
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install setuptools wheel tox
27+
run: uv sync --frozen --all-packages --group dev
2828
- name: Run Autoformatter
2929
run: |
30-
tox -e ruff
30+
uv run ruff check --fix && uv run ruff format
3131
statusResult=$(git status -u --porcelain)
3232
if [ -z "$statusResult" ]
3333
then
3434
exit 0
3535
else
36-
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
36+
echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'."
3737
exit 1
3838
fi
3939
@@ -77,16 +77,19 @@ jobs:
7777
uses: actions/setup-python@v6
7878
with:
7979
python-version: ${{ matrix.python_version }}
80+
- name: Install uv
81+
uses: astral-sh/setup-uv@v5
8082
- name: Install dependencies
81-
run: |
82-
python -m pip install --upgrade pip
83-
pip install setuptools wheel tox
83+
run: uv sync --frozen --all-packages --group dev
8484
- name: Check Typing
85-
if: matrix.os == 'ubuntu-latest'
86-
run: |
87-
tox -e type
85+
run: uv run mypy
8886
- name: Run unit-tests
8987
run: |
90-
tox -e ${{ matrix.tox_env }}
88+
uv run coverage run -m unittest discover -v ./tests
89+
for dir in ext/*/tests; do
90+
uv run coverage run -a -m unittest discover -v "./$dir"
91+
done
92+
uv run coverage run -a -m pytest -m "not e2e" ./ext/dapr-ext-workflow/tests/durabletask/
93+
uv run coverage xml
9194
- name: Upload test coverage
9295
uses: codecov/codecov-action@v6

.github/workflows/dapr-bot-schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
automerge:
2323
uses: dapr/.github/.github/workflows/automerge.yaml@main
2424
with:
25-
maintainer-teams: python-sdk-maintainers
25+
maintainer-teams: maintainers-python-sdk
2626
secrets:
2727
dapr_bot_token: ${{ secrets.DAPR_BOT_TOKEN }}
2828

.github/workflows/run-tests.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ jobs:
8383
uses: actions/setup-python@v6
8484
with:
8585
python-version: ${{ matrix.python_ver }}
86+
- name: Install uv
87+
uses: astral-sh/setup-uv@v5
8688
- name: Install dependencies
87-
run: |
88-
python -m pip install --upgrade pip
89-
pip install setuptools wheel twine tox
89+
run: uv sync --frozen --all-packages --group examples
9090
- name: Set up Dapr CLI
9191
uses: dapr/.github/.github/actions/setup-dapr-cli@main
9292
with:
@@ -105,7 +105,7 @@ jobs:
105105
ollama pull llama3.2:latest
106106
- name: Check examples
107107
run: |
108-
tox -e examples
108+
uv run pytest tests/examples/
109109
- name: Run integration tests
110110
run: |
111-
tox -e integration
111+
uv run pytest tests/integration/

0 commit comments

Comments
 (0)