コード例 #1
0
class ConfigTree(Config):
    """
    Parameters to configure the parameters of a tree to show
    """
    roots = ParamCreator.create_list_str(help_string="roots to output", )
    parent_column = ParamCreator.create_int(help_string="parent column", )
    child_column = ParamCreator.create_int(help_string="child column", )
コード例 #2
0
class ConfigWeightValue(Config):
    """
    Config weight and Value
    """
    weight_column = ParamCreator.create_int(
        help_string="what column to determine weight by", )
    value_column = ParamCreator.create_int(
        help_string="what is the value column", )
コード例 #3
0
class ConfigMajority(Config):
    """
    Config the parameters for the majority algorithm
    """
    input_first_column = ParamCreator.create_int(help_string="first column", )
    input_second_column = ParamCreator.create_int(
        help_string="second column", )
    input_multiplication_column = ParamCreator.create_int(
        help_string="multiplication column", )
コード例 #4
0
class ConfigJoin(Config):
    """
    Parameters to configure a TSV join operation
    """
    hash_file = ParamCreator.create_existing_file(help_string="hash file", )
    hash_key_column = ParamCreator.create_int(
        help_string="column to match on in the hash file", )
    hash_value_column = ParamCreator.create_int(
        help_string="value to get from the hash file", )
    input_key_column = ParamCreator.create_int(
        help_string="column to match on in the input file", )
    output_insert_column = ParamCreator.create_int(
        help_string=
        "column to insert at in the first file to create the output file", )
    output_add_unknown = ParamCreator.create_bool(
        help_string="add UNKNOWN when there is no match or drop", )
コード例 #5
0
class ConfigBucketNumber(Config):
    """
    Parameters to configure the bucket number for a histogram
    """
    bucket_number = ParamCreator.create_int(
        help_string="what column to histogram",
        default=10,
    )
コード例 #6
0
class ConfigDemo(Config):
    """
    Parameters to control ...
    """
    map_size = ParamCreator.create_int(
        help_string="Which size of mmap to use?",
        default=1000000000000,
    )
コード例 #7
0
ファイル: configs.py プロジェクト: veltzer/pyunique
class ConfigLMDB(Config):
    """
    Parameters that control working with LMDB (experts only)
    """
    map_size = ParamCreator.create_int(
        help_string="Which size of mmap to use?",
        default=1000000000000,
    )
    buffers = ParamCreator.create_bool(
        help_string="Should we use buffers? (lmdb default is False)",
        default=False,
    )
コード例 #8
0
class ConfigParallel(Config):
    """
    Parameters to configure how thing should run in parallel
    """
    parallel = ParamCreator.create_bool(
        help_string="do things in parallel?",
        default=False,
    )
    jobs = ParamCreator.create_int(
        help_string="how many jobs to run in parallel",
        default=multiprocessing.cpu_count(),
    )
コード例 #9
0
class ConfigAlgo(Config):
    """
    Parameters for interval monitors
    """
    interval = ParamCreator.create_int(
        default=60,
        help_string="interval to monitor",
    )
    watermark_max = ParamCreator.create_int_or_none(
        default=70,
        help_string="max watermark for disk utilization",
    )
    volume_max_size = ParamCreator.create_int(
        default=2000,
        help_string="Maximum disk size beyond which never extend",
    )
    # watermark_min = ParamCreator.create_int_or_none(
    #    default=None,
    #    help_string="min watermark for disk utilization",
    # )
    disregard = ParamCreator.create_list_str(
        default=["/"],
        help_string="what mount points to disregard",
    )
    file_systems = ParamCreator.create_list_str(
        default=["ext4", "xfs"],
        help_string="what file systems to check",
    )
    increase_percent = ParamCreator.create_int(
        default=50,
        help_string="By how much to increase (in percentiles)",
    )
    increase_max_gb = ParamCreator.create_int(
        default=100,
        help_string="never increase by more than (in GB)",
    )
    dryrun = ParamCreator.create_bool(
        default=False,
        help_string="Should we dry run the actual operations?",
    )
コード例 #10
0
ファイル: configs.py プロジェクト: veltzer/pygooglehelper
class ConfigAuth(Config):
    force = ParamCreator.create_bool(
        help_string="Should we force creation of a new auth token",
        default=False,
    )
    # parameters passed to run_local_server
    host = ParamCreator.create_str(
        help_string=
        "The hostname for the local redirect server. This will be served over http, not https",
        default='localhost',
    )
    port = ParamCreator.create_int(
        help_string="The port for the local redirect server",
        # default=8080,
        default=0,
    )
    # noinspection PyProtectedMember
    authorization_prompt_message = ParamCreator.create_str(
        help_string=
        "The message to display to tell the user to navigate to the authorization URL",
        # default=InstalledAppFlow._DEFAULT_AUTH_PROMPT_MESSAGE,
        default="",
    )
コード例 #11
0
class ConfigSampleByTwoColumns(Config):
    """
    Parameters for the sample by column command
    """
    group_column = ParamCreator.create_int(
        help_string="what column to determine group by", )
コード例 #12
0
class ConfigSampleColumn(Config):
    """
    Configuration options for sampling
    """
    sample_column = ParamCreator.create_int(
        help_string="what column to sample by", )
コード例 #13
0
class ConfigSampleSize(Config):
    """
    Configure sample size
    """
    size = ParamCreator.create_int(
        help_string="what sample size do you need?", )
コード例 #14
0
class ConfigColumn(Config):
    """
    Parameters to select which column to work on
    """
    column = ParamCreator.create_int(
        help_string="column to use (list of numbers separated by comma)", )
コード例 #15
0
ファイル: test_basic.py プロジェクト: veltzer/pytconf
class ConfigTotal(Config):
    """
    Parameters to select the total number of items to fetch
    """

    num = ParamCreator.create_int(default=10, help_string="help for num")