From c2eba26b0761faa48cfe7b5b42090c49131d7211 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 10 Aug 2026 16:02:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20=E6=B5=8B=E8=AF=95=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E8=A1=A5=E5=85=85=20scipy/Pillow=20=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=20asset=5Fquality=5Fscoring=20?= =?UTF-8?q?=E5=8D=95=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: score_clarity() 依赖 scipy.signal.convolve2d, score_stability() 依赖 PIL.Image 这两个库在 requirements-worker.txt 中但不在 requirements-dev.txt 中 CI 测试只安装 base+main+dev requirements, 缺少这两个库时评分函数静默返回默认值 10.0 导致 3 个测试断言失败: assert 10.0 < 10.0 / assert 10.0 > 10.0 修复: 在 requirements-dev.txt 中添加 scipy==1.13.1 和 Pillow==10.4.0 版本与 requirements-worker.txt 保持一致 --- requirements-dev.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 06de6ea0a..1f7dbf57b 100755 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,3 +13,7 @@ pytest-cov==6.0.0 pytest-timeout==2.3.1 pytest-xdist==3.6.1 diff-cover==8.0.3 + +# 资产质量评分依赖(与 requirements-worker.txt 保持一致) +scipy==1.13.1 +Pillow==10.4.0 -- 2.54.0