Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed May 29, 2024
1 parent 42615f6 commit 6d09588
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion abipy/scripts/abicomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def abicomp_png(options):
"""
Use matplotlib to plot multiple png files on a grid.
"""
plotter = FilesPlotter(options.filepaths)
plotter = FilesPlotter(options.paths)
plotter.plot()
return 0

Expand Down
14 changes: 11 additions & 3 deletions abipy/scripts/abislurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def get_epilog() -> str:
Usage example:\n
abislurm.py running => Get info on all the running jobs
abislurm.py completed 111 112 => Get info on completed jobs
"""


Expand All @@ -38,14 +39,21 @@ def get_parser(with_epilog=False):
copts_parser.add_argument('--loglevel', default="ERROR", type=str,
help="Set the loglevel. Possible values: CRITICAL, ERROR (default), WARNING, INFO, DEBUG")

job_ids_parser = argparse.ArgumentParser(add_help=False)
job_ids_parser.add_argument('job_ids', nargs="+", help="List of job ids.")

# Create the parsers for the sub-commands
subparsers = parser.add_subparsers(dest='command', help='sub-command help',
description="Valid subcommands, use command --help for help")

# Subparser for running command.
p_running = subparsers.add_parser('jobs', parents=[copts_parser],
p_running = subparsers.add_parser('running', parents=[copts_parser],
help="Check info on all the running jobs.")

# Subparser for running command.
p_completed = subparsers.add_parser('completed', parents=[copts_parser, job_ids_parser],
help="Returning info on completed jobs.")

return parser


Expand Down Expand Up @@ -81,8 +89,8 @@ def show_examples_and_exit(err_msg=None, error_code=1):
#elif options.command == "running_from_logs":

elif options.command == "completed":
raise NotImplementedError("")
#qu.get_completed_job_info(job_id)
for job_id in options.job_ids:
print(qu.get_completed_job_info(job_id))

#elif options.command == "completed_from_logs":

Expand Down

0 comments on commit 6d09588

Please sign in to comment.