aboutsummaryrefslogtreecommitdiff
path: root/scripts/cli_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cli_parser.py')
-rw-r--r--scripts/cli_parser.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/scripts/cli_parser.py b/scripts/cli_parser.py
index bceb3f4..e8f030c 100644
--- a/scripts/cli_parser.py
+++ b/scripts/cli_parser.py
@@ -7,16 +7,20 @@ def init_cli_parser(program: str, description: Optional[str] = None) -> Argument
"""Initialise the CLI arguments parser."""
parser = ArgumentParser(prog=program, description=description)
- parser.add_argument("databaseuri", help="URL to MariaDB")
- parser.add_argument("redisuri", help="URL to Redis")
- parser.add_argument("jobid",
- help="Job ID that this belongs to.",
- type=UUID)
- parser.add_argument("--redisexpiry",
- help="How long to keep any redis keys around.",
- type=int,
- default=86400)
+ parser.add_argument(
+ "databaseuri", type=str, help="URI to connect to MariaDB")
+ parser.add_argument(
+ "redisuri", type=str, help="URI to connect to the redis server.")
+ parser.add_argument("jobid", type=UUID, help="Job ID that this belongs to")
+ parser.add_argument(
+ "--redisexpiry",
+ type=int,
+ default=86400,
+ help="How long to keep any redis keys around.")
+ return parser
+def add_global_data_arguments(parser: ArgumentParser) -> ArgumentParser:
+ """Add the global (present in nearly ALL scripts) CLI arguments."""
parser.add_argument("speciesid",
type=int,
help="Species to which bundle relates.")