Skip to content

Commit

Permalink
Merge pull request #2832 from stfc/2831_PSyclone_Argument_Consistency
Browse files Browse the repository at this point in the history
#2831 Reorder arguments to parser for consistency
  • Loading branch information
LonelyCat124 authored Jan 9, 2025
2 parents 93741fd + 1355d66 commit c6e9507
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
7) PR #2840 for #2839. Raise error in FortranReader if ignore_directives
is True but ignore_comments is True.

8) PR #2832 for #2831. Reorders the arguments to the parser to meet best
practices.

release 3.0.0 6th of December 2024

1) PR #2477 for #2463. Add support for Fortran Namelist statements.
Expand Down
19 changes: 10 additions & 9 deletions src/psyclone/generator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2017-2024, Science and Technology Facilities Council.
# Copyright (c) 2017-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -34,6 +34,7 @@
# Authors: R. W. Ford, A. R. Porter and N. Nobre, STFC Daresbury Lab
# Modified A. J. Voysey, Met Office
# Modified J. Henrichs, Bureau of Meteorology
# Modified A. R. Pirrie, Met Office

'''
This module provides the PSyclone 'main' routine which is intended
Expand Down Expand Up @@ -426,11 +427,11 @@ def main(arguments):
# Common options
parser.add_argument('filename', help='input source code')
parser.add_argument(
'--version', '-v', action='version',
'-v', '--version', action='version',
version=f'PSyclone version: {__VERSION__}',
help='display version information')
parser.add_argument("--config", "-c", help="config file with "
"PSyclone specific options")
parser.add_argument('-c', '--config', help='config file with '
'PSyclone specific options')
parser.add_argument('-s', '--script', help='filename of a PSyclone'
' optimisation recipe')
parser.add_argument(
Expand All @@ -439,12 +440,12 @@ def main(arguments):
parser.add_argument(
'-l', '--limit', dest='limit', default='off',
choices=['off', 'all', 'output'],
help='limit the Fortran line length to 132 characters (default '
'\'%(default)s\'). Use \'all\' to apply limit to both input and '
'output Fortran. Use \'output\' to apply line-length limit to output '
'Fortran only.')
help="limit the Fortran line length to 132 characters (default "
"'%(default)s'). Use 'all' to apply limit to both input and "
"output Fortran. Use 'output' to apply line-length limit to output "
"Fortran only.")
parser.add_argument(
'--profile', '-p', action="append", choices=Profiler.SUPPORTED_OPTIONS,
'-p', '--profile', action="append", choices=Profiler.SUPPORTED_OPTIONS,
help="add profiling hooks for 'kernels', 'invokes' or 'routines'")
parser.add_argument(
'--backend', dest='backend',
Expand Down

0 comments on commit c6e9507

Please sign in to comment.