diff options
| author | pi coding agent <pi@localhost> | 2026-10-22 18:59:33 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-10-22 14:25:09 -0500 |
| commit | a897ceca02b78a9426652ac3092c79278cdc681c (patch) | |
| tree | 1ed499d3c583c93890d30864871740a276e4f718 /uploader/scripts/rqtl2/cli_parser.py | |
| parent | e3859b3945606aed7bd6a3861af8a525e061a2b1 (diff) | |
| download | gn-uploader-a897ceca02b78a9426652ac3092c79278cdc681c.tar.gz | |
Move scripts into the uploader package
Move the top-level `scripts` package to `uploader/scripts` so that it becomes the `uploader.scripts` package. All files are moved unchanged; references are updated in a follow-up commit.
Diffstat (limited to 'uploader/scripts/rqtl2/cli_parser.py')
| -rw-r--r-- | uploader/scripts/rqtl2/cli_parser.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/uploader/scripts/rqtl2/cli_parser.py b/uploader/scripts/rqtl2/cli_parser.py new file mode 100644 index 0000000..9bb60a3 --- /dev/null +++ b/uploader/scripts/rqtl2/cli_parser.py @@ -0,0 +1,23 @@ +"""Utilities for CLI parsers specific to R/qtl2 parsing scripts.""" +from pathlib import Path +from argparse import ArgumentParser + +def add_bundle_argument(parser: ArgumentParser) -> ArgumentParser: + """Add the `rqtl2bundle` argument.""" + parser.add_argument("rqtl2bundle", + type=Path, + help="Path to R/qtl2 bundle zip file.") + return parser + + +def add_datasetid_argument(parser: ArgumentParser) -> ArgumentParser: + """Add the `datasetid` argument.""" + parser.add_argument("datasetid", + type=int, + help="The dataset to which the data belongs.") + return parser + + +def add_common_arguments(parser: ArgumentParser) -> ArgumentParser: + """Add common arguments to the CLI parser.""" + return add_bundle_argument(add_datasetid_argument(parser)) |
