-
Notifications
You must be signed in to change notification settings - Fork 295
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
initial work for issue 399: add --force flag #647
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
@@ -102,7 +104,8 @@ def main(): | |||
if num_samples > 1: | |||
sys.stderr.write( | |||
"Error: cannot specify -o with more than one sample.") | |||
sys.exit(-1) |
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.
Yep, this should be "1" not "-1"
okay to test |
Note, there seem to be some spacing/indentation issues - the indentation is not always consistent with your added lines. |
@ctb well aren't you fast. Fixed. |
there appear to be some idle time issues with the @ctb process.... |
okay to test |
please test this |
@@ -98,6 +98,8 @@ def get_parser(): | |||
parser.add_argument('graphbase', help="base name for output files") | |||
parser.add_argument('input_filenames', metavar='input_sequence_filename', | |||
nargs='+', help='input FAST[AQ] sequence filenames') | |||
parser.add_argument('-f', '-force', default=False, action='store_true', |
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.
Long form arguments should use --, ie --force.
Fixed more errors, including what @camillescott pointed out, but I want to look at it one more time to make sure everything looks good. Did I successfully push the new changes through? |
On Thu, Nov 06, 2014 at 07:40:48AM -0800, jessicamizzi wrote:
Can you see them in the diff view? --titusC. Titus Brown, ctb@msu.edu |
@@ -130,7 +132,8 @@ def main(): | |||
print >> sys.stderr, ("** ERROR: the k-mer counting table is too small" | |||
" this data set. Increase tablesize/# tables.") | |||
print >> sys.stderr, "**" | |||
sys.exit(1) |
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 particular use of force won't have any effect on script execution as it is at the last stage. Lines 72-75 need addressing. We probably need to add a force parameter to the check_file_status()
, check_space()
, and check_space_for_hashtable()
functions.
Tagging the source issue: #399 |
Testing may be a bit tricky. To trigger code paths that a |
@@ -23,7 +23,7 @@ def load_pe(screed_handle): | |||
|
|||
screed_iter = iter(screed_handle) | |||
|
|||
while 1: | |||
while True: |
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 this change? 'while 1' is perfectly idiomatic in Python...?
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 may be an 'autopep8'-ism
@mr-c what specifically are you thinking of re crashes? On a quick skim I didn't see anything that would be tough to test. |
@ctb The As far as I can see these will require Mocking to test. |
Ahh, OK. There are several ways to go about this --
...and I think those are the best of the options. The latter is the way to do it, I think, and it fits with our long term plans (of moving most script code out of scripts/ into an importable place). We don't have any example code in khmer that already does this, but the basic routine is
and then place the monkeypatching in a try/finally, e.g.
|
@jessicamizzi Once again a "simple" issue has turned out to be more complex. Sorry! I am happy to write the tests for you if you want. |
@mr-c if there are any simple ones, I can do them. Otherwise, it might be best if you do them. I will make the other changes you talked about earlier on this page, but I will tomorrow. |
Can two people review these changes?
|
|
||
* Doxyfile.in: add links to the stdc++ docs | ||
2014-12-05 Jessica Mizzi <mizzijes@msu.edu> | ||
* khmer/file.py,sandbox/sweep-reads.py,scripts/{abundance-dist-single,abundance-dist,annotate-partitions,count-median,count-overlap,do-partition,extract-paired-reads,extract-partitions,filter-abund-single,filter-abund,filter-stoptags,interleave-reads,load-graph,load-into-counting,make-initial-stoptags,merge-partitions,normalize-by-median,partition-graph,sample-reads-randomly,split-paired-reads}.py,setup.cfg,tests/{test_script_arguments,test_scripts}.py: Added force option to all scripts to script IO sanity checks and updated tests to match. |
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 should be broken up so it doesn't run over the 80 char line.
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, don't remove @mr-c entry.
Jenkins, test this please |
Jenkins is failing (unstable) but it wasn't test related. I'm guessing pep8? |
…ted tests to match
47e8890
to
eea8efa
Compare
initial work for issue 399: add --force flag
@jessicamizzi, Congratulations on your first commit to the khmer project! Your name will be included in the release notes for the next version and you'll be listed amongst our other contributors in the next software release paper. |
See #399.