feat: add task methods, effect, demo and test suite#1
feat: add task methods, effect, demo and test suite#1Fatumayattani wants to merge 2 commits intostoracha:mainfrom
Conversation
|
Great work here @Fatumayattani ! Appreciate the effort. Firstly, It took some effort to look through the PR because of the sheer amount of things it seems to be doing, it would be helpful to make the PRs smaller and broken into meaningful commits next time. Secondly, the library doesn't seem to align with the implementation in the canonical actor library, I can't find the functionalities for Effects tagging, group, I'd recommend we work on the issues as listed and continue questions, discussions and review for each component on there. Thanks for your assistance! |
|
Thanks @0-th .. I appreciate the feedback and the review. This PR was intentionally focused on laying down the core building blocks: task methods, scheduler, and effect primitives. Some of the features you mentioned (like tagging and grouping) are part of the next iteration, not because I wasn’t aware of them, but because I wanted a solid foundation to build on top of. I’m confident the direction is sound, and the missing pieces are very much planned and straightforward to layer in. Your input helps sharpen that path, so thank you for taking the time. |
|
Hi @0-th I’ve completed the TypeScript-to-Python typing translation for Issue #2. Let me know if you'd like deeper integration tests or additional doc coverage. Resolves #2 |
|
Hi @Fatumayattani great effort here. I'd review this in a bit and give my feedback. |
|
hi @Fatumayattani , apologies for just getting back to you on this. in case you're still interested in contributing to the typing and lint issues in the implementation (it'd be easier to do now that the implementation is complete), see the comment I made here on a similar PR |
This PR introduces the core task system and test suite for py-actress, establishing the foundation for building actor-based asynchronous workflows in Python. It includes the full task API, scheduler, effect model, and a working demo.
What’s Included
task_methods.py: Core Task implementation (fork, join, wait, suspend, effects, etc.)scheduler.py: Lightweight cooperative schedulereffect.py: Effect base and helper implementationstypes.py: Fork and Controller typesexamples/demo.py: Working actor messaging exampletest/test_task.py: Test suite covering the main task methods and actor loopTesting
All core task methods and messaging flows are tested using
pytest.To run the tests with verbose output:
This confirms:
fork,send,wait, andeffectsbehave correctlyNext Steps