You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked on this with my development team and got several comments and suggestions:
I see two issues. The first is that it will violate expectations of CLI tools, which is fine if your documentation is good and users aren't picky. The second is that it's expecting the entire JSON to be a single string, so quotes are going to have to be carefully escaped and painful to debug. If I were to do this, I would probably make all of these --flag ARG arguments and then add in a special --json PATH argument that would allow you to pass in a file instead. I would not do JSON as a single positional argument.
The shell script is using the traditonal --flag styling, I'd recommend using a library like click (to help set the boolean flags etc) in python and then argv can be passed directly through the shell script without that inital switch statement.
or put everything in json files like [@Markiewicz] said, then your configuration is saved to some place other than the history file.
If you’re refactoring, I don’t really see a benefit of checking the args in the bash file - I think it’s more beneficial to have an argument parser in the python script (gives you type validation, help generation). Then you can remove L10-82 in the submission script and just replace with ARGS=($@)
I would probably just go with the third suggestion as I think it's simplest, though it will require some rework because args will be an argparse object rather than a dict, though it could be easily converted for backwards compatibilty. I will try these out and see.
The text was updated successfully, but these errors were encountered:
I checked on this with my development team and got several comments and suggestions:
I would probably just go with the third suggestion as I think it's simplest, though it will require some rework because args will be an argparse object rather than a dict, though it could be easily converted for backwards compatibilty. I will try these out and see.
The text was updated successfully, but these errors were encountered: