chore: unify all modules with uv#287
Merged
imbajin merged 76 commits intoapache:mainfrom Jul 21, 2025
Merged
Conversation
This workflow will be triggered when a pull request is opened. It will then post a comment "@codecov-ai-reviewer review" to help with automated AI code reviews. It will use the `peter-evans/create-or-update-comment` action to create the comment. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Refactors package management to use a root `pyproject.toml` with uv. This provides a unified way to manage dependencies for all submodules (hugegraph-llm, hugegraph-ml, hugegraph-python-client, vermeer-python-client). Key changes: - Introduced a root `pyproject.toml` defining a uv workspace and optional dependencies (extras) for each submodule (e.g., `.[llm]`, `.[ml]`). - `hugegraph-llm` and `hugegraph-ml` now use the root `pyproject.toml` for uv index configuration. - `vermeer-python-client` transitioned from `setup.py/requirements.txt` to a `pyproject.toml` file, consistent with other submodules. - Updated the root `README.md` with instructions for the new uv-based development setup, including how to install all or specific submodule dependencies. This change aims to improve your developer experience by simplifying environment setup and dependency management. Note: I attempted to directly test dependency resolution using `uv pip compile` but could not complete it due to limitations in the execution environment. The configuration is based on uv best practices and my manual verification of the generated files.
Co-authored-by: codecov-ai[bot] <156709835+codecov-ai[bot]@users.noreply.github.com>
Merge pull request #22 from returnToInnocence/pr20
docs(hg-llm): merge readme & revert test
- Move version constraints to root constraint-dependencies - Simplify optional-dependencies structure - Configure hugegraph-ml and vermeer-python-client as optional local dependencies via [tool.uv.sources] - Remove ml/vermeer from workspace members while keeping them available via --extra - Inline common dependencies directly into each submodule for clarity - Remove complex dependency grouping in favor of direct package references
- Update test_config.py to use centralized UV runner - Update test_ollama_client.py to use centralized UV runner - Update test_nltk_helper.py to use centralized UV runner - Update test_info_extract.py to use centralized UV runner - Improve test infrastructure consistency and maintainability
- Unified Python version requirement to >=3.10 for all subprojects - Simplified dependency declarations by removing version constraints (let root constraint-dependencies manage versions uniformly) - Standardized project.urls format to use lowercase keys consistently - Cleaned up comments and removed duplicate maintainers fields This improves configuration consistency and simplifies dependency management.
5e692f3 to
de37d40
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…hugegraph-ai into feat/centralize-uv-management
Replaced inconsistent 'Bug Tracker' and 'bug tracker' keys with 'bug_tracker' in all pyproject.toml files. Updated dependency groups in the root pyproject.toml to use explicit package names instead of extras, added a changelog URL, and adjusted build targets and comments for clarity and future improvements.
Added TODO notes to Black and Pylint workflows for future replacement with ruff & mypy. Simplified PYTHONPATH export in hugegraph-python-client workflow. Removed virtual environment troubleshooting note from README. Excluded MANIFEST.in from pyproject.toml package includes. Deleted requirements.txt from hugegraph-llm as package management is now handled by uv.
Standardized installation and environment setup instructions across all module README files to use `uv sync` for dependency management and virtual environment creation. Added notes about workspace membership, clarified activation steps, and improved example usage consistency. Enhanced documentation for development, contributing, and related projects.
a88d828 to
c834809
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR unifies dependency management across all modules using uv as the package manager and introduces a workspace-based architecture. The changes standardize the build system to use hatchling, remove version constraints from individual modules (delegating them to root-level constraints), and update documentation and CI workflows to use uv commands.
Key changes include:
- Introduction of root-level
pyproject.tomlwith workspace configuration and centralized dependency constraints - Migration from
setuptoolstohatchlingbuild backend across all modules - Removal of version pins from individual module dependencies, relying on root-level constraints
- Updated CI workflows to use
uv syncanduv runcommands
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | New root-level workspace configuration with centralized dependency constraints |
| vermeer-python-client/pyproject.toml | Migrated to hatchling, removed version constraints, updated build configuration |
| hugegraph-python-client/pyproject.toml | Migrated to hatchling, removed version constraints, simplified dependencies |
| hugegraph-ml/pyproject.toml | Updated dependencies without version constraints, adjusted Python requirement |
| hugegraph-llm/pyproject.toml | Removed version constraints, cleaned up dependencies structure |
| docker/Dockerfile.llm | Updated to use uv instead of manual pip installations |
| docker/Dockerfile.nk | Replaced poetry with uv for dependency management |
| .github/workflows/*.yml | Updated CI to use uv sync and uv run commands |
Comments suppressed due to low confidence (2)
hugegraph-ml/pyproject.toml:39
- The dependency name has changed from 'category_encoders' to 'category-encoders' (with hyphen). This inconsistency could cause import issues. Should be 'category-encoders' to match the original.
"category-encoders",
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
zyxxoo
approved these changes
Jul 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Walkthrough
本次更新主要集中在项目的依赖管理、构建配置、文档和开发流程规范化。核心变更包括引入统一的根级
pyproject.toml和uv工具进行依赖管理,移除各子模块依赖中的版本约束,标准化构建系统为hatchling,并对各 README 文档和 CI 工作流进行了重构和简化。Changes
uv.lock忽略项及相关注释,新增.pre-commit-config.yaml忽略。uv sync和uv run统一环境与命令执行,简化步骤,移除手动虚拟环境激活。.dockerignore文件,定义构建时忽略的文件和目录列表。uv sync --extra ai安装依赖,更新环境变量。uv工具管理环境,统一复制源代码,调整依赖安装流程,保留 Nuitka 编译步骤。Sequence Diagram(s)
sequenceDiagram participant 开发者 participant 代码仓库 participant CI participant uv工具 participant hatchling 开发者->>代码仓库: 提交/拉取代码 CI->>uv工具: uv sync --extra [模块] --extra dev uv工具->>CI: 安装依赖并管理虚拟环境 CI->>uv工具: uv run pytest / uv run python 脚本 uv工具->>CI: 在隔离环境中执行命令 CI->>hatchling: 构建 wheel/sdist hatchling->>CI: 生成构建产物