-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.py
74 lines (69 loc) · 2.05 KB
/
params.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python3
"""
Contains argument parser for ingest.py
"""
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--input",
"-i",
action = "store",
dest = "input_path",
type = str,
help = "Full path to input folder. Uses current folder if none is provided.",
)
parser.add_argument(
"--output",
"-o",
action = "store",
dest = "output_path",
type = str,
help = "Full path to output csv file. Creates one in input folder if none is provided.",
)
parser.add_argument(
"--load_inventory",
"-l",
required = False,
type = str,
action = "store",
dest = "inventory_path",
help = "Full path to inventory csv. If not specified the script will look in the base folder of the input for inventories. If no inventories are found the script will leave some fields blank.",
)
parser.add_argument(
"--skip",
"-s",
required = False,
nargs = "*",
action = "store",
dest = "skip",
help = 'Use to specify patterns to skip. Can take multiple inputs. For example, "_ac." "_am." could be used to skip legacy ac and am files.',
)
parser.add_argument(
"--description",
"-d",
required = False,
nargs = "*",
action = "store",
dest = "desc",
help = 'Use to specify column names to populate Meadow description field with. Can take multiple inputs. Information from each column will be separated by a ";" in the description. Example usage: -d "Date/Time" "Barcode". If not specified, script will default to looking for the column "description"',
)
parser.add_argument(
"--auxiliary",
"-x",
required = False,
default = "parse",
type = str,
action = "store",
dest = "x_parse",
choices = ["extension","parse", None],
help = "Sets how to parse auxiliary files. Default is parse.",
)
parser.add_argument(
"--prepend_accession",
"-p",
action = "store",
dest = "prepend",
type = str,
help = "set a string to be added to the beginning of the file accession number when generated",
)
args = parser.parse_args()