chore(seed): consolidate requirements into pyproject.toml, bump to Python 3.13 - #1801
Conversation
…thon 3.13 Move deploy/seed runtime deps into [project.dependencies] and dev tooling into [project.optional-dependencies].dev, and add setuptools build config so the Dockerfile installs the seeder via `pip install .` (single source of truth). Bump the seed image and requires-python to 3.13 to match the existing ruff target-version / mypy python_version. Drop requirements.txt / requirements-dev.txt and update the README dev-setup and layout table. Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
📝 WalkthroughWalkthroughThe seed project now uses ChangesSeed packaging migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deploy/seed/pyproject.toml`:
- Line 5: Add the required cf-studio-path configuration to the TOML project
settings in pyproject.toml, setting its value to .cf-studio as specified by the
coding guidelines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 93812089-de5c-47ee-9eb6-0b6135569b25
📒 Files selected for processing (5)
deploy/seed/Dockerfiledeploy/seed/README.mddeploy/seed/pyproject.tomldeploy/seed/requirements-dev.txtdeploy/seed/requirements.txt
💤 Files with no reviewable changes (2)
- deploy/seed/requirements.txt
- deploy/seed/requirements-dev.txt
| # sample-data seeder. Lives next to the code so `ruff check .` and `mypy .` | ||
| # work from the dir, and `pip install .` builds the flat module + generators | ||
| # package straight from here. | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add cf-studio-path configuration.
As per coding guidelines, TOML configuration files must set cf-studio-path to .cf-studio.
🛠️ Proposed fix
# package straight from here.
+cf-studio-path = ".cf-studio"
+
[build-system]
requires = ["setuptools>=61"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # package straight from here. | |
| cf-studio-path = ".cf-studio" | |
| [build-system] | |
| requires = ["setuptools>=61"] |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@deploy/seed/pyproject.toml` at line 5, Add the required cf-studio-path
configuration to the TOML project settings in pyproject.toml, setting its value
to .cf-studio as specified by the coding guidelines.
Source: Coding guidelines
What
Consolidate
deploy/seed's Python dependencies intopyproject.tomland standardize the seeder on Python 3.13.Changes
pyproject.toml— add[build-system](setuptools),[project]metadata withrequires-python = ">=3.13", runtime deps in[project.dependencies](PyMySQL,clickhouse-connect, unpinneddbt-clickhousewith its rationale preserved), dev tooling in[project.optional-dependencies].dev(mypy,ruff,types-PyMySQL), and[tool.setuptools]flat-layout packaging (top-level modules +generators/). Existing ruff/mypy config unchanged (alreadypy313).Dockerfile—python:3.12-slim→python:3.13-slim; install viapip install .frompyproject.tomlinstead ofpip install -r requirements.txt(single source of truth).README.md— dev setup nowpip install -e '.[dev]'; dependency-location note and layout table updated.requirements.txtandrequirements-dev.txt. No references remain elsewhere in the repo.Validation
uv build --wheelsucceeds:Requires-Python: >=3.13, runtime deps in core metadata, dev deps underextra == "dev", all 4 top-level modules +generators/packaged correctly — validating thepip install .the Dockerfile now runs.pip install .is validated by the wheel build.Note
The previous Dockerfile comment claimed
dbt-clickhousewas validated against 3.12 to matchsrc/ingestion/tools/toolbox/Dockerfile. This image now moves to 3.13; if toolbox parity matters, that's a follow-up to confirm.Summary by CodeRabbit
pyproject.toml.