Skip to content

Feat/main/ws sqlalchemy#387

Open
qevolg wants to merge 8 commits intomainfrom
feat/main/ws-sqlalchemy
Open

Feat/main/ws sqlalchemy#387
qevolg wants to merge 8 commits intomainfrom
feat/main/ws-sqlalchemy

Conversation

@qevolg
Copy link
Copy Markdown
Contributor

@qevolg qevolg commented Mar 27, 2026

Description

Issue(s)

  • Close/close/Fix/fix/Resolve/resolve: Issue Link

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

qevolg added 2 commits March 27, 2026 14:22
- Removed TaosWsDialect from taos/sqlalchemy.py and moved it to taos-ws-py/taosws/sqlalchemy.py for better separation of concerns.
- Updated taos-ws-py/Cargo.toml to change the library name to _taosws for internal consistency.
- Adjusted import paths in examples and tests to reflect the new module structure.
- Added comprehensive tests for the taosws SQLAlchemy dialect to ensure compatibility and functionality.
- Updated AGENTS.md to clarify project structure and development setup for taos-ws-py.
- Removed deprecated taosws tests from the main test suite and integrated them into the new taos-ws-py test structure.
Copilot AI review requested due to automatic review settings March 27, 2026 08:59
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the WebSocket connector into a standalone package, taos-ws-py, which involves moving the TaosWsDialect and its associated tests. The reviewer identified significant code duplication between the new taosws/sqlalchemy.py and the existing taos/sqlalchemy.py, suggesting the extraction of shared logic into a common module. Additional feedback includes updating the newly added AGENTS.md to reflect the current architecture, adding documentation for complex path manipulation in __init__.py, and replacing custom test helper functions with standard Python assert statements to improve readability.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.00%. Comparing base (2fe2bb8) to head (04edc29).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #387   +/-   ##
=======================================
  Coverage   82.00%   82.00%           
=======================================
  Files          24       24           
  Lines        3717     3717           
=======================================
  Hits         3048     3048           
  Misses        669      669           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

此 PR 旨在将 taosws:// 的 SQLAlchemy 方言与测试从主 taospy 包中剥离,迁移到独立的 taos-ws-pytaosws)包内,并配套调整 WebSocket 连接器的 Python/Rust 模块封装与入口点注册方式。

Changes:

  • TaosWsDialecttaos/sqlalchemy.py 移除,并在 taos-ws-py/taosws/sqlalchemy.py 新增实现,同时把 SQLAlchemy entry-point 注册迁移到 taos-ws-py/pyproject.toml
  • 将 taosws 的 SQLAlchemy 测试从 tests/test_sqlalchemy.py 移至 taos-ws-py/tests/,并新增迁移校验用例
  • 将 Rust 原生扩展模块更名为 _taosws,新增 taosws/__init__.py 作为 Python 包封装层,并更新 schemaless 相关导入路径

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/test_sqlalchemy.py 移除 taosws SQLAlchemy 测试入口,保留 taos/taosrest 覆盖
taos/sqlalchemy.py 删除 TaosWsDialect(WebSocket 方言)实现
pyproject.toml 移除根工程对 taosws 的 SQLAlchemy 插件注册
taos-ws-py/pyproject.toml 新增 taos-ws-py 的打包配置与 taosws SQLAlchemy entry-point
taos-ws-py/taosws/sqlalchemy.py 新增 TaosWsDialect(WebSocket 方言)实现
taos-ws-py/tests/test_sqlalchemy.py 新增/迁移 taosws SQLAlchemy 集成测试
taos-ws-py/tests/test_sqlalchemy_migration.py 新增方言迁移与依赖隔离校验测试
taos-ws-py/src/lib.rs 将 PyO3 模块名改为 _taosws 并同步异常注册命名空间
taos-ws-py/Cargo.toml Rust crate 名称改为 _taosws
taos-ws-py/taosws/init.py 新增 Python 包封装层,尝试加载 _taosws 并导出符号
taos-ws-py/tests/test_schemaless.py 更新 schemaless 导入为 from taosws import ...
taos-ws-py/examples/schemaless_example.py 同步更新示例导入路径
AGENTS.md 新增开发者指南(但当前内容与本 PR 变更存在不一致)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 27, 2026 09:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 27, 2026 10:07
@qevolg qevolg force-pushed the feat/main/ws-sqlalchemy branch from 6b62834 to e4646e3 Compare March 27, 2026 10:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

qevolg added 2 commits March 27, 2026 21:46
- Adjusted requests and black dependencies to support specific Python versions.
- Updated pandas and sqlalchemy dependencies to ensure compatibility.
- Removed unnecessary newline in test_taospy.sh for cleaner script execution.
Copilot AI review requested due to automatic review settings March 27, 2026 14:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants