@@ -13,58 +13,69 @@ def get_args(override_cli_inputs=None):
13
13
p .add_argument (
14
14
"input" ,
15
15
nargs = "+" ,
16
- help = "The filename(s) or folder(s) of the datafile(s) to load. "
17
- "Required.\n Supply a space-separated list of files or directories."
18
- "Long lists can be supplied, one per line, in a file with name "
19
- "file_list.txt. If one or more directory is provided, all valid "
20
- "data-files in that directory will be processed. Examples of valid "
21
- "inputs are 'file.xy', 'data/file.xy', 'file.xy, data/file.xy', "
22
- "'.' (load everything in the current directory), 'data' (load"
23
- "everything in the folder ./data), 'data/file_list.txt' (load"
24
- " the list of files contained in the text-file called "
25
- "file_list.txt that can be found in the folder ./data), "
26
- "'./*.chi', 'data/*.chi' (load all files with extension .chi in the "
27
- "folder ./data)." ,
16
+ help = (
17
+ "The filename(s) or folder(s) of the datafile(s) to load. "
18
+ "Required.\n Supply a space-separated list of files or directories. "
19
+ "Long lists can be supplied, one per line, in a file with name "
20
+ "file_list.txt. If one or more directory is provided, all valid "
21
+ "data-files in that directory will be processed. Examples of valid "
22
+ "inputs are 'file.xy', 'data/file.xy', 'file.xy, data/file.xy', "
23
+ "'.' (load everything in the current directory), 'data' (load "
24
+ "everything in the folder ./data), 'data/file_list.txt' (load "
25
+ "the list of files contained in the text-file called "
26
+ "file_list.txt that can be found in the folder ./data), "
27
+ "'./*.chi', 'data/*.chi' (load all files with extension .chi in the "
28
+ "folder ./data)."
29
+ ),
28
30
)
29
31
p .add_argument (
30
32
"-a" ,
31
33
"--anode-type" ,
32
- help = f"The type of the x-ray source. Allowed values are "
33
- f"{* [known_sources ], }. Either specify a known x - ray source or specify wavelength .",
34
+ help = (
35
+ f"The type of the x-ray source. Allowed values are "
36
+ f"{* [known_sources ], }. Either specify a known x - ray source or specify wavelength ."
37
+ ),
34
38
default = "Mo" ,
35
39
)
36
40
p .add_argument (
37
41
"-w" ,
38
42
"--wavelength" ,
39
- help = "X-ray source wavelength in angstroms. Not needed if the anode-type "
40
- "is specified. This wavelength will override the anode wavelength if both are specified." ,
43
+ help = (
44
+ "X-ray source wavelength in angstroms. Not needed if the anode-type "
45
+ "is specified. This wavelength will override the anode wavelength if both are specified."
46
+ ),
41
47
default = None ,
42
48
type = float ,
43
49
)
44
50
p .add_argument (
45
51
"-o" ,
46
52
"--output-directory" ,
47
- help = "The name of the output directory. If not specified "
48
- "then corrected files will be written to the current directory."
49
- "If the specified directory doesn't exist it will be created." ,
53
+ help = (
54
+ "The name of the output directory. If not specified "
55
+ "then corrected files will be written to the current directory. "
56
+ "If the specified directory doesn't exist it will be created."
57
+ ),
50
58
default = None ,
51
59
)
52
60
p .add_argument (
53
61
"-x" ,
54
62
"--xtype" ,
55
- help = f"The quantity on the independent variable axis. Allowed "
56
- f"values: { * XQUANTITIES , } . If not specified then two-theta "
57
- f"is assumed for the independent variable. Only implemented for "
58
- f"tth currently." ,
63
+ help = (
64
+ f"The quantity on the independent variable axis. Allowed "
65
+ f"values: { * XQUANTITIES , } . If not specified then two-theta "
66
+ f"is assumed for the independent variable. Only implemented for "
67
+ f"tth currently."
68
+ ),
59
69
default = "tth" ,
60
70
)
61
71
p .add_argument (
62
72
"-c" ,
63
73
"--output-correction" ,
64
74
action = "store_true" ,
65
- help = "The absorption correction will be output to a file if this "
66
- "flag is set. Default is that it is not output." ,
67
- default = "tth" ,
75
+ help = (
76
+ "The absorption correction will be output to a file if this "
77
+ "flag is set. Default is that it is not output."
78
+ ),
68
79
)
69
80
p .add_argument (
70
81
"-f" ,
@@ -75,34 +86,42 @@ def get_args(override_cli_inputs=None):
75
86
p .add_argument (
76
87
"-m" ,
77
88
"--method" ,
78
- help = f"The method for computing absorption correction. Allowed methods: { * CVE_METHODS , } . "
79
- f"Default method is polynomial interpolation if not specified. " ,
89
+ help = (
90
+ f"The method for computing absorption correction. Allowed methods: { * CVE_METHODS , } . "
91
+ f"Default method is polynomial interpolation if not specified. "
92
+ ),
80
93
default = "polynomial_interpolation" ,
81
94
)
82
95
p .add_argument (
83
96
"-u" ,
84
97
"--user-metadata" ,
85
98
metavar = "KEY=VALUE" ,
86
99
nargs = "+" ,
87
- help = "Specify key-value pairs to be loaded into metadata using the format key=value. "
88
- "Separate pairs with whitespace, and ensure no whitespaces before or after the = sign. "
89
- "Avoid using = in keys. If multiple = signs are present, only the first separates the key and value. "
90
- "If a key or value contains whitespace, enclose it in quotes. "
91
- "For example, facility='NSLS II', 'facility=NSLS II', beamline=28ID-2, "
92
- "'beamline'='28ID-2', 'favorite color'=blue, are all valid key=value items. " ,
100
+ help = (
101
+ "Specify key-value pairs to be loaded into metadata using the format key=value. "
102
+ "Separate pairs with whitespace, and ensure no whitespaces before or after the = sign. "
103
+ "Avoid using = in keys. If multiple = signs are present, only the first separates the key and value. "
104
+ "If a key or value contains whitespace, enclose it in quotes. "
105
+ "For example, facility='NSLS II', 'facility=NSLS II', beamline=28ID-2, "
106
+ "'beamline'='28ID-2', 'favorite color'=blue, are all valid key=value items. "
107
+ ),
93
108
)
94
109
p .add_argument (
95
110
"-n" ,
96
111
"--username" ,
97
- help = "Username will be loaded from config files. Specify here "
98
- "only if you want to override that behavior at runtime. " ,
112
+ help = (
113
+ "Username will be loaded from config files. Specify here "
114
+ "only if you want to override that behavior at runtime. "
115
+ ),
99
116
default = None ,
100
117
)
101
118
p .add_argument (
102
119
"-e" ,
103
120
"--email" ,
104
- help = "Email will be loaded from config files. Specify here "
105
- "only if you want to override that behavior at runtime. " ,
121
+ help = (
122
+ "Email will be loaded from config files. Specify here "
123
+ "only if you want to override that behavior at runtime. "
124
+ ),
106
125
default = None ,
107
126
)
108
127
args = p .parse_args (override_cli_inputs )
0 commit comments