File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ def user_filesystem(tmp_path):
24
24
f .write (unreadable_data )
25
25
with open (base_dir / "binary.pkl" , "wb" ) as f :
26
26
f .write (binary_data )
27
+ with open (base_dir / "data_corrected.chi" , "w" ) as f :
28
+ pass
29
+ with open (base_dir / "data_cve.chi" , "w" ) as f :
30
+ pass
27
31
28
32
with open (input_dir / "good_data.chi" , "w" ) as f :
29
33
f .write (chi_data )
@@ -35,6 +39,10 @@ def user_filesystem(tmp_path):
35
39
f .write (unreadable_data )
36
40
with open (input_dir / "binary.pkl" , "wb" ) as f :
37
41
f .write (binary_data )
42
+ with open (input_dir / "data_corrected.chi" , "w" ) as f :
43
+ pass
44
+ with open (input_dir / "data_cve.chi" , "w" ) as f :
45
+ pass
38
46
39
47
with open (input_dir / "file_list.txt" , "w" ) as f :
40
48
f .write ("good_data.chi \n good_data.xy \n good_data.txt \n missing_file.txt" )
Original file line number Diff line number Diff line change 2
2
3
3
WAVELENGTHS = {"Mo" : 0.71 , "Ag" : 0.59 , "Cu" : 1.54 }
4
4
known_sources = [key for key in WAVELENGTHS .keys ()]
5
+ EXCLUSION_KEYWORDS = ["file_list" , "_corrected" , "_cve" ]
5
6
6
7
7
8
def set_output_directory (args ):
@@ -50,7 +51,11 @@ def _expand_user_input(args):
50
51
args .input .remove (file_list_input )
51
52
wildcard_inputs = [input_name for input_name in args .input if "*" in input_name ]
52
53
for wildcard_input in wildcard_inputs :
53
- input_files = [str (file ) for file in Path ("." ).glob (wildcard_input ) if "file_list" not in file .name ]
54
+ input_files = [
55
+ str (file )
56
+ for file in Path ("." ).glob (wildcard_input )
57
+ if not any (keyword in file .name for keyword in EXCLUSION_KEYWORDS )
58
+ ]
54
59
args .input .extend (input_files )
55
60
args .input .remove (wildcard_input )
56
61
return args
@@ -84,7 +89,9 @@ def set_input_lists(args):
84
89
elif input_path .is_dir ():
85
90
input_files = input_path .glob ("*" )
86
91
input_files = [
87
- file .resolve () for file in input_files if file .is_file () and "file_list" not in file .name
92
+ file .resolve ()
93
+ for file in input_files
94
+ if file .is_file () and not any (keyword in file .name for keyword in EXCLUSION_KEYWORDS )
88
95
]
89
96
input_paths .extend (input_files )
90
97
else :
You can’t perform that action at this time.
0 commit comments