Closed khatchad closed 3 years ago
Please use a command line argument library for this, e.g., https://docs.python.org/3.3/library/argparse.html.
Addressed as part of #34
BTW, as part of this change, it would seem to me that there should be two modes, interactive and non-interactive. The tool can be started in interactive mode via a command line flag, e.g., --interactive
or -i
. This can also be the default mode if no other command line options are given. Once a command line option is given, then, the tool enters non-interactive mode. In that case, all of the necessary information to run the tool must be provided as command line parameters. This will make the tool scriptable.
What do you think?
Yup that feature is added as part of #34
Part of the instruction on the README includes this -i
or --interface
param that will toggle the interactive mode and ignore all other params.
Run python3.9 mine-issues.py <QUERY> with the following optional parameters:
-i or --interface: will cause the script to trigger the interactive CLI and ignore all other params. See screenshot above of the interface.
The <QUERY>
however is still needed and I didn't see an easy way to conditionally ignore the required positional argument so I simply left it in. Entering the -i
interactive mode will have the <QUERY>
pre-filled in the interactive mode.
Renamed --interface
to --interactive
as part of https://github.com/ponder-lab/GitHub-Issue-Mining/pull/36
Interface option already included, closing this issue.
As an alternative to the interactive CLI, we can also use command line arguments to make it easier to integrate into a script.