From cbce14fd0b94a11dbb387cd79aea973f83fd026a Mon Sep 17 00:00:00 2001 From: Matthew K Defenderfer <mdefende@uab.edu> Date: Sat, 28 Dec 2024 20:51:42 -0600 Subject: [PATCH] Reduce CLI time to action and fix convert-to-parquet help message --- src/rc_gpfs/__init__.py | 2 -- src/rc_gpfs/cli/__init__.py | 2 ++ src/rc_gpfs/cli/convert_to_parquet.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rc_gpfs/__init__.py b/src/rc_gpfs/__init__.py index 039b8a2..e69de29 100644 --- a/src/rc_gpfs/__init__.py +++ b/src/rc_gpfs/__init__.py @@ -1,2 +0,0 @@ -from .compute import * -from .process import * \ No newline at end of file diff --git a/src/rc_gpfs/cli/__init__.py b/src/rc_gpfs/cli/__init__.py index e69de29..fcbd7b1 100644 --- a/src/rc_gpfs/cli/__init__.py +++ b/src/rc_gpfs/cli/__init__.py @@ -0,0 +1,2 @@ +from .convert_to_parquet import convert_to_parquet +from .split_log import split_log \ No newline at end of file diff --git a/src/rc_gpfs/cli/convert_to_parquet.py b/src/rc_gpfs/cli/convert_to_parquet.py index 28b5895..e684935 100644 --- a/src/rc_gpfs/cli/convert_to_parquet.py +++ b/src/rc_gpfs/cli/convert_to_parquet.py @@ -44,8 +44,8 @@ def parse_args(): slurm.add_argument('-p','--partition', type=str, default='amd-hdr100') slurm.add_argument('-t','--time',type=str,default='02:00:00') slurm.add_argument('-m','--mem',type=str,default='16G') - slurm.add_argument('--slurm-log-dir',type=Path,default='./out', - help='Output log directory. If the directory does not exist, it will be created automatically. Logs will be named convert_%A_%a to differentiate amongs job IDs and task IDs') + slurm.add_argument('--slurm-log-dir',type=Path, default='./out', + help='Output log directory. If the directory does not exist, it will be created automatically. Logs will be named convert_%%A_%%a to differentiate amongs job IDs and task IDs') interpreter = slurm.add_mutually_exclusive_group() interpreter.add_argument('--python-path',type=Path, help="Path to Python interpreter to use for conversion. This interpreter should have access to a pandas library, preferably version >=2.0. If not specified, the path to the active python3 interpreter will be used.") @@ -76,7 +76,7 @@ convert-to-parquet -o {output_dir} ${{log}} def setup_slurm_logs(slurm_log_dir): slurm_log_dir = slurm_log_dir.absolute() slurm_log_dir.mkdir(exist_ok = True,parents=True,mode = 0o2770) - out_log,err_log = [slurm_log_dir.joinpath('convert_%A_%a.out'),slurm_log_dir.joinpath('convert_%A_%a.err')] + out_log,err_log = [str(slurm_log_dir.joinpath('convert_%A_%a.out')),str(slurm_log_dir.joinpath('convert_%A_%a.err'))] slurm_logs = {'output_log':out_log,'error_log':err_log} return slurm_logs -- GitLab