Skip to content

chore: update development scripts for todo-worker and todo-worker-python#28

Merged
andersonleal merged 1 commit intomainfrom
feat/watch-changes
Apr 14, 2026
Merged

chore: update development scripts for todo-worker and todo-worker-python#28
andersonleal merged 1 commit intomainfrom
feat/watch-changes

Conversation

@andersonleal
Copy link
Copy Markdown
Collaborator

@andersonleal andersonleal commented Apr 14, 2026

Summary

Improves the local development experience for the sample todo-worker (Node) and todo-worker-python examples by reloading the process when source files change.

  • todo-worker: dev script now uses tsx watch instead of a one-shot node --import tsx run.
  • todo-worker-python: adds the watchfiles dependency and runs the worker under watchfiles 'python -m src.main' in iii.worker.yaml so edits trigger a restart.

Type of change

  • Bug fix
  • New feature (developer experience)
  • Breaking change
  • Documentation update

Checklist

  • Changes are limited to example worker dev workflows
  • Python sample declares the new runtime dependency in pyproject.toml

Additional context

The workers repository uses main as the default branch (there is no develop branch here), so this PR targets main.

Uncommitted local edits (for example under image-resize/ or todo-worker/package-lock.json) were not included; the PR reflects commit 21b8a38 only.

Summary by CodeRabbit

  • Chores
    • Implemented auto-reload functionality for local development environments. The Python worker and TypeScript worker now monitor file changes and automatically restart during development, improving the development workflow.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 48b40fc6-f543-4b95-b836-bdc8d83bba6a

📥 Commits

Reviewing files that changed from the base of the PR and between 88a0b16 and 21b8a38.

📒 Files selected for processing (3)
  • todo-worker-python/iii.worker.yaml
  • todo-worker-python/pyproject.toml
  • todo-worker/package.json

📝 Walkthrough

Walkthrough

The pull request adds file-watching capabilities to both Python and TypeScript worker development workflows. The Python worker now runs under watchfiles, and the TypeScript worker's dev script switches to tsx watch mode. A new watchfiles dependency is added to the Python project.

Changes

Cohort / File(s) Summary
Python Worker Configuration
todo-worker-python/iii.worker.yaml, todo-worker-python/pyproject.toml
Added watchfiles to dependencies and updated the worker start command to wrap python -m src.main with the watchfiles file-watching utility.
TypeScript Worker Configuration
todo-worker/package.json
Updated the dev script to use tsx watch src/index.ts instead of node --import tsx src/index.ts, enabling automatic reloading on file changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit's wish, now code takes flight,
With watchfiles gleaming in the night,
No manual restart, no tedious wait,
Just save and run—oh, what a fate!
Both Python, TypeScript dance with glee,
Auto-reload sets us free!

🚥 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 and specifically describes the main change: updating development scripts for both todo-worker and todo-worker-python to enable file-watching for automatic reloads.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/watch-changes

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.

@andersonleal andersonleal merged commit f8f2eab into main Apr 14, 2026
5 checks passed
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