Skip to content

Conversation

@PsiACE
Copy link
Member

@PsiACE PsiACE commented Jan 7, 2026

Summary

Migrate the project from Poetry to uv, align CI workflows with uv, and simplify local developer commands via a minimal Makefile.

Solution Description

Replace Poetry metadata with PEP 621 and pdm-backend, introduce uv.lock, add a uv setup composite action for CI, update workflows to use uv, and provide a minimal uv-based Makefile plus packaging exclusions/gitignore updates.

Summary by CodeRabbit

  • Chores

    • Switched project tooling from Poetry to a workspace-oriented PDMan/PDM flow, updated packaging metadata and CI to use a unified environment setup and UV-based commands.
    • Modernized Make targets for install, test, docs, demo, build, and clean; updated ignored build/artifact paths.
  • Documentation

    • Added workspace workflow guidance and expanded demo READMEs with setup, run, and environment tips.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Adds a reusable GitHub Action to set up Python and uv, migrates project metadata from Poetry to PDM/PEP621, replaces Poetry-based CI/workflow steps with uv-based commands, updates Makefile and demos to use uv workspaces, and expands .gitignore and demo docs.

Changes

Cohort / File(s) Summary
Reusable GitHub Action
.github/actions/setup-python-env/action.yml
New composite action: installs Python (actions/setup-python@v5), installs uv (astral-sh/setup-uv@v5) with caching, and runs uv sync --all-groups --frozen. Inputs: python-version, uv-version.
CI/CD Workflows
.github/workflows/ci.yml, .github/workflows/docs.yml, .github/workflows/python-publish.yml
Replace actions/setup-python + Poetry steps with the local composite action; remove Poetry install/dependency steps; switch commands from poetry run ... / poetry build to uv run ... / uv build (workflows updated accordingly).
Project metadata & build system
pyproject.toml
Convert from Poetry to PEP621/[project] layout and PDM build config: move dependencies to project.dependencies, add dependency-groups, add tool.pdm.build, switch build-backend to pdm-backend, add tool.uv.workspace.
Makefile & automation targets
Makefile
Replace Sphinx-centric rules with UV-centric phony targets (install, demo, test, test-integration-embedded, docs, build, clean, help); introduce UV variable and set default goal to help.
Local demo workspace
demo/rag/pyproject.toml, demo/rag/README.md, demo/rag/README_CN.md
Relax pyseekdb version constraint, enable pyseekdb as workspace source, add workspace usage docs and uv sync/run instructions and tips.
Repository ignores
.gitignore
Add dist/, docs/_build/, and tests/seekdb.db/ entries and normalize ordering.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as GitHub Actions Runner
  participant SetupAction as ./.github/actions/setup-python-env
  participant SetupPy as actions/setup-python@v5
  participant SetupUV as astral-sh/setup-uv@v5
  participant UV as uv CLI
  Runner->>SetupAction: invoke composite action (inputs: python-version, uv-version)
  SetupAction->>SetupPy: install Python (python-version)
  SetupAction->>SetupUV: install uv (uv-version), enable cache, pass cache-suffix
  SetupAction->>UV: run `uv sync --all-groups --frozen`
  Note right of Runner: subsequent job steps use installed Python and synced deps (e.g., `uv run pytest`)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐇 I nibbled at Poetry, found PDM bright,
stitched a setup action through the night,
uv synced the carrots, tests ran with cheer,
CI hops along — the path is clear,
a little rabbit's build, snug and light.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: migrating from Poetry to uv and simplifying the build workflow, which aligns with the substantive changes across CI workflows, Makefile, and pyproject.toml configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03c46ce and 9df1009.

