Skip to content

Commit

Permalink
feat: add versioning of package to cli (#457)
Browse files Browse the repository at this point in the history
* add versioning of package to cli

* Update cli.py

* Update cli.py

---------

Co-authored-by: hung.duong <[email protected]>
  • Loading branch information
duongphannamhung and vtlbk authored Sep 30, 2023
1 parent bfb817d commit 9f7f141
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sqllineage/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
import logging.config
import warnings

from sqllineage import DEFAULT_DIALECT, DEFAULT_HOST, DEFAULT_LOGGING, DEFAULT_PORT
from sqllineage import (
DEFAULT_DIALECT,
DEFAULT_HOST,
DEFAULT_LOGGING,
DEFAULT_PORT,
NAME as MAIN_NAME,
VERSION as MAIN_VERSION,
)
from sqllineage.drawing import draw_lineage_graph
from sqllineage.runner import LineageRunner
from sqllineage.utils.constant import LineageLevel
Expand All @@ -23,6 +30,9 @@ def main(args=None) -> None:
parser = argparse.ArgumentParser(
prog="sqllineage", description="SQL Lineage Parser."
)
parser.add_argument(
"--version", action="version", version="%s %s" % (MAIN_NAME, MAIN_VERSION)
)
parser.add_argument(
"-e", metavar="<quoted-query-string>", help="SQL from command line"
)
Expand Down

0 comments on commit 9f7f141

Please sign in to comment.