Skip to content

chore(seed): consolidate requirements into pyproject.toml, bump to Python 3.13 - #1801

Merged
ktursunov merged 1 commit into
constructorfabric:mainfrom
ktursunov:chore/seed-pyproject-python313
Jul 17, 2026
Merged

chore(seed): consolidate requirements into pyproject.toml, bump to Python 3.13#1801
ktursunov merged 1 commit into
constructorfabric:mainfrom
ktursunov:chore/seed-pyproject-python313

Conversation

@ktursunov

@ktursunov ktursunov commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What

Consolidate deploy/seed's Python dependencies into pyproject.toml and standardize the seeder on Python 3.13.

Changes

  • pyproject.toml — add [build-system] (setuptools), [project] metadata with requires-python = ">=3.13", runtime deps in [project.dependencies] (PyMySQL, clickhouse-connect, unpinned dbt-clickhouse with 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 (already py313).
  • Dockerfilepython:3.12-slimpython:3.13-slim; install via pip install . from pyproject.toml instead of pip install -r requirements.txt (single source of truth).
  • README.md — dev setup now pip install -e '.[dev]'; dependency-location note and layout table updated.
  • Removed requirements.txt and requirements-dev.txt. No references remain elsewhere in the repo.

Validation

  • uv build --wheel succeeds: Requires-Python: >=3.13, runtime deps in core metadata, dev deps under extra == "dev", all 4 top-level modules + generators/ packaged correctly — validating the pip install . the Dockerfile now runs.
  • Docker image build not run in this change; the packaging half of pip install . is validated by the wheel build.

Note

The previous Dockerfile comment claimed dbt-clickhouse was validated against 3.12 to match src/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

  • Chores
    • Updated the seeding environment to Python 3.13.
    • Consolidated runtime and development dependency configuration in pyproject.toml.
    • Simplified container and local development setup to install the project directly.
    • Removed legacy requirements files and updated setup documentation accordingly.

…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>
@ktursunov
ktursunov requested a review from a team as a code owner July 17, 2026 07:10
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The seed project now uses pyproject.toml for package metadata and dependencies, installs development extras in editable mode, and builds its container with Python 3.13 using pip install ..

Changes

Seed packaging migration

Layer / File(s) Summary
Package metadata and development setup
deploy/seed/pyproject.toml, deploy/seed/README.md
Defines setuptools metadata, runtime dependencies, development extras, and package discovery; updates local setup and layout documentation to use pyproject.toml.
Container build installation
deploy/seed/Dockerfile
Updates the image to Python 3.13 and installs the packaged seed project from copied source files with pip install ..

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: cyberantonz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: moving seed dependencies into pyproject.toml and updating the seeder to Python 3.13.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 635f834 and e9a076a.

📒 Files selected for processing (5)
  • deploy/seed/Dockerfile
  • deploy/seed/README.md
  • deploy/seed/pyproject.toml
  • deploy/seed/requirements-dev.txt
  • deploy/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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
# 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

@ktursunov
ktursunov enabled auto-merge July 17, 2026 07:19
@ktursunov
ktursunov merged commit c2b75d1 into constructorfabric:main Jul 17, 2026
11 checks passed
@ktursunov
ktursunov deleted the chore/seed-pyproject-python313 branch August 13, 2026 02:01
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