Skip to content

Commit a512267

Browse files
committed
rimport: Update docstrings.
1 parent 62d6b61 commit a512267

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

rimport

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# TODO: Move all the Python into new file rimport.py for simpler testing. Keep rimport as a
33
# convenience wrapper.
44
"""
5-
Copy files from CESM inputdata directory to a publishing directory.
5+
Copy files from CESM inputdata directory to a publishing directory, then replace the original with a
6+
symlink to the copy.
67
78
Do `rimport --help` for more information.
89
"""
@@ -35,13 +36,6 @@ logger = shared.logger
3536
def build_parser() -> argparse.ArgumentParser:
3637
"""Build and configure the argument parser for rimport.
3738
38-
Creates an ArgumentParser with the following options:
39-
- Mutually exclusive required group:
40-
--file: Import a single file (relative to inputdata directory)
41-
--list: Import multiple files from a list file
42-
- Optional:
43-
--inputdata: Override the default inputdata directory
44-
4539
Returns:
4640
argparse.ArgumentParser: Configured parser ready to parse command-line arguments.
4741
"""
@@ -375,7 +369,7 @@ def get_files_to_process(file: str, filelist: str, items_to_process: list):
375369
def main(argv: List[str] | None = None) -> int:
376370
"""Main entry point for the rimport tool.
377371
378-
Copies files from the CESM inputdata directory to a staging/publishing directory,
372+
Copies and relinks files from the CESM inputdata directory to a staging/publishing directory,
379373
preserving the directory structure. Ensures the script runs as the correct user
380374
(STAGE_OWNER) and handles both single files and file lists.
381375
@@ -391,7 +385,7 @@ def main(argv: List[str] | None = None) -> int:
391385
392386
Exit Codes:
393387
0: All files staged successfully.
394-
1: One or more files failed to stage (errors printed to stderr).
388+
1: One or more files failed to stage or relink (errors printed to stderr).
395389
2: Fatal error (missing inputdata directory, missing file list, etc.).
396390
"""
397391
parser = build_parser()

0 commit comments

Comments
 (0)