Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add versioning of package to cli #457

Merged
merged 3 commits into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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