1212import time
1313from pathlib import Path
1414
15- DEFAULT_SOURCE_ROOT = "/glade/campaign/cesm/cesmdata/cseg/inputdata/"
16- DEFAULT_TARGET_ROOT = (
15+ DEFAULT_INPUTDATA_ROOT = "/glade/campaign/cesm/cesmdata/cseg/inputdata/"
16+ DEFAULT_STAGING_ROOT = (
1717 "/glade/campaign/collections/gdex/data/d651077/cesmdata/inputdata/"
1818)
1919
@@ -131,7 +131,7 @@ def handle_non_dir(var, user_uid):
131131 return file_path
132132
133133
134- def find_owned_files_scandir (item , user_uid , inputdata_root = DEFAULT_SOURCE_ROOT ):
134+ def find_owned_files_scandir (item , user_uid , inputdata_root = DEFAULT_INPUTDATA_ROOT ):
135135 """
136136 Efficiently find all files owned by a specific user using os.scandir().
137137
@@ -178,7 +178,7 @@ def find_owned_files_scandir(item, user_uid, inputdata_root=DEFAULT_SOURCE_ROOT)
178178
179179
180180def replace_files_with_symlinks (
181- item_to_process , target_dir , username , inputdata_root = DEFAULT_SOURCE_ROOT , dry_run = False
181+ item_to_process , target_dir , username , inputdata_root = DEFAULT_INPUTDATA_ROOT , dry_run = False
182182):
183183 """
184184 Finds files owned by a specific user in a source directory tree,
@@ -334,19 +334,19 @@ def parse_arguments():
334334 parser .add_argument (
335335 "items_to_process" ,
336336 nargs = "*" ,
337- default = DEFAULT_SOURCE_ROOT ,
337+ default = DEFAULT_INPUTDATA_ROOT ,
338338 type = validate_paths ,
339339 help = (
340- f"One or more (directories to search for) files (default: { DEFAULT_SOURCE_ROOT } )"
340+ f"One or more (directories to search for) files (default: { DEFAULT_INPUTDATA_ROOT } )"
341341 ),
342342 )
343343 parser .add_argument (
344344 "--target-root" ,
345345 type = validate_directory ,
346- default = DEFAULT_TARGET_ROOT ,
346+ default = DEFAULT_STAGING_ROOT ,
347347 help = (
348348 f"The root of the directory tree where files should be moved to "
349- f"(default: { DEFAULT_TARGET_ROOT } )"
349+ f"(default: { DEFAULT_STAGING_ROOT } )"
350350 ),
351351 )
352352
@@ -356,7 +356,7 @@ def parse_arguments():
356356 "--inputdata-root" ,
357357 "-inputdata" , # to match rimport
358358 type = validate_directory ,
359- default = DEFAULT_SOURCE_ROOT ,
359+ default = DEFAULT_INPUTDATA_ROOT ,
360360 help = argparse .SUPPRESS ,
361361 )
362362
0 commit comments