Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions examples/invoke-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ This example utilizes a receiver and a caller for the `invoke_method` functional
### Install requirements

You can install dapr SDK package using pip command:
```sh
pip3 install dapr
```

<!-- STEP
<!-- STEP
name: Install requirements
-->

Also install Flask package:
```sh
pip3 install dapr Flask
pip3 install Flask
```

<!-- END_STEP -->
Expand Down Expand Up @@ -55,7 +59,7 @@ expected_stdout_lines:
- '== APP == 503'
- '== APP == Internal Server Error'
background: true
sleep: 5
sleep: 5
-->

```bash
Expand All @@ -66,7 +70,7 @@ dapr run --app-id=invoke-caller -- python3 invoke-caller.py
## Cleanup

<!-- STEP
expected_stdout_lines:
expected_stdout_lines:
- '✅ app stopped successfully: invoke-receiver'
name: Shutdown dapr
-->
Expand All @@ -75,4 +79,4 @@ name: Shutdown dapr
dapr stop --app-id invoke-receiver
```

<!-- END_STEP -->
<!-- END_STEP -->
13 changes: 13 additions & 0 deletions ext/dapr-ext-fastapi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,11 +48,22 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = 'The developmental release for Dapr FastAPI extension.'
long_description = 'This is the developmental release for Dapr FastAPI extension.'
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -61,4 +73,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
13 changes: 13 additions & 0 deletions ext/dapr-ext-grpc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,11 +48,22 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = 'The developmental release for Dapr gRPC AppCallback.'
long_description = 'This is the developmental release for Dapr gRPC AppCallback.'
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -61,4 +73,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
13 changes: 13 additions & 0 deletions ext/dapr-ext-langgraph/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,13 +48,24 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = 'The developmental release for the Dapr Checkpointer extension for LangGraph'
long_description = (
'This is the developmental release for the Dapr Checkpointer extension for LangGraph'
)
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -63,4 +75,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
13 changes: 13 additions & 0 deletions ext/dapr-ext-strands/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,13 +48,24 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = (
'The developmental release for the Dapr Session Manager extension for Strands Agents'
)
long_description = 'This is the developmental release for the Dapr Session Manager extension for Strands Agents'
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -63,4 +75,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
13 changes: 13 additions & 0 deletions ext/dapr-ext-workflow/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,11 +48,22 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = 'The developmental release for Dapr Workflow Authoring.'
long_description = 'This is the developmental release for Dapr Workflow Authoring.'
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -61,4 +73,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
13 changes: 13 additions & 0 deletions ext/flask_dapr/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
limitations under the License.
"""

import configparser
import os

from setuptools import setup
Expand Down Expand Up @@ -47,11 +48,22 @@ def is_release():
# Get build number from GITHUB_RUN_NUMBER environment variable
build_number = os.environ.get('GITHUB_RUN_NUMBER', '0')

cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
install_requires = [
r.strip()
for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines()
if r.strip()
]

if not is_release():
name += '-dev'
version = f'{__version__}{build_number}'
description = 'The developmental release for Dapr Python SDK Flask.'
long_description = 'This is the developmental release for Dapr Python SDK Flask.'
install_requires = [
'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires
]

print(f'package name: {name}, version: {version}', flush=True)

Expand All @@ -61,4 +73,5 @@ def is_release():
version=version,
description=description,
long_description=long_description,
install_requires=install_requires,
)
62 changes: 30 additions & 32 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ envlist =
[testenv]
setenv =
PYTHONDONTWRITEBYTECODE=1
deps =
-rdev-requirements.txt
-e {toxinidir}/ext/dapr-ext-workflow/
-e {toxinidir}/ext/dapr-ext-grpc/
-e {toxinidir}/ext/dapr-ext-fastapi/
-e {toxinidir}/ext/dapr-ext-langgraph/
-e {toxinidir}/ext/dapr-ext-strands/
-e {toxinidir}/ext/flask_dapr/
-e {toxinidir}/
commands =
coverage run -m unittest discover -v ./tests
coverage run -a -m unittest discover -v ./ext/dapr-ext-workflow/tests
Expand All @@ -30,6 +21,14 @@ commands =

commands_pre =
pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands
pip install -r dev-requirements.txt \
-e {toxinidir}/ \
-e {toxinidir}/ext/dapr-ext-workflow/ \
-e {toxinidir}/ext/dapr-ext-grpc/ \
-e {toxinidir}/ext/dapr-ext-fastapi/ \
-e {toxinidir}/ext/dapr-ext-langgraph/ \
-e {toxinidir}/ext/dapr-ext-strands/ \
-e {toxinidir}/ext/flask_dapr/

[testenv:ruff]
basepython = python3
Expand All @@ -44,13 +43,6 @@ basepython = python3
changedir = ./examples/
deps =
mechanical-markdown
-e {toxinidir}/ext/dapr-ext-workflow/
-e {toxinidir}/ext/dapr-ext-grpc/
-e {toxinidir}/ext/dapr-ext-fastapi/
-e {toxinidir}/ext/dapr-ext-langgraph/
-e {toxinidir}/ext/dapr-ext-strands/
-e {toxinidir}/ext/flask_dapr/
-e {toxinidir}/

commands =
./validate.sh conversation
Expand Down Expand Up @@ -80,6 +72,13 @@ allowlist_externals=*

commands_pre =
pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands
pip install -e {toxinidir}/ \
-e {toxinidir}/ext/dapr-ext-workflow/ \
-e {toxinidir}/ext/dapr-ext-grpc/ \
-e {toxinidir}/ext/dapr-ext-fastapi/ \
-e {toxinidir}/ext/dapr-ext-langgraph/ \
-e {toxinidir}/ext/dapr-ext-strands/ \
-e {toxinidir}/ext/flask_dapr/

[testenv:example-component]
; This environment is used to validate a specific example component.
Expand All @@ -90,37 +89,36 @@ basepython = python3
changedir = ./examples/
deps =
mechanical-markdown
-e {toxinidir}/ext/dapr-ext-workflow/
-e {toxinidir}/ext/dapr-ext-grpc/
-e {toxinidir}/ext/dapr-ext-fastapi/
-e {toxinidir}/ext/dapr-ext-langgraph/
-e {toxinidir}/ext/dapr-ext-strands/
-e {toxinidir}/ext/flask_dapr/
-e {toxinidir}/
commands =
./validate.sh {posargs}

allowlist_externals=*

commands_pre =
pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands
pip install -e {toxinidir}/ \
-e {toxinidir}/ext/dapr-ext-workflow/ \
-e {toxinidir}/ext/dapr-ext-grpc/ \
-e {toxinidir}/ext/dapr-ext-fastapi/ \
-e {toxinidir}/ext/dapr-ext-langgraph/ \
-e {toxinidir}/ext/dapr-ext-strands/ \
-e {toxinidir}/ext/flask_dapr/

[testenv:type]
basepython = python3
usedevelop = False
deps =
-rdev-requirements.txt
-e {toxinidir}/ext/dapr-ext-workflow/
-e {toxinidir}/ext/dapr-ext-grpc/
-e {toxinidir}/ext/dapr-ext-fastapi/
-e {toxinidir}/ext/dapr-ext-langgraph/
-e {toxinidir}/ext/dapr-ext-strands/
-e {toxinidir}/ext/flask_dapr/
-e {toxinidir}/
commands =
mypy --config-file mypy.ini
commands_pre =
pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands
pip install -r dev-requirements.txt \
-e {toxinidir}/ \
-e {toxinidir}/ext/dapr-ext-workflow/ \
-e {toxinidir}/ext/dapr-ext-grpc/ \
-e {toxinidir}/ext/dapr-ext-fastapi/ \
-e {toxinidir}/ext/dapr-ext-langgraph/ \
-e {toxinidir}/ext/dapr-ext-strands/ \
-e {toxinidir}/ext/flask_dapr/

[testenv:doc]
basepython = python3
Expand Down
Loading