From cf1ab6d179c70c0f43156cc499332c465226cb45 Mon Sep 17 00:00:00 2001 From: Tao Feng Date: Fri, 21 Aug 2020 12:59:07 -0700 Subject: [PATCH] fix: get all tags should work for all resources (#175) Signed-off-by: Tao Feng --- metadata_service/proxy/neo4j_proxy.py | 4 ++-- requirements.txt | 5 +++-- setup.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/metadata_service/proxy/neo4j_proxy.py b/metadata_service/proxy/neo4j_proxy.py index 035901c4..08cc0349 100644 --- a/metadata_service/proxy/neo4j_proxy.py +++ b/metadata_service/proxy/neo4j_proxy.py @@ -673,8 +673,8 @@ def get_tags(self) -> List: # todo: Currently all the tags are default type, we could open it up if we want to include badge query = textwrap.dedent(""" MATCH (t:Tag{tag_type: 'default'}) - OPTIONAL MATCH (tbl:Table)-[:TAGGED_BY]->(t) - RETURN t as tag_name, count(distinct tbl.key) as tag_count + OPTIONAL MATCH (resource)-[:TAGGED_BY]->(t) + RETURN t as tag_name, count(distinct resource.key) as tag_count """) records = self._execute_cypher_query(statement=query, diff --git a/requirements.txt b/requirements.txt index b61321ae..48da3063 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ mock==2.0.0 # Mypy is an optional static type checker for Python. # License: MIT # Upstream url: https://github.com/python/mypy -mypy==0.660 +mypy==0.782 # Thin-wrapper around the mock package for easier use with py.test. # License: MIT @@ -60,7 +60,7 @@ marshmallow-annotations==2.4.0 MarkupSafe==1.1 pytz==2018.4 six==1.11.0 -Werkzeug==0.15.3 +Werkzeug==0.15.5 wheel==0.33.1 neo4j==1.7.6 neotime==1.7.1 @@ -72,3 +72,4 @@ beaker>=1.10.0 mocket==3.7.3 overrides==2.5 websocket-client==0.56.0 +typed-ast==1.4.1 diff --git a/setup.py b/setup.py index 896bab86..0f1d0f16 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages -__version__ = '2.5.4' +__version__ = '2.5.5' requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')