Skip to content

Conversation

@martindurant
Copy link
Member

Some effect as #201, but should now pass tests

Some effect as python-streamz#201, but should now pass tests
@martindurant
Copy link
Member Author

i.e., add "from_end" parameter to from_textfiles, which only makes events out of new data.

@codecov-io
Copy link

codecov-io commented Mar 20, 2019

Codecov Report

Merging #231 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
+ Coverage   93.38%   93.46%   +0.08%     
==========================================
  Files          13       13              
  Lines        1481     1485       +4     
==========================================
+ Hits         1383     1388       +5     
+ Misses         98       97       -1
Impacted Files Coverage Δ
streamz/sources.py 95.38% <100%> (+0.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c26a84c...af2a800. Read the comment docs.

out = source.sink_to_list()
source.start()
assert out == []
yield gen.sleep(0.01)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little nit-picky, but why this sleep?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The seek() to end doesn't happen until the coroutine runs for the first time, so if you were to write immediately here, you would always seek past the new data. This yield makes sure the coroutine runs once. Would a yield without the sleep have the same effect, or is there another way to say "run coroutines now"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you just want one cycle to go through, then try yield gen.moment.

If you might need a few cycles, then you should probably have an await_for

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try moment tomorrow; await_for is tricky when you don't expect the output to change. Perhaps it would be reasonable to await on at attribute of the source.

@martindurant
Copy link
Member Author

btw: when I run flake locally, I get loads more issues than show up in travis; how is this configured?

@mrocklin
Copy link
Collaborator

mrocklin commented Mar 21, 2019 via email

@martindurant
Copy link
Member Author

I believe this is ready (and should close #201)

@martindurant
Copy link
Member Author

Fixes #199

@martindurant martindurant merged commit 62ba067 into python-streamz:master Apr 10, 2019
@martindurant martindurant deleted the from_end branch April 10, 2019 19:30
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.

3 participants