feat(python): Add examples (deduplicate, delay) and tests (Issue #42)#47
Merged
0-jake-0 merged 4 commits intoDec 11, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #42 by adding Python examples demonstrating stream operators and a comprehensive test suite for the Python bindings. It also introduces a new window stream operator in the Rust core.
Key Changes:
- New Python examples for
distinct()anddelay()operators with practical demonstrations - Test suite covering
map,filter,distinct,limit, andcollectoperators - New
WindowStreamimplementation for time-based buffering in Rust - Python bindings for
GraphState,collect(), andprint()stream operators
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| wingfoil/src/nodes/window.rs | Implements time-based windowing stream operator with automatic flushing |
| wingfoil/src/nodes/mod.rs | Integrates WindowStream module and adds window() method to StreamOperators trait |
| wingfoil-python/src/py_stream.rs | Adds Python bindings for print() and collect() stream operators |
| wingfoil-python/src/py_graph_state.rs | Exposes GraphState to Python with time tracking functionality |
| wingfoil-python/src/lib.rs | Registers PyGraphState class in the Python module |
| wingfoil-python/examples/delay_line.py | Demonstrates delay() operator for temporal shifting of streams |
| wingfoil-python/examples/deduplicate.py | Demonstrates distinct() operator for filtering consecutive duplicates |
| wingfoil-python/tests/test_streams.py | Unit tests validating map, filter, distinct, limit, and collect operators |
Comments suppressed due to low confidence (3)
wingfoil-python/examples/deduplicate.py:9
- Import of 'wingfoil' is not used.
import wingfoil
wingfoil-python/examples/delay_line.py:9
- Import of 'wingfoil' is not used.
import wingfoil
wingfoil-python/tests/test_streams.py:2
- Import of 'wingfoil' is not used.
import wingfoil
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
This is great but can i have just the new python examples by themselves without any other changes please. |
Contributor
Author
|
Yes I'll update it in few hours and let you know. |
65e34be to
6e3a17c
Compare
Contributor
|
Looks good. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses Issue #42 by adding new Python examples and a comprehensive test suite.
New Examples:
New Tests:
This enhances the documentation and provides a verification baseline for Python binding development.