BUG: Local pytest suite fails to collect due to deprecated imports and mock schemas

未关闭
#307 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

  • #308 来自 @shubhumre777 —— 已关闭,未合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, supabase
领域
backend, testing

调研方向

Start with tests/test_weaviate.py and tests/test_supabase.py, then run pytest tests/ to confirm the collection failures. Update the deprecated model import and align the Supabase mock return values with the current backend queries. Done means all test items collect and the suite runs successfully; the issue author says they have already fixed this locally and are ready to submit a pull request.

由索引模型根据 Issue 内容生成。

描述

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

The local pytest suite fails to collect and run tests due to deprecated model imports and outdated mock client schemas in the testing files. Specifically, WeaviateCodeChunk is deprecated, and the mock Supabase client configuration does not match the current backend schema.

🔍 Steps to Reproduce

  1. Clone the repository and set up the local environment.
  2. Open the terminal and navigate to the project root.
  3. Run the command pytest tests/ (or run with $env:PYTHONPATH=".;backend" on Windows).
  4. See the ImportError and collection errors across the test files.

🎯 Expected Behavior

The test suite should collect all items and execute successfully without any import or configuration errors.

🚨 Actual Behavior

13/13 test items fail to collect. The system throws import errors in tests/test_weaviate.py and schema structure errors in tests/test_supabase.py.

📷 Screenshot

N/A (This is a backend test configuration issue).

💡 Suggested Improvements

  • In tests/test_weaviate.py: Replace the deprecated WeaviateCodeChunk import with the active model classes (WeaviateRepository, WeaviatePullRequest, WeaviateUserProfile).
  • In tests/test_supabase.py: Update the mock Supabase client return values (e.g., client.table.return_value...) to properly align with the current backend queries.
    (Note: I have already resolved this locally and am ready to submit a Pull Request to fix it.)
Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
主要语言
Python
星标
103
派生
143
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/Devr.AI 的其他 Issue

查看 AOSSIE-Org/Devr.AI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。