Changeset 8209738 in flex_extract.git for Source/Python/install.py


Ignore:
Timestamp:
May 7, 2020, 3:32:03 PM (4 years ago)
Author:
anphi <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
b936fd3
Parents:
05e9362
Message:

language corrections in comment sections and print commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/install.py

    r50f9ca6 r8209738  
    4646
    4747Depending on the selected installation environment (locally or on the
    48 ECMWF server ecgate or cca) the program extracts the commandline
     48ECMWF server ecgate or cca) the program extracts the command line
    4949arguments and the CONTROL file parameter and prepares the corresponding
    5050environment.
    51 The necessary files are collected in a tar-ball and placed
    52 at the target location. There its untared, the environment variables will
    53 be set and the Fortran code will be compiled.
    54 If the ECMWF environment is selected a job script is prepared and submitted
    55 for the remaining configurations after putting the tar-ball to the
     51The necessary files are collected in a tar ball and placed
     52at the target location. There, is is untared, the environment variables are
     53set, and the Fortran code is compiled.
     54If the ECMWF environment is selected, a job script is prepared and submitted
     55for the remaining configurations after putting the tar ball on the
    5656target ECMWF server.
    5757
     
    107107def get_install_cmdline_args():
    108108    '''Decomposes the command line arguments and assigns them to variables.
    109     Apply default values for non mentioned arguments.
     109    Apply default values for arguments not present.
    110110
    111111    Parameters
     
    127127    parser.add_argument("--makefile", dest="makefile",
    128128                        type=none_or_str, default=None,
    129                         help='Name of Makefile to use for compiling the '
     129                        help='Name of makefile for compiling the '
    130130                        'Fortran program')
    131131    parser.add_argument("--ecuid", dest="ecuid",
    132132                        type=none_or_str, default=None,
    133                         help='The user id at ECMWF.')
     133                        help='User id at ECMWF')
    134134    parser.add_argument("--ecgid", dest="ecgid",
    135135                        type=none_or_str, default=None,
    136                         help='The group id at ECMWF.')
     136                        help='Group id at ECMWF')
    137137    parser.add_argument("--gateway", dest="gateway",
    138138                        type=none_or_str, default=None,
    139                         help='The name of the local gateway server.')
     139                        help='Name of the local gateway server')
    140140    parser.add_argument("--destination", dest="destination",
    141141                        type=none_or_str, default=None,
    142                         help='The ecaccess association, e.g. '
     142                        help='ecaccess association, e.g. '
    143143                        'myUser@genericSftp')
    144144
    145145    parser.add_argument("--installdir", dest="installdir",
    146146                        type=none_or_str, default=None,
    147                         help='Root directory where '
    148                         'flex_extract will be installed to.')
     147                        help='Root directory of the '
     148                        'flex_extract installation')
    149149
    150150    # arguments for job submission to ECMWF, only needed by submit.py
    151151    parser.add_argument("--job_template", dest='job_template',
    152152                        type=none_or_str, default="job.template",
    153                         help='The rudimentary template file to create a batch '
    154                         'job template for submission to ECMWF servers.')
     153                        help='Rudimentary template file to create a batch '
     154                        'job template for submission to ECMWF servers')
    155155
    156156    parser.add_argument("--controlfile", dest="controlfile",
    157157                        type=none_or_str, default='CONTROL_EA5',
    158                         help="The file with all CONTROL parameters.")
     158                        help="A file that contains all CONTROL parameters.")
    159159
    160160    args = parser.parse_args()
     
    164164
    165165def install_via_gateway(c):
    166     '''Prepare data transfer to remote gate and submit a job script which will
    167     install everything on the remote gate.
     166    '''Prepare data transfer to remote gateway and submit a job script which will
     167    install everything on the remote gateway.
    168168
    169169    Parameters
     
    259259
    260260def check_install_conditions(c):
    261     '''Checks a couple of necessary attributes and conditions
    262     for the installation such as if they exist and contain values.
     261    '''Checks necessary attributes and conditions
     262    for the installation, e.g. whether they exist and contain values.
    263263    Otherwise set default values.
    264264
     
    310310    '''Creates a tarball with all necessary files which need to be sent to the
    311311    installation directory.
    312     It does not matter if this is local or remote.
    313     Collects all python files, the Fortran source and makefiles,
     312    It does not matter whether this is local or remote.
     313    Collects all Python files, the Fortran source and makefiles,
    314314    the ECMWF_ENV file, the CONTROL files as well as the
    315315    template files.
     
    497497    ----------
    498498    makefile : str
    499         Name of the makefile which should be used to compile FORTRAN
    500         CONVERT2 program.
     499        Name of the makefile which should be used to compile the Fortran
     500        program.
    501501
    502502    ecuid : str
     
    686686            print(perr.decode())
    687687            print('Please edit ' + makefile +
    688                   ' or try another Makefile in the src directory.')
     688                  ' or try another makefile in the src directory.')
    689689            print('Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB '
    690690                  'and EMOSLIB must be adapted.')
    691             print('Available Makefiles:')
    692             print(UioFiles(src_path, 'Makefile*'))
     691            print('Available makefiles:')
     692            print(UioFiles(src_path, 'makefile*'))
    693693            sys.exit('Compilation failed!')
    694694    except ValueError as e:
    695         print('ERROR: Makefile call failed:')
     695        print('ERROR: make of Fortran code failed:')
    696696        print(e)
    697697    else:
    698         execute_subprocess(['ls', '-l',
     698        execute_subprocess(['ls', '-l', 
    699699                            os.path.join(src_path, _config.FORTRAN_EXECUTABLE)],
    700700                           error_msg='FORTRAN EXECUTABLE COULD NOT BE FOUND!')
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG