-
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
Verify input file existence on all Python scripts #147
Comments
@RamRS How so? |
@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. |
Yep, all scripts should be using argparse |
All under scripts/ already use argparse + file_api. Only sandbox scripts need our attention. |
There are 124 files under sandbox that use sys.argv[]. I have a list if anyone wants it! |
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. |
sandbox scripts referenced in edda: Next step: check these lists for scripts that use sys.argv[]. |
Great list, have any of these already been migrated? On Wed, Mar 5, 2014 at 1:00 PM, Ram RS notifications@github.com wrote:
|
Not sure, @mr-c. My next step is to check this against my list of 120+ Ram On Wed, Mar 5, 2014 at 1:03 PM, Michael R. Crusoe
|
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. |
Okay, should we close this issue then? |
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. |
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)
The text was updated successfully, but these errors were encountered: