Skip to content

Commit 296cd0e

Browse files
Initial commit
0 parents  commit 296cd0e

265 files changed

Lines changed: 39013 additions & 0 deletions

File tree

Some content is hidden

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

.DS_Store

6 KB
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[Bug]:'
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**<u>AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.</u>**
11+
12+
**Describe the bug**
13+
A clear and concise description of what the bug is.
14+
15+
**To Reproduce**
16+
Steps to reproduce the behavior:
17+
18+
1. You code
19+
2. How to execute
20+
3. See error
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Error messages**
26+
Detailed error messages.
27+
28+
**Environment (please complete the following information):**
29+
30+
- AgentScope Version: [e.g. 1.0.0 via `print(agentscope.__version__)`]
31+
- Python Version: [e.g. 3.10]
32+
- OS: [e.g. macos, windows]
33+
34+
**Additional context**
35+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**<u>AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.</u>**
11+
12+
13+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[Feature]: '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**<u>AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.</u>**
11+
12+
13+
**Is your feature request related to a problem? Please describe.**
14+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
15+
16+
**Describe the solution you'd like**
17+
A clear and concise description of what you want to happen.
18+
19+
**Describe alternatives you've considered**
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Pull Request
3+
about: Create a pull request
4+
---
5+
## Description
6+
7+
[Please describe the background, purpose, changes made, and how to test this PR]
8+
9+
10+
11+
## Checklist
12+
13+
Please check the following items before code is ready to be reviewed.
14+
15+
- [ ] Code has passed all tests
16+
- [ ] Docstrings have been added/updated in Google Style
17+
- [ ] Documentation has been updated
18+
- [ ] Code is ready for review

.github/workflows/pre-commit.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Pre-commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: True
10+
matrix:
11+
os: [ubuntu-latest]
12+
env:
13+
OS: ${{ matrix.os }}
14+
PYTHON: '3.10'
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Setup Python
18+
uses: actions/setup-python@master
19+
with:
20+
python-version: 3.10
21+
- name: Update setuptools
22+
run: |
23+
pip install setuptools==68.2.2 wheel==0.41.2
24+
- name: Install AgentScope
25+
run: |
26+
pip install -q -e .[full]
27+
- name: Install pre-commit
28+
run: |
29+
pre-commit install
30+
- name: Pre-commit starts
31+
run: |
32+
pre-commit run --all-files > pre-commit.log 2>&1 || true
33+
cat pre-commit.log
34+
if grep -q Failed pre-commit.log; then
35+
echo -e "\e[41m [**FAIL**] Please install pre-commit and format your code first. \e[0m"
36+
exit 1
37+
fi
38+
echo -e "\e[46m ********************************Passed******************************** \e[0m"

.github/workflows/publish-pypi.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Publish PyPi Package
10+
11+
on:
12+
workflow_dispatch:
13+
release:
14+
types: [published]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
deploy:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.10
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install setuptools wheel build
34+
- name: Build package
35+
run: python -m build
36+
- name: Test installation
37+
run: |
38+
pip install dist/*.whl
39+
python -c "import your_package; print(your_package.__version__)"
40+
- name: Publish package
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
user: __token__
44+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/sphinx_docs.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Deploy Sphinx documentation to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_en:
10+
timeout-minutes: 20
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
python-version: ['3.10']
16+
env:
17+
OS: ${{ matrix.os }}
18+
PYTHON: '3.10'
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.10'
25+
- name: Update setuptools
26+
run: |
27+
pip install setuptools==78.1.1 wheel==0.45.1
28+
- name: Install Dependencies
29+
run: |
30+
pip install -q -e .[full]
31+
- name: Add execute permission to build.sh
32+
run: |
33+
chmod +x docs/tutorial/en/build.sh
34+
- name: Build English Documentation
35+
env:
36+
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
37+
run: |
38+
cd docs/tutorial/en/
39+
./build.sh
40+
- name: Deploy English Documentation
41+
uses: peaceiris/actions-gh-pages@v4
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: docs/tutorial/en/build/html
45+
cname: doc.agentscope.io
46+
47+
build_zh:
48+
needs: build_en
49+
timeout-minutes: 20
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [ ubuntu-latest ]
54+
python-version: [ '3.10' ]
55+
env:
56+
OS: ${{ matrix.os }}
57+
PYTHON: '3.10'
58+
steps:
59+
- uses: actions/checkout@v3
60+
- name: Setup Python
61+
uses: actions/setup-python@v4
62+
with:
63+
python-version: '3.10'
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v3
66+
with:
67+
node-version: '16'
68+
- name: Verify npm installation
69+
run: npm --version
70+
- name: Update setuptools
71+
run: |
72+
pip install setuptools==78.1.1 wheel==0.45.1
73+
- name: Install Dependencies
74+
run: |
75+
pip install -q -e .[full]
76+
- name: Add execute permission to build.sh
77+
run: |
78+
chmod +x docs/tutorial/zh_CN/build.sh
79+
- name: Build Chinese Documentation
80+
env:
81+
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
82+
run: |
83+
cd docs/tutorial/zh_CN/
84+
./build.sh
85+
- name: Deploy Chinese Documentation
86+
uses: peaceiris/actions-gh-pages@v4
87+
with:
88+
github_token: ${{ secrets.GITHUB_TOKEN }}
89+
publish_dir: docs/tutorial/zh_CN/build/html
90+
destination_dir: zh_CN
91+
cname: doc.agentscope.io

.github/workflows/unittest.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Python Unittest Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
if: false == contains(github.event.pull_request.title, 'WIP')
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-13]
12+
python-version: ['3.10', '3.11', '3.12']
13+
env:
14+
OS: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Setup Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@master
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Update setuptools
22+
run: |
23+
pip install setuptools==78.1.1 wheel==0.45.1
24+
# - name: Install Minimal Dependencies
25+
# run: |
26+
# pip install -q -e .
27+
# - name: Run minimal import tests
28+
# run: |
29+
# python tests/minimal.py
30+
- name: Install Full Dependencies
31+
run: |
32+
pip install -q -e .[full]
33+
pip install coverage pytest
34+
- name: Run tests with coverage
35+
run: |
36+
coverage run -m pytest tests
37+
- name: Generate coverage report
38+
run: |
39+
coverage report -m

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__pycache__/
2+
*egg-info/

0 commit comments

Comments
 (0)