Skip to content

feat: implement CookingEngine and physical pipeline#270

Open
parisasachdeva07 wants to merge 1 commit into
sahoo-tech:mainfrom
parisasachdeva07:feat/cooking-engine-146
Open

feat: implement CookingEngine and physical pipeline#270
parisasachdeva07 wants to merge 1 commit into
sahoo-tech:mainfrom
parisasachdeva07:feat/cooking-engine-146

Conversation

@parisasachdeva07

Copy link
Copy Markdown

🔗 Related Issue

Closes #146


📝 Summary of Changes

Implemented the CookingEngine heuristic logic to detect 5 distinct recipe steps (pasta, baking, omelette, etc.) based on objects and OCR text.

Added safety threshold alerts for high temperatures parsing both Fahrenheit and Celsius.

Created core/physical/physical_pipeline.py from scratch to serve as the main routing hub.

Registered the cooking engine inside the new pipeline to trigger when task_type == "cooking".


🔍 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation update
  • 🧪 Test addition or improvement
  • 🧹 Refactor / Code cleanup (no functional change)
  • ⚙️ Build / CI / Chore

🧪 How Was This Tested?

Ran the dedicated unit test suite for the engine, verifying tie-breakers and UnboundLocalError edge cases.
python -m unittest tests.unit.test_cooking_engine

# Example: commands run to test your changes
python -m pytest tests/unit/test_your_module.py -v

Test environment:

  • OS: Windows 11
  • Python version: 3.1.4
  • Node version (if frontend):

📸 Screenshots / Recordings (if applicable)

N/A - Backend pipeline and engine logic


✅ Pre-Submission Checklist

  • My branch is up to date with upstream/main
  • My code follows the project's coding standards (Black, isort, flake8 pass)
  • I have written / updated tests for my changes
  • All existing tests pass (python -m pytest tests/)
  • I have added docstrings and type hints to all new public functions
  • I have updated relevant documentation (README, docs/, inline comments)
  • My PR title follows the Conventional Commits format
  • I have not committed any .env files, secrets, or model weights
  • This PR addresses only the scope of the linked issue

💬 Additional Notes for Reviewer

Note: The PhysicalPipeline class did not exist yet, so I created physical_pipeline.py to handle the routing. Future domain engines (like workout or hardware repair) can now easily be added to this pipeline's process method!

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.

Build a Cooking Domain Guidance Engine

1 participant