From 63d67ed3d05a16f30da02e5e674e1527550a71d2 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Tue, 2 Jan 2024 17:57:31 +0800 Subject: [PATCH 1/5] feat: Add get_prop_names methods for scan results --- nebula3/sclient/BaseResult.py | 14 ++++++++++++++ setup.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/nebula3/sclient/BaseResult.py b/nebula3/sclient/BaseResult.py index 28c7446a..38236582 100644 --- a/nebula3/sclient/BaseResult.py +++ b/nebula3/sclient/BaseResult.py @@ -81,6 +81,13 @@ def as_node(self): return Node(vertex).set_decode_type(self._decode_type) + def get_prop_names(self): + """get all prop names from the vertex data + + :return: list + """ + return self._col_names[self.PROP_START_INDEX :] + def get_prop_values(self): """get all prop values from the vertex data @@ -197,6 +204,13 @@ def as_relationship(self): return Relationship(edge).set_decode_type(self._decode_type) + def get_prop_names(self): + """get all prop names from the edge data + + :return: list + """ + return self._col_names[self.PROP_START_INDEX :] + def get_prop_values(self): """get all prop values from the edge data diff --git a/setup.py b/setup.py index 2e282025..33763958 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,6 @@ 'pytz >= 2021.1', ], packages=find_packages(), - platforms=['3.6, 3.7'], + platforms=['3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12'], package_dir={'nebula3': 'nebula3'}, ) From 64e40c9cd6840f451f1a4092114a61c05c36ead5 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Tue, 2 Jan 2024 18:55:28 +0800 Subject: [PATCH 2/5] tests: Add more Python versions --- .github/workflows/run_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index 89bf4866..cbe61c72 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] steps: - name: Maximize runner space @@ -24,7 +24,7 @@ jobs: remove-dotnet: 'true' remove-android: 'true' remove-haskell: 'true' - + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 8a3481a696ce3e4f0c349888800627bc1ce7e504 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Wed, 3 Jan 2024 15:28:19 +0800 Subject: [PATCH 3/5] fix Python test version 3.10 --- .github/workflows/run_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index cbe61c72..a4ced316 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] + python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12] steps: - name: Maximize runner space From c95af5d25f99631be63e9453030e9d302a7ea96f Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Fri, 5 Jan 2024 16:28:16 +0800 Subject: [PATCH 4/5] Update dev.txt --- requirements/dev.txt | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index f4e2f5ad..187b4d3c 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,10 +1,9 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile requirements/dev.in # - attrs==23.1.0 # via pytest build==1.0.3 @@ -12,12 +11,12 @@ build==1.0.3 click==8.1.7 # via pip-tools coverage[toml]==7.2.7 - # via pytest-cov -importlib-metadata==6.7.0 - # via build + # via + # coverage + # pytest-cov iniconfig==2.0.0 # via pytest -numpy==1.21.6 +numpy==1.26.3 # via pandas packaging==23.2 # via @@ -49,18 +48,10 @@ six==1.16.0 # via python-dateutil toml==0.10.2 # via pytest -tomli==2.0.1 - # via - # build - # coverage - # pip-tools - # pyproject-hooks wcwidth==0.2.8 # via prettytable wheel==0.41.2 # via pip-tools -zipp==3.15.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip From 3c45144a382ac3067421cdd9909ec08985437555 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Fri, 5 Jan 2024 16:38:46 +0800 Subject: [PATCH 5/5] Drop Python 3.6 3.7 3.8 --- .github/workflows/run_test.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index a4ced316..ce790c10 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12] + python-version: [3.9, '3.10', 3.11, 3.12] steps: - name: Maximize runner space diff --git a/setup.py b/setup.py index 33763958..7bc39bea 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,6 @@ 'pytz >= 2021.1', ], packages=find_packages(), - platforms=['3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12'], + platforms=['3.9, 3.10, 3.11, 3.12'], package_dir={'nebula3': 'nebula3'}, )