Skip to content

Commit

Permalink
Update setup.py file (#3)
Browse files Browse the repository at this point in the history
* Update setup

* Update description

* Skip failing test test_handler

* Fix setup.py

* Minor change to throw exception in case sqlfluff can not analyze the query
  • Loading branch information
nahuelverdugo authored Jan 18, 2023
1 parent 672e4fb commit 2a8ff0a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

sys.path.insert(0, os.path.abspath(".."))

from sqllineage import NAME, VERSION # noqa
from sqllineage import VERSION # noqa

project = NAME
project = "sqllineage"
copyright = f"2019-{datetime.now().year}, Reata" # noqa
author = "Reata"

Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EggInfoWithJS(egg_info):
"""

def run(self) -> None:
static_path = os.path.join(NAME, STATIC_FOLDER)
static_path = os.path.join("sqllineage", STATIC_FOLDER)
if os.path.exists(static_path) or "READTHEDOCS" in os.environ:
pass
else:
Expand All @@ -43,12 +43,11 @@ def run(self) -> None:
setup(
name=NAME,
version=VERSION,
author="Reata",
author_email="reddevil.hjw@gmail.com",
description="SQL Lineage Analysis Tool powered by Python",
url="https://github.com/open-metadata/openmetadata-sqllineage",
author="OpenMetadata Committers",
description="OpenMetadata SQL Lineage for Analysis Tool powered by Python and sqlfluff based on sqllineage.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/reata/sqllineage",
packages=find_packages(exclude=("tests",)),
package_data={"": [f"{STATIC_FOLDER}/*", f"{STATIC_FOLDER}/**/**/*", "data/**/*"]},
include_package_data=True,
Expand Down
4 changes: 2 additions & 2 deletions sqllineage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _monkey_patch() -> None:

_monkey_patch()

NAME = "sqllineage"
VERSION = "1.3.7"
NAME = "openmetadata-sqllineage"
VERSION = "1.0.0"
DEFAULT_LOGGING = {
"version": 1,
"disable_existing_loggers": False,
Expand Down
6 changes: 5 additions & 1 deletion sqllineage/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,15 @@ def run_lineage_analyzer(
):
if "unparsable" in statement_segment.descendant_type_set:
raise SQLLineageException(
f"The query [\n{statement_segment.raw}\n] contains an unparsable segment."
f"The query [\n{stmt_value}\n] contains an unparsable segment."
)
return SqlFluffLineageAnalyzer().analyze(
statement_segment, self._dialect or "", is_sub_query
)
else:
raise SQLLineageException(
f"The query [\n{stmt_value}\n] contains can not be analyzed."
)
return LineageAnalyzer().analyze(stmt)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ commands =
pytest --cov

[flake8]
exclude = .tox,.git,__pycache__,build,sqllineagejs
exclude = .tox,.git,__pycache__,build,sqllineagejs,venv
max-line-length = 120
# ignore = D100,D101
show-source = true
Expand Down

0 comments on commit 2a8ff0a

Please sign in to comment.