diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index da7b66197..c654bbe5b 100755 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -194,7 +194,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ @@ -205,7 +204,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ @@ -216,7 +214,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ @@ -227,7 +224,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ @@ -238,7 +234,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 593aea546..dcab67e19 100755 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -75,7 +75,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ @@ -394,7 +393,6 @@ jobs: run: | set -eu docker run --rm \ - --pull=never \ -v "$PWD:/workspace" \ -w /workspace/apps/web \ docker.m.daocloud.io/library/node:20 \ diff --git a/apps/api/app/api/routes/duplication.py b/apps/api/app/api/routes/duplication.py index e98c26db8..427d369fa 100644 --- a/apps/api/app/api/routes/duplication.py +++ b/apps/api/app/api/routes/duplication.py @@ -239,7 +239,7 @@ def get_duplication_detail( return _to_detail_response(record) -@router.delete("/records/{record_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/records/{record_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_duplication_record( record_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/apps/api/app/api/routes/edit_plans.py b/apps/api/app/api/routes/edit_plans.py index 315446450..144a48421 100644 --- a/apps/api/app/api/routes/edit_plans.py +++ b/apps/api/app/api/routes/edit_plans.py @@ -279,7 +279,7 @@ def update_plan( return _to_response(result) -@router.delete("/{plan_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{plan_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_plan( plan_id: str, db: Session = Depends(get_db_session), diff --git a/apps/api/app/api/routes/edit_templates.py b/apps/api/app/api/routes/edit_templates.py index 5e91e1aad..2faf3c6be 100644 --- a/apps/api/app/api/routes/edit_templates.py +++ b/apps/api/app/api/routes/edit_templates.py @@ -241,7 +241,7 @@ def update_template( return _to_response(result) -@router.delete("/{template_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{template_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_template( template_id: str, db: Session = Depends(get_db_session), diff --git a/apps/api/app/api/routes/recipes.py b/apps/api/app/api/routes/recipes.py index b79bfa1bf..fa48c3494 100644 --- a/apps/api/app/api/routes/recipes.py +++ b/apps/api/app/api/routes/recipes.py @@ -172,7 +172,7 @@ def update_recipe( return _to_response(recipe) -@router.delete("/{recipe_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{recipe_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_recipe( recipe_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/apps/api/app/api/routes/templates.py b/apps/api/app/api/routes/templates.py index c6d498053..58a85c023 100644 --- a/apps/api/app/api/routes/templates.py +++ b/apps/api/app/api/routes/templates.py @@ -193,7 +193,7 @@ def update_template( return _to_response(template) -@router.delete("/{template_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{template_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_template( template_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), @@ -271,7 +271,7 @@ def create_category( ) -@router.delete("/categories/{category_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/categories/{category_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_category( category_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/apps/api/app/api/routes/titles.py b/apps/api/app/api/routes/titles.py index 1aed51d5c..f1b8980cf 100644 --- a/apps/api/app/api/routes/titles.py +++ b/apps/api/app/api/routes/titles.py @@ -143,7 +143,7 @@ def update_title( return _to_response(item) -@router.delete("/{title_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{title_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_title( title_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/apps/api/app/api/routes/tts.py b/apps/api/app/api/routes/tts.py index 87bfff7f9..82bd42927 100644 --- a/apps/api/app/api/routes/tts.py +++ b/apps/api/app/api/routes/tts.py @@ -174,7 +174,7 @@ def get_tts_job_status( ) -@router.delete("/jobs/{job_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/jobs/{job_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_tts_job( job_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/apps/api/app/api/routes/voice_clones.py b/apps/api/app/api/routes/voice_clones.py index 011faaf5f..a03a7cc18 100644 --- a/apps/api/app/api/routes/voice_clones.py +++ b/apps/api/app/api/routes/voice_clones.py @@ -170,7 +170,7 @@ def get_voice_clone_status( @router.delete( "/{clone_id}", - status_code=status.HTTP_204_NO_CONTENT, + status_code=status.HTTP_204_NO_CONTENT, response_model=None, ) def delete_voice_clone( clone_id: str, diff --git a/apps/api/app/api/routes/voices.py b/apps/api/app/api/routes/voices.py index 73d41090f..6e90aeda2 100644 --- a/apps/api/app/api/routes/voices.py +++ b/apps/api/app/api/routes/voices.py @@ -316,7 +316,7 @@ def update_voice( return _to_response(item) -@router.delete("/{voice_id}", status_code=status.HTTP_204_NO_CONTENT) +@router.delete("/{voice_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None) def delete_voice( voice_id: str, authenticated_user: AuthenticatedUser = Depends(get_current_user), diff --git a/tests/unit/test_dedup_engine.py b/tests/unit/test_dedup_engine.py index f1d4433af..2a92f7540 100644 --- a/tests/unit/test_dedup_engine.py +++ b/tests/unit/test_dedup_engine.py @@ -164,8 +164,11 @@ class TestComputePhash: assert hash1 == hash2 def test_different_images_different_hash(self): - img1 = np.zeros((64, 64, 3), dtype=np.uint8) - img2 = np.full((64, 64, 3), 255, dtype=np.uint8) + # 用两张不同的随机噪声图测试(纯色图 pHash 会相同,因为排除了 DC 分量) + rng = np.random.RandomState(42) + img1 = rng.randint(0, 256, (64, 64, 3), dtype=np.uint8) + rng2 = np.random.RandomState(99) + img2 = rng2.randint(0, 256, (64, 64, 3), dtype=np.uint8) hash1 = compute_phash(img1) hash2 = compute_phash(img2) assert hash1 != hash2