How to use the logmuse.add_logging_options function in logmuse

To help you get started, we’ve selected a few logmuse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pepkit / peppy / peppy / cli.py View on Github external
def main():
    """ Primary workflow """
    parser = logmuse.add_logging_options(build_argparser())
    args, remaining_args = parser.parse_known_args()
    if not args.command:
        parser.print_help()
        _LOGGER.error("No command given")
        sys.exit(1)
    _LOGGER.debug("Creating a Project object from: {}".format(args.pep))
    p = Project(args.pep)
    if args.command == VALIDATE_CMD:
        if args.sample_name:
            try:
                args.sample_name = int(args.sample_name)
            except ValueError:
                pass
            _LOGGER.debug("Comparing Sample ('{}') in the Project "
                          "('{}') against a schema: {}.".
                          format(args.sample_name, args.pep, args.schema))
github databio / refgenie / refgenie / refgenie.py View on Github external
def main():
    """ Primary workflow """
    parser = logmuse.add_logging_options(build_argparser())
    args, remaining_args = parser.parse_known_args()
    global _LOGGER
    _LOGGER = logmuse.logger_via_cli(args, make_root=True)
    _LOGGER.debug("refgenie {}".format(__version__))
    _LOGGER.debug("Args: {}".format(args))

    if not args.command:
        parser.print_help()
        _LOGGER.error("No command given")
        sys.exit(1)

    gencfg = refgenconf.select_genome_config(filename=args.genome_config, check_exist=not args.command == INIT_CMD,
                                             on_missing=lambda fp: fp, strict_env=True)
    if gencfg is None:
        raise MissingGenomeConfigError(args.genome_config)
    _LOGGER.debug("Determined genome config: {}".format(gencfg))
github databio / pepatac / tools / bamSitesToWig.py View on Github external
help="Output the 3' end of the sequence read. Default: False")
    parser.add_argument('-m', '--mode', dest='mode', default=None, choices=MODES,
        help="Turn on DNase or ATAC mode (this adjusts the shift parameters)")
    parser.add_argument('-t', '--limit', dest='limit',
        help="Limit to these chromosomes", nargs = "+", default=None)
    parser.add_argument('-p', '--cores', dest='cores',
        help="Number of cores to use", default=2, type=int)
    parser.add_argument('-e', '--temp-parent',
        default="",#os.getcwd(),
        help="Temporary file location. By default it will use the working"
        " directory, but you can place this elsewhere if you'd like."
        " The actual folder will be based on the exactbw filename.")
    parser.add_argument('--retain-temp', action='store_true', default=False,
        help="Retain temporary files? Default: False")

    parser = add_logging_options(parser)
    return parser.parse_args(cmdl)

logmuse

Logging setup

BSD-2-Clause
Latest version published 8 months ago

Package Health Score

53 / 100
Full package analysis

Similar packages