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

Verify input file existence on all Python scripts #147

Closed
RamRS opened this issue Aug 31, 2013 · 13 comments
Closed

Verify input file existence on all Python scripts #147

RamRS opened this issue Aug 31, 2013 · 13 comments
Milestone

Comments

@RamRS
Copy link
Contributor

RamRS commented Aug 31, 2013

a. Check for existence of command line arg values
b. Check that the value is indeed a file

(The above could be solved by using argparse, I think)

@mr-c
Copy link
Contributor

mr-c commented Sep 4, 2013

@RamRS How so?

@RamRS
Copy link
Contributor Author

RamRS commented Sep 4, 2013

@mr-c : This is applicable only to files that use sys.argv[]. We check if all required args were passed, and if any arg is a filename, we check os.path.isfile() so we know it is a file.

Or, we use argparse.

@mr-c
Copy link
Contributor

mr-c commented Feb 28, 2014

Yep, all scripts should be using argparse

@RamRS
Copy link
Contributor Author

RamRS commented Feb 28, 2014

All under scripts/ already use argparse + file_api. Only sandbox scripts need our attention.

@RamRS
Copy link
Contributor Author

RamRS commented Feb 28, 2014

There are 124 files under sandbox that use sys.argv[]. I have a list if anyone wants it!

@RamRS
Copy link
Contributor Author

RamRS commented Mar 5, 2014

And oh boy, so many results from https://github.com/ngs-docs/edda ! Link: https://github.com/ctb/edda/search?q=sandbox&type=Code

Note: Search is from under ctb/edda because github cannot search forked repos.

@RamRS
Copy link
Contributor Author

RamRS commented Mar 5, 2014

sandbox scripts referenced in edda:
interleave.py strip-and-split-for-assembly.py assemstats3.py extract-long-sequences.py filter-below-abund.py extract-single-partition.py split-pe.py strip-partition.py multi-rename.py make-coverage.py readstats.py multi-velvet.py sweep-reads3.py

Next step: check these lists for scripts that use sys.argv[].

@mr-c
Copy link
Contributor

mr-c commented Mar 5, 2014

Great list, have any of these already been migrated?

On Wed, Mar 5, 2014 at 1:00 PM, Ram RS notifications@github.com wrote:

sandbox scripts referenced in edda:

interleave.py
strip-and-split-for-assembly.py
assemstats3.py
extract-long-sequences.py
filter-below-abund.py
extract-single-partition.py
split-pe.py
strip-partition.py
multi-rename.py
make-coverage.py
readstats.py
multi-velvet.py
sweep-reads3.py

Next step: check these lists for scripts that use sys.argv[].

Reply to this email directly or view it on GitHubhttps://github.com//issues/147#issuecomment-36772673
.

@RamRS
Copy link
Contributor Author

RamRS commented Mar 5, 2014

Not sure, @mr-c. My next step is to check this against my list of 120+
scripts (the one that has all current sandbox scripts that use sys.argv). I
guess this step would answer both our questions.

Ram

On Wed, Mar 5, 2014 at 1:03 PM, Michael R. Crusoe
notifications@github.comwrote:

Great list, have any of these already been migrated?

On Wed, Mar 5, 2014 at 1:00 PM, Ram RS notifications@github.com wrote:

sandbox scripts referenced in edda:

interleave.py
strip-and-split-for-assembly.py
assemstats3.py
extract-long-sequences.py
filter-below-abund.py
extract-single-partition.py
split-pe.py
strip-partition.py
multi-rename.py
make-coverage.py
readstats.py
multi-velvet.py
sweep-reads3.py

Next step: check these lists for scripts that use sys.argv[].

Reply to this email directly or view it on GitHub<
https://github.com/ged-lab/khmer/issues/147#issuecomment-36772673>

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/147#issuecomment-36772900
.

@RamRS
Copy link
Contributor Author

RamRS commented Mar 5, 2014

Surprisingly, none of the scripts from the two lists displayed above use sys.srgv[]. Also, no matches to any of the files under scripts/ as well.

@mr-c
Copy link
Contributor

mr-c commented Mar 8, 2014

Okay, should we close this issue then?

@RamRS
Copy link
Contributor Author

RamRS commented Mar 8, 2014

Sure, but should we wait until #270 is closed? There are a bunch of issues linked to it and we can close all of them at once.

@mr-c mr-c closed this as completed Mar 10, 2014
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

No branches or pull requests

2 participants