Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan operator #30

Merged
merged 5 commits into from
Jul 14, 2022
Merged

Conversation

francipvb
Copy link
Contributor

Hello,

Here is the scan operator implementation.

I've included the sync and async variants.

The reduce depends on the code on this PR.

Some tests are missing too.

Please review this and post your thoughts.

@francipvb francipvb changed the title Scan and reduce operators Scan operator Jun 20, 2022
@francipvb
Copy link
Contributor Author

Forgot to reference the issue #29.

@dbrattli
Copy link
Owner

PS: looks good. I'm making another PR to update black and pyright that should fix build issues.

@francipvb
Copy link
Contributor Author

I suggest you to use pre-commit-ci and dependabot for these.

@dbrattli
Copy link
Owner

Thanks for the suggestion. Looks like both expression and pyright has fallen a bit behind. Please give me a few days to fix since I'm traveling this week.

@dbrattli
Copy link
Owner

Please try to merge master and build again. Note that you may also want to use curry_flipped from Expression to avoid the nested function. See example other places in the code. I will probably rewrite all other operators to use curry_flipped going forwards.

@francipvb
Copy link
Contributor Author

Hello @dbrattli

Sorry, I had too much work and didn't see your comment.

Here is the merge commit.

aioreactive/transform.py Outdated Show resolved Hide resolved
aioreactive/transform.py Outdated Show resolved Hide resolved
aioreactive/transform.py Outdated Show resolved Hide resolved
aioreactive/transform.py Outdated Show resolved Hide resolved
francipvb and others added 2 commits July 12, 2022 04:44
Thanks for the suggestions @dbrattli, it is a cleaner solution.

Co-authored-by: Dag Brattli <[email protected]>
@francipvb
Copy link
Contributor Author

Hello @dbrattli,

The pre-commit pyright hook fails under python 3.10.

Cheers,

@dbrattli
Copy link
Owner

Very nice. Looks good!

@dbrattli dbrattli merged commit ca5a388 into dbrattli:master Jul 14, 2022
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