Skip to content

Commit

Permalink
fix(interactive): Correct the improper use of ModelProperty (#4276)
Browse files Browse the repository at this point in the history
- Field  `type` is not needed.
- Fix python/c++ code format. Somehow the
PRhttps://github.com//pull/4272 didn't reveal these
problems
  • Loading branch information
zhanglei1949 authored Oct 8, 2024
1 parent c2c98c4 commit 728bca0
Show file tree
Hide file tree
Showing 23 changed files with 366 additions and 404 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,10 @@ jobs:
python3 -m black --check --diff .
python3 -m flake8 .
popd
pushd flex/interactive/sdk/python/gs_interactive
pushd flex/interactive/sdk/python
python3 -m isort --check --diff .
python3 -m black --check --diff .
# only check client and tests, to avoid checking generated code under api, client/generated, etc.
python3 -m flake8 ./client
python3 -m flake8 ./tests
python3 -m flake8 .
popd
- name: Generate Docs
Expand Down
8 changes: 4 additions & 4 deletions docs/flex/interactive/development/python/VertexApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ vertex_request = [
label="person",
primary_key_value=8,
properties=[
ModelProperty(name="name", type="string", value="mike"),
ModelProperty(name="age", type="integer", value=12),
ModelProperty(name="name",value="mike"),
ModelProperty(name="age", value=12),
],
),
]
Expand Down Expand Up @@ -172,8 +172,8 @@ vertex_request = VertexRequest(
label="person",
primary_key_value=1,
properties=[
ModelProperty(name="name", type="string", value="Cindy"),
ModelProperty(name="age", type="integer", value=24),
ModelProperty(name="name", value="Cindy"),
ModelProperty(name="age", value=24),
],
)
# update vertex
Expand Down
2 changes: 1 addition & 1 deletion flex/engines/graph_db/grin/src/property/property.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void grin_destroy_vertex_property(GRIN_GRAPH g, GRIN_VERTEX_PROPERTY vp) {}
*/
GRIN_DATATYPE grin_get_vertex_property_datatype(GRIN_GRAPH g,
GRIN_VERTEX_PROPERTY vp) {
return (GRIN_DATATYPE) (vp >> 16);
return (GRIN_DATATYPE)(vp >> 16);
}

int grin_get_vertex_property_value_of_int32(GRIN_GRAPH g, GRIN_VERTEX v,
Expand Down
Loading

0 comments on commit 728bca0

Please sign in to comment.