File: test_options.py

package info (click to toggle)
python-easydev 0.13.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: python: 1,904; makefile: 116; javascript: 49
file content (34 lines) | stat: -rw-r--r-- 874 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import argparse

from easydev import SmartFormatter


class Options(argparse.ArgumentParser):
    def __init__(self, prog="test"):
        usage = """standalone test"""
        description = """blabla"""
        super(Options, self).__init__(usage=usage, prog=prog, description=description, formatter_class=SmartFormatter)
        self.add_argument(
            "--config-params",
            dest="config_params",
            type=str,
            help="""FORMAT|Overwrite any field in the config file by using
the following convention. A config file is in YAML format
and has a hierarchy of parametesr. For example:

    samples:
        file1: R1.fastq.gz
        file2: R2.fastq.gz
    bwa_mem_phix:
        mem:
            threads: 2
        """,
        )


def test():
    options = Options()
    try:
        options.parse_args(["--help"])
    except:
        pass