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
added screed and read_parser streaming testing #644
Conversation
# create the subprocess of the script | ||
scriptp = \ | ||
subprocess.Popen(['normalize-by-median.py -C 2 -k 17 /dev/stdin'], | ||
shell=True, stdin=subprocess.PIPE, stderr=subprocess.PIPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run this on the command line with screed 0.7 and 0.7.1 it works. Maybe using a FIFO named pipe (os.mkfifo) like we did when we were debugging with GDB would do the trick. That way you can still invoke the script using utils.runscript like the rest of the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I was using redirection instead of a pipe which evidently matters (??).
|
Retest this please |
Tests redesigned to use fifos within python to hold to the current testing structure (i.e. runscript()) Next up:
|
Breakdown of which script uses what reading library: screed:
readparser:
|
retest this please |
625bf2e
to
bc2b82f
Compare
retest this please |
15ab059
to
e8f6c30
Compare
retest this please |
Should be noted that these tests are all marked known-failing because we need lower level seqan for streaming to work and (at least) screed 0.7.1 for non-gzip streaming to work in screed. In order to verify that these work you'd have to edit the setup.cfg to run known_failing tests and to not stop on a test failure and then run the test_scripts.py stuff manually as documented in the docs.
@brtaylor92, @b-wyss, @camillescott, CR please? |
|
||
|
||
def check_file_status(file_path): | ||
""" | ||
Check status of file - return if file exists; warn and exit | ||
if empty, or does not exist | ||
This check will return if the file being checked is a block device | ||
This check will return if the file being checked is a fifo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls combine sentences.
@brtaylor92 @b-wyss @wrightmhw Requesting CR |
|
||
mode = os.stat(file_path).st_mode | ||
# block devices will be nonzero | ||
if S_ISBLK(mode): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not
if S_ISBLK(mode) or S_ISFIFO(mode):
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mm. Good point.
A few more comments, but otherwise LGTM. |
Comments as in add more comments in the code, or...? |
On Fri, Nov 14, 2014 at 10:42:42AM -0800, bocajnotnef wrote:
I made more comments that you should look at! |
Ah. Sorry. git inline formatting confusing. Resolving comments. |
Really not a fan of merge conflicts. @ctb Should be good for final pass. Hopefully. |
@@ -11,13 +11,21 @@ | |||
|
|||
import os | |||
import sys | |||
from stat import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, just import S_ISBLK and S_ISFIFO here.
Apart from that one comment, LGTM. Suggest waiting for @mr-c to take a look as he is more familiar with issues. |
@@ -446,6 +451,7 @@ def test_normalize_by_median_dumpfrequency(): | |||
assert 'Nothing' in out | |||
|
|||
|
|||
@attr('known_failing') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is an existing test now marked as a known failure?
@mr-c: Resolved, methinks. All good? |
Check status of file - return if file exists; warn and exit | ||
if empty, or does not exist | ||
""" | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return
disable the entire method
…n_failing since they fail with existing systems. non-gzip streaming works in screed 0.7.1
Cleaned up formatting in streaming tests. Renamed streaming test helper functions to something more explicit. Cleaned up fifo/blk testing logic structure to be cleaner Added docstrings to helper functions to better explain functionality Cleaned up some comments
Cleared up logical structure
removed extraneous known_failing attr
042de1e
to
7803f9b
Compare
Commit discontinuity due to forcing with a merge conflict fix. @mr-c Asserts/spacing resolved. |
added screed and read_parser streaming testing
Good job, @bocajnotnef ! |
Yaaaay! |
retest this please |
please test this |
def execute_abund_dist_single_streaming(ifilename, somedir=None): | ||
'''Helper function for the matrix of streaming tests using screed via | ||
filter-abund-single, i.e. uncompressed fasta, gzip fasta, bz2 fasta, | ||
uncompressed fastq, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this comment is wrong (not using screed, wrong script name)
Marked as known failing since they currently fail.
Will investigate.
Relevant to #393, #654