Skip to content

Commit

Permalink
adding versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
buehlere committed Feb 21, 2024
1 parent ae47489 commit 7dd800a
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions postprocessing_variant_calls/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import logging
import time

# setup logger
logger = logging.getLogger("filter")
# app
app = typer.Typer()

# Vardict filter App
Expand All @@ -34,6 +33,26 @@
help="operations for manipulating maf files based on a given input.",
)

# versioning
__version__ = "0.2.4"


def version_callback(value: bool):
if value:
typer.echo(f"pv: {__version__}")
raise typer.Exit()


@app.callback()
def main(
version: bool = typer.Option(
None, "--version", callback=version_callback, is_eager=True
),
):
# Do other global stuff, handle other global options here
return


# Main App
if __name__ == "__main__":
app()

0 comments on commit 7dd800a

Please sign in to comment.