Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UT support more py ver #291

Merged
merged 7 commits into from
Jun 13, 2024
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
12 changes: 8 additions & 4 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.9']
python-version: ['3.9', '3.10', '3.11', '3.12']
env:
OS: ${{ matrix.os }}
PYTHON: '3.9'
timeout-minutes: 20
steps:
- uses: actions/checkout@master
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
- name: Install Minimal Dependencies
run: |
pip install -q -e .
- name: Run import tests
run: |
python -c "import agentscope; print(agentscope.__version__)"
- name: Install Full Dependencies
run: |
pip install -q -e .[full]
pip install coverage
Expand Down
2 changes: 2 additions & 0 deletions src/agentscope/service/service_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def _get_type_str(cls: Any) -> Optional[Union[str, list]]:
type_str = "array"
elif cls is None.__class__:
type_str = "null"
elif cls is Any:
type_str = "Any"
else:
type_str = cls.__name__

Expand Down
1 change: 1 addition & 0 deletions tests/service_toolkit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def setUp(self) -> None:
"type": "object",
"properties": {
"query": {
"type": "Any",
"description": "A message to be retrieved.",
},
},
Expand Down