From 1712bafc28db2bc4eb68096eb36fdf93f7ec251e Mon Sep 17 00:00:00 2001 From: OhYee Date: Tue, 13 Jan 2026 11:05:32 +0800 Subject: [PATCH 1/3] ci: add minimal installation test to workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new test step to verify that the package can be installed with minimal dependencies and that basic functionality works after installation. This test creates a temporary environment, installs only the default dependencies, and tests basic import and version printing to catch issues with optional dependency handling. //// 添加最小安装测试到工作流程 在工作流程中添加了一个新测试步骤,以验证包可以在仅安装最小依赖的情况下进行安装, 并在安装后测试基本功能是否正常工作。 此测试创建一个临时环境,仅安装默认依赖项,然后测试基本导入和版本打印, 以捕获可选依赖项处理方面的问题。 Change-Id: I323d7910209b4b2e37e6c867332fe726d593b8c3 Signed-off-by: OhYee --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55b9963..66effd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,22 @@ jobs: run: | make coverage + - name: Run minimal installation test + run: | + # 创建一个临时目录用于测试 + mkdir -p /tmp/minimal_test + cd /tmp/minimal_test + + # 使用 uv 创建一个新环境并只安装项目的默认依赖 + python -m uv venv --seed + source .venv/bin/activate + + # 安装项目但不包含任何可选依赖 + python -m uv pip install "$GITHUB_WORKSPACE/.[]." + + # 测试导入和版本打印 + python -c "import agentrun; print(f'Version: {agentrun.__version__}')" + # 检测文件更改并决定是否构建测试包 - name: Check for changes in agentrun directory id: changes From c5ddb309700887a6ac0ae6cd67f298a00081c73f Mon Sep 17 00:00:00 2001 From: OhYee Date: Tue, 13 Jan 2026 11:15:22 +0800 Subject: [PATCH 2/3] ci: refactor workflow to improve minimal installation test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorder test steps and update uv commands for better dependency handling. The minimal installation test now uses proper uv syntax and the type checking and coverage steps are moved after the installation test. 移除可选依赖测试并重新排序工作流步骤,更新uv命令以改进依赖处理。 最小安装测试现在使用正确的uv语法,类型检查和覆盖率步骤移至 安装测试之后。 Change-Id: Id4b0a0f154b509a3c6cce92dce77c80c3ed5a769 Signed-off-by: OhYee --- .github/workflows/ci.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66effd0..fff203d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,14 +26,6 @@ jobs: run: | make setup PYTHON_VERSION=${{ matrix.python-version }} - - name: Run type check (mypy) - run: | - make mypy-check - - - name: Run tests with coverage - run: | - make coverage - - name: Run minimal installation test run: | # 创建一个临时目录用于测试 @@ -41,14 +33,21 @@ jobs: cd /tmp/minimal_test # 使用 uv 创建一个新环境并只安装项目的默认依赖 - python -m uv venv --seed - source .venv/bin/activate + uv venv -p 3.10 # 安装项目但不包含任何可选依赖 - python -m uv pip install "$GITHUB_WORKSPACE/.[]." + uv pip install "$GITHUB_WORKSPACE/" # 测试导入和版本打印 - python -c "import agentrun; print(f'Version: {agentrun.__version__}')" + uv run python -c "import agentrun; print(f'Version: {agentrun.__version__}')" + + - name: Run type check (mypy) + run: | + make mypy-check + + - name: Run tests with coverage + run: | + make coverage # 检测文件更改并决定是否构建测试包 - name: Check for changes in agentrun directory From 015a4c9618e98f802617cfbbabda838b2b2dacc7 Mon Sep 17 00:00:00 2001 From: OhYee Date: Tue, 13 Jan 2026 11:20:07 +0800 Subject: [PATCH 3/3] build(deps): add bailian SDK to main dependencies and remove from optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move alibabacloud_bailian20231229 from optional knowledgebase group to main dependencies since it's now required for core functionality following the knowledge base feature implementation. 将 alibabacloud_bailian20231229 从可选的知识库组移动到主依赖项, 因为现在核心功能需要它,这是知识库功能实现后的变化。 Change-Id: I2d6e6fc76ccc969a76959a3609e13fe95e8b7621 Signed-off-by: OhYee --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c2eef62..8e028b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ dependencies = [ "pydash>=8.0.5", "alibabacloud-agentrun20250910>=5.0.1", "alibabacloud_tea_openapi>=0.4.2", + "alibabacloud_bailian20231229>=2.6.2", ] [project.optional-dependencies] @@ -53,10 +54,6 @@ mcp = [ "mcp>=1.21.2; python_version >= '3.10'", ] -knowledgebase = [ - "alibabacloud_bailian20231229>=2.6.2" -] - [dependency-groups] dev = [ "coverage>=7.10.7",