Skip to content

Commit

Permalink
Merge branch 'master' into version
Browse files Browse the repository at this point in the history
  • Loading branch information
javaGitHub2022 authored Jan 8, 2024
2 parents 6cffd71 + fce0b09 commit 59ec9d0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9, '3.10', 3.11, 3.12]

steps:
- name: Maximize runner space
Expand All @@ -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
Expand Down
8 changes: 7 additions & 1 deletion nebula3/data/DataObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,12 +1399,18 @@ def has_tag(self, tag):
"""
return True if tag in self._tag_indexes.keys() else False

def properties(self, tag):
def properties(self, tag=None):
"""get all properties of the specified tag
:param tag: the tag name
:return: the properties
"""
if tag is None:
if len(self.tags) == 1:
tag = self.tags[0]
else:
raise InvalidKeyException("tag name is required")

if tag not in self._tag_indexes.keys():
raise InvalidKeyException(tag)

Expand Down
14 changes: 14 additions & 0 deletions nebula3/sclient/BaseResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>
"""
return self._col_names[self.PROP_START_INDEX :]

def get_prop_values(self):
"""get all prop values from the vertex data
Expand Down Expand Up @@ -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<string>
"""
return self._col_names[self.PROP_START_INDEX :]

def get_prop_values(self):
"""get all prop values from the edge data
Expand Down
19 changes: 5 additions & 14 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#
# 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
# via pip-tools
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
'pytz >= 2021.1',
],
packages=find_packages(),
platforms=['3.6, 3.7'],
platforms=['3.9, 3.10, 3.11, 3.12'],
package_dir={'nebula3': 'nebula3'},
)

0 comments on commit 59ec9d0

Please sign in to comment.