Skip to content

Commit

Permalink
Init CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Apr 22, 2024
1 parent 2e0134f commit 88319c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/clive/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""clive"""
25 changes: 25 additions & 0 deletions src/clive/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Command line interface for clive"""

import logging

import click

@click.group()
@click.option("-v", "--verbose", count=True)
@click.option("-q", "--quiet")
def main(verbose: int, quiet: bool, cache_db: str, skip_annotator):
"""CLI for clive.
:param verbose: Verbosity while running.
:param quiet: Boolean to be quiet or verbose.
"""
logger = logging.getLogger()
if verbose >= 2:
logger.setLevel(level=logging.DEBUG)
elif verbose == 1:
logger.setLevel(level=logging.INFO)
else:
logger.setLevel(level=logging.WARNING)
if quiet:
logger.setLevel(level=logging.ERROR)
logger.info(f"Logger {logger.name} set to level {logger.level}")

0 comments on commit 88319c0

Please sign in to comment.