diff --git a/qsubsec/scripts.py b/qsubsec/scripts.py index 7e11ac1..23ab172 100644 --- a/qsubsec/scripts.py +++ b/qsubsec/scripts.py @@ -15,7 +15,7 @@ from qsubsec.sections import SectionList, Limits, CommandType from qsubsec.templates import Template from qsubsec.sectionSubmitter import outputSubmitterProc, outputSubmitterShell -import qsubsec.sectionFormatter +import qsubsec.sectionFormatter from collections import OrderedDict import os import os.path @@ -66,7 +66,7 @@ def loadRCFile(filename=None): except: ns = argparse.Namespace() return ns -def qsubsec(): +def qsmain(): # Define the defaults: defaults = {'verbosity_level':'warning', 'submission_format':'qsub', 'submission_timeout':None, 'url_encoding':'UTF-8'} # Create the command line interface: @@ -156,7 +156,7 @@ def printJSON(x): print(json.dumps(x, indent='\t')) tokens.extend(ts_new) except qstokens.MissingTokenError as err: error(log, 'missing tokens "{}" in file "{}"'.format('", "'.join(err.tokens), f_path)) except BaseException as err: error(log, str(err)) - + # Execute the template to yield the sections: log.info('executing template') try: template.execute(tokens) @@ -243,10 +243,10 @@ def printJSON(x): print(json.dumps(x, indent='\t')) exit(0) # Process the commands through the specified output formatter: - if args.submission_format == 'qsub': formatter = sectionFormatter.QSUBFormatter - elif args.submission_format == 'bsub': formatter = sectionFormatter.LSFFormatter - elif args.submission_format == 'bash': formatter = sectionFormatter.BashFormatter - elif args.submission_format == 'pbash': formatter = sectionFormatter.BashFormatter + if args.submission_format == 'qsub': formatter = qsubsec.sectionFormatter.QSUBFormatter + elif args.submission_format == 'bsub': formatter = qsubsec.sectionFormatter.LSFFormatter + elif args.submission_format == 'bash': formatter = qsubsec.sectionFormatter.BashFormatter + elif args.submission_format == 'pbash': formatter = qsubsec.sectionFormatter.BashFormatter else: error(log, 'no formatter for submission format {}'.format(args.submission_format)) log.info('submission format is {}'.format(args.submission_format)) if args.submit is False: diff --git a/qsubsec/version.py b/qsubsec/version.py index 5ac359b..aa0831c 100644 --- a/qsubsec/version.py +++ b/qsubsec/version.py @@ -1,2 +1,2 @@ __all__ = ['__version__'] -__version__ = '3.0a27' +__version__ = '3.0a28' diff --git a/setup.py b/setup.py index 8e53bda..1d9b85f 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ python_requires = '>=3', entry_points = { 'console_scripts': [ - 'qsubsec=qsubsec.scripts:qsubsec', + 'qsubsec=qsubsec.scripts:qsmain', 'parse-tff=qsubsec.scripts:parseTFF', 'update-template=qsubsec.scripts:updateTemplate' ]