def parse_options():
    def parse_comma_list(option, opt, value, parser):
      setattr(parser.values, option.dest, value.split(','))

    parser = OptionParser("usage: %prog [options]",
                          description=HELP)
    parallel.populate_option_parser(parser)
    parser.add_option(
        "-e", "--experiment", action="store", dest="exp_filename",
        help="file containing an experiment definition")
    parser.add_option(
        "-c", "--configs", action="callback", type="string", 
        callback=parse_comma_list, dest="configurations",
        help="comma-separated list of configurations")
    parser.add_option(
        "-s", "--suite", action="callback", type="string", 
        callback=parse_comma_list, dest="suite",
        help="comma-separated list of tasks, domains or suites")
    parser.add_option(
        "-t", "--timeout", action="store", type=int, dest="timeout",
        help="timeout per task in seconds (default is 1800)")
    parser.add_option(
        "-m", "--memory", action="store", type=int, dest="memory",
        help="memory limit per task in MB (default is 2048)")
    parser.add_option(
        "-d", "--debug", action="store_true", dest="debug",
        help="quick test mode: run search executable compiled with debug information, " + \
        "translate and preprocess if necessary, always conduct fresh search, " + \
        "print output to screen")
    options, args = parser.parse_args()
    assert len(args) == 0
    return options
def parse_options():
    parser = OptionParser("usage: %prog [options] [INPUT ...]",
                          description=HELP)
    parallel.populate_option_parser(parser)
    parser.add_option(
        "--relax", help="generate relaxed problem",
        action="store_true", default=False, dest="relax")
    options, args = parser.parse_args()
    options.suite = suites.build_suite(args)
    return options
def parse_options():
    parser = OptionParser("usage: %prog [options] [INPUT ...]",
                          description=HELP)
    parallel.populate_option_parser(parser)
    parser.add_option("--relax",
                      help="generate relaxed problem",
                      action="store_true",
                      default=False,
                      dest="relax")
    options, args = parser.parse_args()
    options.suite = suites.build_suite(args)
    return options
Exemple #4
0
def parse_options():
    def parse_comma_list(option, opt, value, parser):
        setattr(parser.values, option.dest, value.split(','))

    parser = OptionParser("usage: %prog [options]", description=HELP)
    parallel.populate_option_parser(parser)
    parser.add_option("-e",
                      "--experiment",
                      action="store",
                      dest="exp_filename",
                      help="file containing an experiment definition")
    parser.add_option("-c",
                      "--configs",
                      action="callback",
                      type="string",
                      callback=parse_comma_list,
                      dest="configurations",
                      help="comma-separated list of configurations")
    parser.add_option("-s",
                      "--suite",
                      action="callback",
                      type="string",
                      callback=parse_comma_list,
                      dest="suite",
                      help="comma-separated list of tasks, domains or suites")
    parser.add_option("-t",
                      "--timeout",
                      action="store",
                      type=int,
                      dest="timeout",
                      help="timeout per task in seconds (default is 1800)")
    parser.add_option("-m",
                      "--memory",
                      action="store",
                      type=int,
                      dest="memory",
                      help="memory limit per task in MB (default is 2048)")
    parser.add_option(
        "-d", "--debug", action="store_true", dest="debug",
        help="quick test mode: run search executable compiled with debug information, " + \
        "translate and preprocess if necessary, always conduct fresh search, " + \
        "print output to screen")
    options, args = parser.parse_args()
    assert len(args) == 0
    return options