📒 Files selected for processing (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (1)
  • .gitignore
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: integration-test (oceanbase)
  • GitHub Check: integration-test (server)
  • GitHub Check: integration-test (embedded)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PsiACE
Copy link
Member Author

PsiACE commented Jan 7, 2026

  • Keep the lockfile: it pins the exact dev/test environment so CI and local runs behave the same, reducing flaky “works here, fails there” issues. It’s still valuable for libraries even if end users don’t consume it.
  • Use uv: it’s currently the best tool—fast, simple, and low friction—while staying compatible with standard pyproject.toml workflows. And our example also uses uv

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/actions/setup-python-env/action.yml:
- Around line 4-12: The inputs block defines python-version and uv-version with
both default values and required: true, which is contradictory; update the
inputs (python-version and uv-version) to remove or set required to false so
they rely on their defaults (i.e., delete the required: true lines or change
them to required: false) so the action uses the default values when inputs are
not provided.

In @pyproject.toml:
- Around line 1-11: The version field in pyproject.toml uses a non-PEP 440
format ("1.0.0.b4"); update the version value in the version key to a PEP
440-compliant pre-release string (e.g., change the version value to "1.0.0b4")
so packaging and version comparisons behave correctly.
🧹 Nitpick comments (2)
Makefile (2)

3-6: Consider using --frozen for reproducible installs.

The CI action uses uv sync --all-groups --frozen to ensure reproducible installs from uv.lock, but this target omits --frozen. This could lead to different behavior between local development and CI.

If the intent is to allow lock file updates locally, this is fine as-is. Otherwise, consider aligning with CI:

🔎 Proposed fix
 .PHONY: install
 install: ## Install the virtual environment
 	@echo ">> Installing dependencies"
-	@$(UV) sync --all-groups
+	@$(UV) sync --all-groups --frozen

28-31: Consider using rm -rf for simpler cleanup.

Using uv run python -c for cleanup is unusual and adds overhead. A direct shell command would be more idiomatic for a Makefile:

🔎 Proposed alternative
 .PHONY: clean
 clean: ## Clean build and docs artifacts
 	@echo ">> Removing build artifacts"
-	@$(UV) run python -c "import shutil; shutil.rmtree('dist', ignore_errors=True); shutil.rmtree('docs/_build', ignore_errors=True); shutil.rmtree('tests/seekdb.db', ignore_errors=True)"
+	@rm -rf dist docs/_build tests/seekdb.db

This avoids requiring a Python environment just to delete directories.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a35809 and 8062608.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .github/actions/setup-python-env/action.yml
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • .github/workflows/python-publish.yml
  • .gitignore
  • Makefile
  • pyproject.toml
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile

[warning] 33-33: Missing required phony target "all"

(minphony)

🔇 Additional comments (13)
.gitignore (2)

6-8: New build and documentation artifacts properly ignored.

The additions of dist/, docs/_build/, and tests/seekdb.db/ are all appropriate for the new pdm-backend/uv build system and test infrastructure. They're correctly placed in the # project section.


18-18: Entry is correctly positioned.

The demo/rag/data/ entry (reordered within the demo section) remains valid.

Makefile (3)

8-16: LGTM!

The test targets are well-structured with clear echo messages and appropriate pytest flags. The -k embedded filter for integration tests correctly matches the CI workflow behavior.


18-21: LGTM!

The docs target correctly mirrors the sphinx-build command used in the CI workflow.


33-37: LGTM!

The help target with awk-based extraction and .DEFAULT_GOAL := help is a clean pattern for self-documenting Makefiles.

Regarding the static analysis warning about missing "all" target: this is a stylistic preference, not a requirement. The explicit targets with help as default is appropriate for this project's use case.

pyproject.toml (3)

12-21: LGTM!

The dependency declarations are well-structured. The platform-specific marker for pylibseekdb is correctly formatted, and using uv.lock for reproducibility makes unpinned versions acceptable here.


28-35: LGTM!

The [dependency-groups] section is the correct PEP 735 format for development dependencies, which uv supports natively.


37-46: LGTM!

The pdm-backend configuration with source-includes and excludes is correctly set up for packaging.

.github/workflows/python-publish.yml (1)

26-33: LGTM!

The workflow correctly uses the new composite action and uv build for package building. The trusted publishing flow with PyPI remains intact.

.github/workflows/ci.yml (2)

23-30: LGTM!

The unit test job correctly uses the composite action and uv run pytest with appropriate flags.


53-86: LGTM!

The integration test job correctly uses the composite action. The test matrix with embedded/server/oceanbase modes and the pytest -k filter work well together.

.github/workflows/docs.yml (1)

37-44: LGTM!

The docs workflow correctly uses the composite action and the sphinx-build command matches the Makefile's docs target.

.github/actions/setup-python-env/action.yml (1)

14-30: LGTM!

The composite action is well-structured:

  • Python setup followed by uv installation is the correct order
  • Cache enablement with Python version suffix ensures proper cache isolation
  • --frozen flag ensures reproducible installs from uv.lock

PsiACE and others added 2 commits January 8, 2026 08:08
Signed-off-by: Chojan Shang <psiace@apache.org>
Remove seekdb.db from the ignored files list
Copy link
Member

@hnwyllmm hnwyllmm left a comment

Choose a reason for hiding this comment

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

LGTM

@hnwyllmm hnwyllmm merged commit f790c01 into oceanbase:develop Jan 9, 2026
6 checks passed
@PsiACE PsiACE deleted the uv branch January 9, 2026 10:23
@coderabbitai coderabbitai bot mentioned this pull request Jan 13, 2026
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.

2 participants