diff --git a/.gitignore b/.gitignore
index 5c6d43dca071..0a66e390f147 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,7 +121,11 @@ flex/interactive/sdk/java/.openapi-generator/*
flex/interactive/sdk/java/src/main/AndroidManifest.xml
flex/interactive/sdk/java/.openapi-generate/
flex/interactive/sdk/java/settings.gradle
-flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/openapi/
+flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/models/
+flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/api/
+flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/auth/
+flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/*.java
+
flex/interactive/sdk/python/.github/
flex/interactive/sdk/python/.gitignore
@@ -133,8 +137,16 @@ flex/interactive/sdk/python/dist/
flex/interactive/sdk/python/.travis.yml
flex/interactive/sdk/python/tox.ini
flex/interactive/sdk/python/pyproject.toml
-flex/interactive/sdk/python/interactive_sdk/openapi/
-!flex/interactive/sdk/python/interactive_sdk/client/generated/__init__.py
+flex/interactive/sdk/python/gs_interactive/models/
+flex/interactive/sdk/python/gs_interactive/api/
+flex/interactive/sdk/python/gs_interactive/__init__.py
+flex/interactive/sdk/python/gs_interactive/api_client.py
+flex/interactive/sdk/python/gs_interactive/api_response.py
+flex/interactive/sdk/python/gs_interactive/configuration.py
+flex/interactive/sdk/python/gs_interactive/exceptions.py
+flex/interactive/sdk/python/gs_interactive/py.typed
+flex/interactive/sdk/python/gs_interactive/rest.py
+!flex/interactive/sdk/python/gs_interactive/client/generated/__init__.py
**/.cache/
diff --git a/coordinator/gscoordinator/flex/core/interactive/hqps.py b/coordinator/gscoordinator/flex/core/interactive/hqps.py
index bdecb16953c6..56430ed95792 100644
--- a/coordinator/gscoordinator/flex/core/interactive/hqps.py
+++ b/coordinator/gscoordinator/flex/core/interactive/hqps.py
@@ -24,13 +24,13 @@
from typing import List
from typing import Union
-import interactive_sdk.openapi
+import gs_interactive
import requests
-from interactive_sdk.openapi import CreateGraphRequest
-from interactive_sdk.openapi import CreateProcedureRequest
-from interactive_sdk.openapi import SchemaMapping
-from interactive_sdk.openapi import StartServiceRequest
-from interactive_sdk.openapi import UpdateProcedureRequest
+from gs_interactive.models.create_graph_request import CreateGraphRequest
+from gs_interactive.models.create_procedure_request import CreateProcedureRequest
+from gs_interactive.models.schema_mapping import SchemaMapping
+from gs_interactive.models.start_service_request import StartServiceRequest
+from gs_interactive.models.update_procedure_request import UpdateProcedureRequest
from gscoordinator.flex.core.config import CLUSTER_TYPE
from gscoordinator.flex.core.config import HQPS_ADMIN_SERVICE_PORT
@@ -85,10 +85,10 @@ def _get_hqps_service_endpoints(self):
return f"http://127.0.0.1:{HQPS_ADMIN_SERVICE_PORT}"
def list_graphs(self) -> List[dict]:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
graphs = [g.to_dict() for g in api_instance.list_graphs()]
@@ -102,23 +102,23 @@ def list_graphs(self) -> List[dict]:
g["data_update_time"] = encode_datetime(
datetime.datetime.fromtimestamp(g["data_update_time"] / 1000)
)
- # `schema_update_time` is same to `creation_time` in Interactive
+ # `schema_update_time` is same to `creation_time` in gs_interactive
g["schema_update_time"] = g["creation_time"]
if "edge_types" not in g["schema"]:
g["schema"]["edge_types"] = []
if "vertex_types" not in g["schema"]:
g["schema"]["vertex_types"] = []
- # we do not have edge's primary key in Interactive
+ # we do not have edge's primary key in gs_interactive
for edge in g["schema"]["edge_types"]:
if "primary_keys" not in edge:
edge["primary_keys"] = []
return graphs
def get_schema_by_id(self, graph_id: str) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
schema = api_instance.get_schema(graph_id).to_dict()
@@ -129,30 +129,30 @@ def get_schema_by_id(self, graph_id: str) -> dict:
return schema
def create_graph(self, graph: dict) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
response = api_instance.create_graph(CreateGraphRequest.from_dict(graph))
return response.to_dict()
def delete_graph_by_id(self, graph_id: str) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
rlt = api_instance.delete_graph(graph_id)
return rlt
def get_graph_by_id(self, graph_id: str) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
g = api_instance.get_graph(graph_id).to_dict()
@@ -196,10 +196,10 @@ def delete_edge_type_by_name(
raise RuntimeError("Create vertex type is not supported yet!")
def create_stored_procedure(self, graph_id: str, stored_procedure: dict) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceProcedureManagementApi(
+ api_instance = gs_interactive.AdminServiceProcedureManagementApi(
api_client
)
response = api_instance.create_procedure(
@@ -210,11 +210,11 @@ def create_stored_procedure(self, graph_id: str, stored_procedure: dict) -> dict
return response
def list_stored_procedures(self, graph_id: str) -> List[dict]:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
stored_procedures = []
- api_instance = interactive_sdk.openapi.AdminServiceProcedureManagementApi(
+ api_instance = gs_interactive.AdminServiceProcedureManagementApi(
api_client
)
stored_procedures = [
@@ -225,10 +225,10 @@ def list_stored_procedures(self, graph_id: str) -> List[dict]:
def update_stored_procedure_by_id(
self, graph_id: str, stored_procedure_id: str, stored_procedure: dict
) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceProcedureManagementApi(
+ api_instance = gs_interactive.AdminServiceProcedureManagementApi(
api_client
)
return api_instance.update_procedure(
@@ -240,10 +240,10 @@ def update_stored_procedure_by_id(
def delete_stored_procedure_by_id(
self, graph_id: str, stored_procedure_id: str
) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceProcedureManagementApi(
+ api_instance = gs_interactive.AdminServiceProcedureManagementApi(
api_client
)
return api_instance.delete_procedure(graph_id, stored_procedure_id)
@@ -251,10 +251,10 @@ def delete_stored_procedure_by_id(
def get_stored_procedure_by_id(
self, graph_id: str, stored_procedure_id: str
) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceProcedureManagementApi(
+ api_instance = gs_interactive.AdminServiceProcedureManagementApi(
api_client
)
return api_instance.get_procedure(graph_id, stored_procedure_id).to_dict()
@@ -263,10 +263,10 @@ def list_service_status(self) -> List[dict]:
# get service status from serving graph
serving_graph_id = None
rlts = []
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceServiceManagementApi(
+ api_instance = gs_interactive.AdminServiceServiceManagementApi(
api_client
)
response = api_instance.get_service_status()
@@ -304,37 +304,37 @@ def list_service_status(self) -> List[dict]:
return rlts
def stop_service(self) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceServiceManagementApi(
+ api_instance = gs_interactive.AdminServiceServiceManagementApi(
api_client
)
return api_instance.stop_service()
def restart_service(self) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceServiceManagementApi(
+ api_instance = gs_interactive.AdminServiceServiceManagementApi(
api_client
)
return api_instance.restart_service()
def start_service(self, graph_id: str) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceServiceManagementApi(
+ api_instance = gs_interactive.AdminServiceServiceManagementApi(
api_client
)
return api_instance.start_service(StartServiceRequest(graph_id=graph_id))
def list_jobs(self) -> List[dict]:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceJobManagementApi(
+ api_instance = gs_interactive.AdminServiceJobManagementApi(
api_client
)
rlt = []
@@ -351,10 +351,10 @@ def list_jobs(self) -> List[dict]:
return rlt
def get_job_by_id(self, job_id: str) -> dict:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceJobManagementApi(
+ api_instance = gs_interactive.AdminServiceJobManagementApi(
api_client
)
job_status = api_instance.get_job_by_id(job_id).to_dict()
@@ -368,10 +368,10 @@ def get_job_by_id(self, job_id: str) -> dict:
return job_status
def delete_job_by_id(self, job_id: str) -> str:
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceJobManagementApi(
+ api_instance = gs_interactive.AdminServiceJobManagementApi(
api_client
)
return api_instance.delete_job_by_id(job_id)
@@ -402,10 +402,10 @@ def submit_dataloading_job(
self._job_config[graph_id] = config
self.dump_to_disk()
# submit
- with interactive_sdk.openapi.ApiClient(
- interactive_sdk.openapi.Configuration(self._hqps_endpoint)
+ with gs_interactive.ApiClient(
+ gs_interactive.Configuration(self._hqps_endpoint)
) as api_client:
- api_instance = interactive_sdk.openapi.AdminServiceGraphManagementApi(
+ api_instance = gs_interactive.AdminServiceGraphManagementApi(
api_client
)
response = api_instance.create_dataloading_job(
diff --git a/coordinator/requirements.txt b/coordinator/requirements.txt
index 81ca44de0fe1..97e793f31558 100644
--- a/coordinator/requirements.txt
+++ b/coordinator/requirements.txt
@@ -20,4 +20,4 @@ typing-extensions >= 4.7.1
click >= 8.1.7
psutil
schedule
-interactive-sdk == 0.0.3
+gs_interactive == 0.3
diff --git a/docs/flex/interactive/custom_graph_data.md b/docs/flex/interactive/custom_graph_data.md
index a4e640790ef2..1b736fcb29c3 100644
--- a/docs/flex/interactive/custom_graph_data.md
+++ b/docs/flex/interactive/custom_graph_data.md
@@ -20,7 +20,7 @@ To create a new graph, you will need the original data of the graph. We currentl
To begin, ensure you've adjusted the settings in the `{INTERACTIVE_HOME}/conf/interactive.yaml` file. By utilizing Docker's volume mount feature, you can map an external folder containing the CSV files of `movies` to the internal directory at `/home/graphscope/movies`. It's crucial that the internal data path starts with `/home/graphscope` and concludes with `movies`, reflecting the name of your graph. If you're looking to import custom data, you can do volume mapping in a similar way.
```yaml
-version: v0.0.3
+version: v0.3
volume:
# replace INTERACTIVE_HOME with actual path.
- {INTERACTIVE_HOME}/examples/movies:/home/graphscope/movies
diff --git a/docs/flex/interactive/development/java/java_sdk.md b/docs/flex/interactive/development/java/java_sdk.md
index 8371f57c20b8..fc44c8032b25 100644
--- a/docs/flex/interactive/development/java/java_sdk.md
+++ b/docs/flex/interactive/development/java/java_sdk.md
@@ -35,7 +35,7 @@ Add this dependency to your project's POM:
com.alibaba.graphscope
interactive-sdk
- 0.0.3
+ 0.3
compile
```
@@ -50,7 +50,7 @@ mvn clean package
Then manually install the following JARs:
-* `target/interactive-sdk-0.0.3.jar`
+* `target/interactive-sdk-0.3.jar`
* `target/lib/*.jar`
## Getting Started
diff --git a/flex/interactive/bin/gs_interactive b/flex/interactive/bin/gs_interactive
index 64bbc6c2e29e..6b9043ee0fc3 100755
--- a/flex/interactive/bin/gs_interactive
+++ b/flex/interactive/bin/gs_interactive
@@ -242,7 +242,7 @@ DOCKER_DB_GEN_BIN="${DOCKER_DB_GRAPHSCOPE_HOME}/bin/load_plan_and_gen.sh"
HOST_DB_TMP_DIR="/tmp/"
#################### DEFINE DEFAULT CONSTANTS ####################
-DATABASE_VERSION="v0.0.3"
+DATABASE_VERSION="v0.3"
DATABASE_DEFAULT_GRAPH_NAME="gs_interactive_default_graph"
DATABASE_CURRENT_GRAPH_NAME=${DATABASE_DEFAULT_GRAPH_NAME}
DATABASE_DEFAULT_GRAPH_DOCKER_PATH="/home/graphscope/${DATABASE_DEFAULT_GRAPH_NAME}"
diff --git a/flex/interactive/conf/interactive.yaml b/flex/interactive/conf/interactive.yaml
index 15db114bf593..6897acaf5363 100755
--- a/flex/interactive/conf/interactive.yaml
+++ b/flex/interactive/conf/interactive.yaml
@@ -1,3 +1,3 @@
-version: v0.0.3
+version: v0.3
#volume:
# - {HOST_PATH}:${CONTAINER_PATH}
\ No newline at end of file
diff --git a/flex/interactive/sdk/README.md b/flex/interactive/sdk/README.md
index bac9d7bc4310..b7aad1122e19 100644
--- a/flex/interactive/sdk/README.md
+++ b/flex/interactive/sdk/README.md
@@ -6,15 +6,15 @@ GraphScope Interactive use [OpenAPI](https://openapis.org) to define the http in
To use Interactive Python SDK
```bash
-pip3 install interactive-sdk==0.0.3
+pip3 install interactive==0.3
```
To use Interactive Java SDK
```xml
com.alibaba.graphscope
- interactive-sdk
- 0.0.3
+ interactive
+ 0.3
```
@@ -41,9 +41,9 @@ export OPENAPI_GENERATOR_VERSION=7.2.0
### Generate SDKs
```bash
-# generate java sdk to java/interactive_sdk/
+# generate java sdk to java/
bash generate_sdk.sh -g java
-# generate python sdk to python/interactive_sdk/
+# generate python sdk to python/interactive/
bash generate_sdk.sh -g python
```
diff --git a/flex/interactive/sdk/examples/java/interactive-sdk-example/pom.xml b/flex/interactive/sdk/examples/java/interactive-example/pom.xml
similarity index 82%
rename from flex/interactive/sdk/examples/java/interactive-sdk-example/pom.xml
rename to flex/interactive/sdk/examples/java/interactive-example/pom.xml
index 0deabc12e665..bb5f4a2b659c 100644
--- a/flex/interactive/sdk/examples/java/interactive-sdk-example/pom.xml
+++ b/flex/interactive/sdk/examples/java/interactive-example/pom.xml
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.alibaba.graphscope
- interactive-sdk-example
+ interactive-example
jar
1.0-SNAPSHOT
@@ -17,13 +17,13 @@
- interactive-sdk-example
+ interactive-example
http://maven.apache.org
com.alibaba.graphscope
- interactive-sdk
- 0.0.3
+ interactive
+ 0.3
diff --git a/flex/interactive/sdk/examples/java/interactive-sdk-example/src/main/java/com/alibaba/graphscope/BasicExample.java b/flex/interactive/sdk/examples/java/interactive-example/src/main/java/com/alibaba/graphscope/BasicExample.java
similarity index 99%
rename from flex/interactive/sdk/examples/java/interactive-sdk-example/src/main/java/com/alibaba/graphscope/BasicExample.java
rename to flex/interactive/sdk/examples/java/interactive-example/src/main/java/com/alibaba/graphscope/BasicExample.java
index 4ddd27ccb476..dc2fde324ebe 100644
--- a/flex/interactive/sdk/examples/java/interactive-sdk-example/src/main/java/com/alibaba/graphscope/BasicExample.java
+++ b/flex/interactive/sdk/examples/java/interactive-example/src/main/java/com/alibaba/graphscope/BasicExample.java
@@ -18,7 +18,7 @@
import com.alibaba.graphscope.interactive.client.Driver;
import com.alibaba.graphscope.interactive.client.Session;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import org.apache.tinkerpop.gremlin.driver.Client;
diff --git a/flex/interactive/sdk/examples/python/basic_example.py b/flex/interactive/sdk/examples/python/basic_example.py
index 1a62d41ef6c9..e0ba8a3d0251 100644
--- a/flex/interactive/sdk/examples/python/basic_example.py
+++ b/flex/interactive/sdk/examples/python/basic_example.py
@@ -18,39 +18,39 @@
import time
import argparse
import os
-from interactive_sdk.openapi.models.long_text import LongText
-from interactive_sdk.openapi.models.edge_mapping_type_triplet import (
+from gs_interactive.models.long_text import LongText
+from gs_interactive.models.edge_mapping_type_triplet import (
EdgeMappingTypeTriplet,
)
-from interactive_sdk.client.driver import Driver
-from interactive_sdk.client.session import Session
-from interactive_sdk.openapi.models.base_edge_type_vertex_type_pair_relations_inner import (
+from gs_interactive.client.driver import Driver
+from gs_interactive.client.session import Session
+from gs_interactive.models.base_edge_type_vertex_type_pair_relations_inner import (
BaseEdgeTypeVertexTypePairRelationsInner,
)
-from interactive_sdk.openapi.models.create_edge_type import CreateEdgeType
-from interactive_sdk.openapi.models.create_graph_request import CreateGraphRequest
-from interactive_sdk.openapi.models.create_graph_schema_request import (
+from gs_interactive.models.create_edge_type import CreateEdgeType
+from gs_interactive.models.create_graph_request import CreateGraphRequest
+from gs_interactive.models.create_graph_schema_request import (
CreateGraphSchemaRequest,
)
-from interactive_sdk.openapi.models.create_procedure_request import (
+from gs_interactive.models.create_procedure_request import (
CreateProcedureRequest,
)
-from interactive_sdk.openapi.models.create_property_meta import CreatePropertyMeta
-from interactive_sdk.openapi.models.create_vertex_type import CreateVertexType
-from interactive_sdk.openapi.models.edge_mapping import EdgeMapping
-from interactive_sdk.openapi.models.gs_data_type import GSDataType
-from interactive_sdk.openapi.models.start_service_request import StartServiceRequest
-from interactive_sdk.openapi.models.primitive_type import PrimitiveType
-from interactive_sdk.openapi.models.schema_mapping import SchemaMapping
-from interactive_sdk.openapi.models.schema_mapping_loading_config import (
+from gs_interactive.models.create_property_meta import CreatePropertyMeta
+from gs_interactive.models.create_vertex_type import CreateVertexType
+from gs_interactive.models.edge_mapping import EdgeMapping
+from gs_interactive.models.gs_data_type import GSDataType
+from gs_interactive.models.start_service_request import StartServiceRequest
+from gs_interactive.models.primitive_type import PrimitiveType
+from gs_interactive.models.schema_mapping import SchemaMapping
+from gs_interactive.models.schema_mapping_loading_config import (
SchemaMappingLoadingConfig,
)
-from interactive_sdk.openapi.models.schema_mapping_loading_config_format import (
+from gs_interactive.models.schema_mapping_loading_config_format import (
SchemaMappingLoadingConfigFormat,
)
-from interactive_sdk.openapi.models.string_type import StringType
-from interactive_sdk.openapi.models.string_type_string import StringTypeString
-from interactive_sdk.openapi.models.vertex_mapping import VertexMapping
+from gs_interactive.models.string_type import StringType
+from gs_interactive.models.string_type_string import StringTypeString
+from gs_interactive.models.vertex_mapping import VertexMapping
def createGraph(sess: Session):
diff --git a/flex/interactive/sdk/generate_sdk.sh b/flex/interactive/sdk/generate_sdk.sh
index b7406ee8f23c..6cd2dc630ef5 100755
--- a/flex/interactive/sdk/generate_sdk.sh
+++ b/flex/interactive/sdk/generate_sdk.sh
@@ -16,12 +16,12 @@
# This script is used to generate the Java SDK from the Flex Interactive API
# It uses the Swagger Codegen tool to generate the SDK
-PACKAGE_NAME="com.alibaba.graphscope.interactive.openapi"
-PYTHON_PACKAGE_NAME="openapi"
+PACKAGE_NAME="com.alibaba.graphscope.interactive"
+PYTHON_PACKAGE_NAME="gs_interactive"
GROUP_ID="com.alibaba.graphscope"
-ARTIFACT_ID="interactive-sdk"
+ARTIFACT_ID="interactive"
ARTIFACT_URL="https://github.com/alibaba/GraphScope/tree/main/flex/interactive"
-VERSION="0.0.3"
+VERSION="0.3"
EMAIL="graphscope@alibaba-inc.com"
DESCRIPTION="GraphScope Interactive Java SDK"
ORGANIZATION="Alibaba GraphScope"
@@ -57,7 +57,7 @@ function do_gen_java() {
cmd="openapi-generator-cli generate -i ${OPENAPI_SPEC_PATH} -g java -o ${OUTPUT_PATH}"
cmd=" ${cmd} --api-package ${PACKAGE_NAME}.api"
- cmd=" ${cmd} --model-package ${PACKAGE_NAME}.model"
+ cmd=" ${cmd} --model-package ${PACKAGE_NAME}.models"
cmd=" ${cmd} --invoker-package ${PACKAGE_NAME}"
cmd=" ${cmd} --package-name ${PACKAGE_NAME}"
cmd=" ${cmd} --artifact-id ${ARTIFACT_ID}"
@@ -72,8 +72,7 @@ function do_gen_python() {
echo "Generating Python SDK"
OUTPUT_PATH="${CUR_DIR}/python"
cmd="openapi-generator-cli generate -i ${OPENAPI_SPEC_PATH} -g python -o ${OUTPUT_PATH}"
- cmd=" ${cmd} --invoker-package ${PYTHON_PACKAGE_NAME}"
- cmd=" ${cmd} --package-name interactive_sdk.openapi"
+ cmd=" ${cmd} --package-name ${PYTHON_PACKAGE_NAME}"
cmd=" ${cmd} --additional-properties=packageVersion=${VERSION},pythonVersion=3"
echo "Running command: ${cmd}"
eval $cmd
diff --git a/flex/interactive/sdk/java/README.md b/flex/interactive/sdk/java/README.md
index 4148e90a385d..5b21efb16400 100644
--- a/flex/interactive/sdk/java/README.md
+++ b/flex/interactive/sdk/java/README.md
@@ -34,8 +34,8 @@ Add this dependency to your project's POM:
```xml
com.alibaba.graphscope
- interactive-sdk
- 0.0.3
+ interactive
+ 0.3
compile
```
@@ -50,7 +50,7 @@ mvn clean package
Then manually install the following JARs:
-* `target/interactive-sdk-0.0.3.jar`
+* `target/interactive-0.3.jar`
* `target/lib/*.jar`
## Getting Started
@@ -91,6 +91,6 @@ public class GettingStarted {
}
```
-For more a more detailed example, please refer to [Java SDK Example](https://github.com/alibaba/GraphScope/flex/interactive/sdk/examples/java/interactive-sdk-example/)
+For more a more detailed example, please refer to [Java SDK Example](https://github.com/alibaba/GraphScope/flex/interactive/sdk/examples/java/interactive-example/)
diff --git a/flex/interactive/sdk/java/pom.xml b/flex/interactive/sdk/java/pom.xml
index a89d0b482e96..aa59b5cdb629 100644
--- a/flex/interactive/sdk/java/pom.xml
+++ b/flex/interactive/sdk/java/pom.xml
@@ -2,10 +2,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.alibaba.graphscope
- interactive-sdk
+ interactive
jar
- interactive-sdk
- 0.0.3
+ interactive
+ 0.3
https://github.com/alibaba/GraphScope/tree/main/flex/interactive
GraphScope Interactive Java SDK
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/Driver.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/Driver.java
index 5a39debf0460..e27fd5dff33b 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/Driver.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/Driver.java
@@ -17,7 +17,7 @@
import com.alibaba.graphscope.interactive.client.common.Result;
import com.alibaba.graphscope.interactive.client.impl.DefaultSession;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.tinkerpop.gremlin.driver.Client;
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/EdgeInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/EdgeInterface.java
index 8f422049c0aa..b330e151f9b6 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/EdgeInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/EdgeInterface.java
@@ -16,8 +16,8 @@
package com.alibaba.graphscope.interactive.client;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.EdgeData;
-import com.alibaba.graphscope.interactive.openapi.model.EdgeRequest;
+import com.alibaba.graphscope.interactive.models.EdgeData;
+import com.alibaba.graphscope.interactive.models.EdgeRequest;
/**
* Interface for Create/Read/Update/Delete edge.
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/GraphInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/GraphInterface.java
index eb2f87fdb47a..f1755b443ceb 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/GraphInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/GraphInterface.java
@@ -16,7 +16,7 @@
package com.alibaba.graphscope.interactive.client;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import java.util.List;
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/JobInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/JobInterface.java
index 66f45163e0a8..cda4085fb628 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/JobInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/JobInterface.java
@@ -16,7 +16,7 @@
package com.alibaba.graphscope.interactive.client;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import java.util.List;
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/ProcedureInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/ProcedureInterface.java
index 14a304336076..d199110167b3 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/ProcedureInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/ProcedureInterface.java
@@ -17,7 +17,7 @@
import com.alibaba.graphscope.gaia.proto.IrResult;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import java.util.List;
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/QueryServiceInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/QueryServiceInterface.java
index c84814591653..fcec18faba82 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/QueryServiceInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/QueryServiceInterface.java
@@ -16,7 +16,7 @@
package com.alibaba.graphscope.interactive.client;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
/**
* Manage the query interface.
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/VertexInterface.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/VertexInterface.java
index 6402314b8703..837f6923ae56 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/VertexInterface.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/VertexInterface.java
@@ -16,7 +16,7 @@
package com.alibaba.graphscope.interactive.client;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
/**
* Create/Update/Read/Delete vertex
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Result.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Result.java
index 614eaa6aa844..f80ba0c617eb 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Result.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Result.java
@@ -15,8 +15,8 @@
*/
package com.alibaba.graphscope.interactive.client.common;
-import com.alibaba.graphscope.interactive.openapi.ApiException;
-import com.alibaba.graphscope.interactive.openapi.ApiResponse;
+import com.alibaba.graphscope.interactive.ApiException;
+import com.alibaba.graphscope.interactive.ApiResponse;
/***
* A class which wrap the result of the API
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Status.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Status.java
index 85bd2e8e75ae..0073530cd22c 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Status.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/common/Status.java
@@ -15,8 +15,8 @@
*/
package com.alibaba.graphscope.interactive.client.common;
-import com.alibaba.graphscope.interactive.openapi.ApiException;
-import com.alibaba.graphscope.interactive.openapi.ApiResponse;
+import com.alibaba.graphscope.interactive.ApiException;
+import com.alibaba.graphscope.interactive.ApiResponse;
/**
* Mapping http status code to our status code, along with a message
diff --git a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/impl/DefaultSession.java b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/impl/DefaultSession.java
index dbcbf936a401..c33d121a4c74 100644
--- a/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/impl/DefaultSession.java
+++ b/flex/interactive/sdk/java/src/main/java/com/alibaba/graphscope/interactive/client/impl/DefaultSession.java
@@ -16,13 +16,13 @@
package com.alibaba.graphscope.interactive.client.impl;
import com.alibaba.graphscope.gaia.proto.IrResult;
+import com.alibaba.graphscope.interactive.ApiClient;
+import com.alibaba.graphscope.interactive.ApiException;
+import com.alibaba.graphscope.interactive.ApiResponse;
+import com.alibaba.graphscope.interactive.api.*;
import com.alibaba.graphscope.interactive.client.Session;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.ApiClient;
-import com.alibaba.graphscope.interactive.openapi.ApiException;
-import com.alibaba.graphscope.interactive.openapi.ApiResponse;
-import com.alibaba.graphscope.interactive.openapi.api.*;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import com.google.protobuf.InvalidProtocolBufferException;
import java.io.Closeable;
diff --git a/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java b/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
index 8d51492b9d3c..d2499bc6cccc 100644
--- a/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
+++ b/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
@@ -17,7 +17,7 @@
import com.alibaba.graphscope.gaia.proto.IrResult;
import com.alibaba.graphscope.interactive.client.common.Result;
-import com.alibaba.graphscope.interactive.openapi.model.*;
+import com.alibaba.graphscope.interactive.models.*;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.tinkerpop.gremlin.driver.Client;
diff --git a/flex/interactive/sdk/python/.openapi-generator-ignore b/flex/interactive/sdk/python/.openapi-generator-ignore
index 4ae43deab14e..111d91266b33 100644
--- a/flex/interactive/sdk/python/.openapi-generator-ignore
+++ b/flex/interactive/sdk/python/.openapi-generator-ignore
@@ -25,8 +25,8 @@
README.md
setup.py
-interactive_sdk/__init__.py
-interactive_sdk/client
+gs_interactive/__init__.py
+gs_interactive/client
requirements.txt
test-requirements.txt
test/
\ No newline at end of file
diff --git a/flex/interactive/sdk/python/README.md b/flex/interactive/sdk/python/README.md
index 0dff6d5e7ed9..44d8ad994a27 100644
--- a/flex/interactive/sdk/python/README.md
+++ b/flex/interactive/sdk/python/README.md
@@ -3,7 +3,7 @@
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0
-- Package version: 0.0.3
+- Package version: 0.3
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
@@ -27,7 +27,7 @@ python setup.py install --user
Then import the package:
```python
-import interactive_sdk
+import gs_interactive
```
### Tests
@@ -46,7 +46,7 @@ Then, connect to the interactive endpoint, and try to run a simple query with fo
```python
-from interactive_sdk.client.driver import Driver
+from gs_interactive.client.driver import Driver
# replace endpoint with the actual interactive endpoint, this is mock server just for testing.
interactive_endpoint='https://virtserver.swaggerhub.com/GRAPHSCOPE/interactive/1.0.0/'
diff --git a/flex/interactive/sdk/python/gs_interactive/client/__init__.py b/flex/interactive/sdk/python/gs_interactive/client/__init__.py
new file mode 100644
index 000000000000..1edde7ba916b
--- /dev/null
+++ b/flex/interactive/sdk/python/gs_interactive/client/__init__.py
@@ -0,0 +1,6 @@
+# flake8: noqa
+
+from gs_interactive.client.driver import Driver
+from gs_interactive.client.result import Result
+from gs_interactive.client.session import DefaultSession, Session
+from gs_interactive.client.status import Status
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/driver.py b/flex/interactive/sdk/python/gs_interactive/client/driver.py
similarity index 98%
rename from flex/interactive/sdk/python/interactive_sdk/client/driver.py
rename to flex/interactive/sdk/python/gs_interactive/client/driver.py
index 8629decab195..f9396eee8c08 100644
--- a/flex/interactive/sdk/python/interactive_sdk/client/driver.py
+++ b/flex/interactive/sdk/python/gs_interactive/client/driver.py
@@ -28,7 +28,7 @@
from neo4j import GraphDatabase
from neo4j import Session as Neo4jSession
-from interactive_sdk.client.session import DefaultSession, Session
+from gs_interactive.client.session import DefaultSession, Session
class Driver:
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/generated/__init__.py b/flex/interactive/sdk/python/gs_interactive/client/generated/__init__.py
similarity index 100%
rename from flex/interactive/sdk/python/interactive_sdk/client/generated/__init__.py
rename to flex/interactive/sdk/python/gs_interactive/client/generated/__init__.py
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/result.py b/flex/interactive/sdk/python/gs_interactive/client/result.py
similarity index 92%
rename from flex/interactive/sdk/python/interactive_sdk/client/result.py
rename to flex/interactive/sdk/python/gs_interactive/client/result.py
index c623bb36f256..4aa57cfc6066 100644
--- a/flex/interactive/sdk/python/interactive_sdk/client/result.py
+++ b/flex/interactive/sdk/python/gs_interactive/client/result.py
@@ -20,9 +20,9 @@
from pydantic import Field
-from interactive_sdk.openapi.api_response import ApiResponse
-from interactive_sdk.client.status import Status
-from interactive_sdk.openapi.exceptions import ApiException
+from gs_interactive.api_response import ApiResponse
+from gs_interactive.client.status import Status
+from gs_interactive.exceptions import ApiException
# Define a generic type placeholder
T = TypeVar("T")
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/session.py b/flex/interactive/sdk/python/gs_interactive/client/session.py
similarity index 89%
rename from flex/interactive/sdk/python/interactive_sdk/client/session.py
rename to flex/interactive/sdk/python/gs_interactive/client/session.py
index 34343c8bc990..c1d821078bd8 100644
--- a/flex/interactive/sdk/python/interactive_sdk/client/session.py
+++ b/flex/interactive/sdk/python/gs_interactive/client/session.py
@@ -21,55 +21,55 @@
from pydantic import Field, StrictStr
-from interactive_sdk.client.status import Status
-from interactive_sdk.openapi.api.admin_service_graph_management_api import (
+from gs_interactive.client.status import Status
+from gs_interactive.api.admin_service_graph_management_api import (
AdminServiceGraphManagementApi,
)
-from interactive_sdk.openapi.api.admin_service_job_management_api import (
+from gs_interactive.api.admin_service_job_management_api import (
AdminServiceJobManagementApi,
)
-from interactive_sdk.openapi.api.admin_service_procedure_management_api import (
+from gs_interactive.api.admin_service_procedure_management_api import (
AdminServiceProcedureManagementApi,
)
-from interactive_sdk.openapi.api.admin_service_service_management_api import (
+from gs_interactive.api.admin_service_service_management_api import (
AdminServiceServiceManagementApi,
)
-from interactive_sdk.openapi.api.graph_service_edge_management_api import (
+from gs_interactive.api.graph_service_edge_management_api import (
GraphServiceEdgeManagementApi,
)
-from interactive_sdk.openapi.api.graph_service_vertex_management_api import (
+from gs_interactive.api.graph_service_vertex_management_api import (
GraphServiceVertexManagementApi,
)
-from interactive_sdk.openapi.api.query_service_api import QueryServiceApi
-from interactive_sdk.openapi.api_client import ApiClient
-from interactive_sdk.client.result import Result
-from interactive_sdk.openapi.configuration import Configuration
-from interactive_sdk.openapi.models.create_graph_request import CreateGraphRequest
-from interactive_sdk.openapi.models.create_graph_response import CreateGraphResponse
-from interactive_sdk.openapi.models.create_procedure_request import (
+from gs_interactive.api.query_service_api import QueryServiceApi
+from gs_interactive.api_client import ApiClient
+from gs_interactive.client.result import Result
+from gs_interactive.configuration import Configuration
+from gs_interactive.models.create_graph_request import CreateGraphRequest
+from gs_interactive.models.create_graph_response import CreateGraphResponse
+from gs_interactive.models.create_procedure_request import (
CreateProcedureRequest,
)
-from interactive_sdk.openapi.models.create_procedure_response import (
+from gs_interactive.models.create_procedure_response import (
CreateProcedureResponse,
)
-from interactive_sdk.openapi.models.edge_request import EdgeRequest
-from interactive_sdk.openapi.models.get_graph_response import GetGraphResponse
-from interactive_sdk.openapi.models.get_graph_schema_response import (
+from gs_interactive.models.edge_request import EdgeRequest
+from gs_interactive.models.get_graph_response import GetGraphResponse
+from gs_interactive.models.get_graph_schema_response import (
GetGraphSchemaResponse,
)
-from interactive_sdk.openapi.models.get_graph_statistics_response import GetGraphStatisticsResponse
-from interactive_sdk.openapi.models.get_procedure_response import GetProcedureResponse
-from interactive_sdk.openapi.models.job_response import JobResponse
-from interactive_sdk.openapi.models.job_status import JobStatus
-from interactive_sdk.openapi.models.schema_mapping import SchemaMapping
-from interactive_sdk.openapi.models.service_status import ServiceStatus
-from interactive_sdk.openapi.models.start_service_request import StartServiceRequest
-from interactive_sdk.openapi.models.update_procedure_request import (
+from gs_interactive.models.get_graph_statistics_response import GetGraphStatisticsResponse
+from gs_interactive.models.get_procedure_response import GetProcedureResponse
+from gs_interactive.models.job_response import JobResponse
+from gs_interactive.models.job_status import JobStatus
+from gs_interactive.models.schema_mapping import SchemaMapping
+from gs_interactive.models.service_status import ServiceStatus
+from gs_interactive.models.start_service_request import StartServiceRequest
+from gs_interactive.models.update_procedure_request import (
UpdateProcedureRequest,
)
-from interactive_sdk.openapi.models.query_request import QueryRequest
-from interactive_sdk.openapi.models.vertex_request import VertexRequest
-from interactive_sdk.client.generated.results_pb2 import CollectiveResults
+from gs_interactive.models.query_request import QueryRequest
+from gs_interactive.models.vertex_request import VertexRequest
+from gs_interactive.client.generated.results_pb2 import CollectiveResults
class EdgeInterface(metaclass=ABCMeta):
@@ -547,7 +547,7 @@ def call_procedure(
self, graph_id: StrictStr, params: QueryRequest
) -> Result[CollectiveResults]:
try:
- # Interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
+ # gs_interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
# Here we add byte of value 1 to denote the input format is in json format
response = self._query_api.proc_call_with_http_info(
graph_id = graph_id,
@@ -567,7 +567,7 @@ def call_procedure_current(
self, params: QueryRequest
) -> Result[CollectiveResults]:
try:
- # Interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
+ # gs_interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
# Here we add byte of value 1 to denote the input format is in json format
response = self._query_api.proc_call_current_with_http_info(
x_interactive_request_format = self.JSON_FORMAT,
@@ -584,7 +584,7 @@ def call_procedure_current(
def call_procedure_raw(self, graph_id: StrictStr, params: str) -> Result[str]:
try:
- # Interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
+ # gs_interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
# Here we add byte of value 1 to denote the input format is in encoder/decoder format
response = self._query_api.proc_call_with_http_info(
graph_id = graph_id,
@@ -597,7 +597,7 @@ def call_procedure_raw(self, graph_id: StrictStr, params: str) -> Result[str]:
def call_procedure_current_raw(self, params: str) -> Result[str]:
try:
- # Interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
+ # gs_interactive currently support four type of inputformat, see flex/engines/graph_db/graph_db_session.h
# Here we add byte of value 1 to denote the input format is in encoder/decoder format
response = self._query_api.proc_call_current_with_http_info(
x_interactive_request_format = self.ENCODER_FORMAT,
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/status.py b/flex/interactive/sdk/python/gs_interactive/client/status.py
similarity index 97%
rename from flex/interactive/sdk/python/interactive_sdk/client/status.py
rename to flex/interactive/sdk/python/gs_interactive/client/status.py
index b4542223651e..e7796b1d026f 100644
--- a/flex/interactive/sdk/python/interactive_sdk/client/status.py
+++ b/flex/interactive/sdk/python/gs_interactive/client/status.py
@@ -19,8 +19,8 @@
from enum import Enum
-from interactive_sdk.openapi.api_response import ApiResponse
-from interactive_sdk.openapi.exceptions import (
+from gs_interactive.api_response import ApiResponse
+from gs_interactive.exceptions import (
ApiException,
BadRequestException,
ForbiddenException,
diff --git a/flex/interactive/sdk/python/interactive_sdk/__init__.py b/flex/interactive/sdk/python/interactive_sdk/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/flex/interactive/sdk/python/interactive_sdk/client/__init__.py b/flex/interactive/sdk/python/interactive_sdk/client/__init__.py
deleted file mode 100644
index 92de0f29159b..000000000000
--- a/flex/interactive/sdk/python/interactive_sdk/client/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# flake8: noqa
-
-from interactive_sdk.client.driver import Driver
-from interactive_sdk.client.result import Result
-from interactive_sdk.client.session import DefaultSession, Session
-from interactive_sdk.client.status import Status
diff --git a/flex/interactive/sdk/python/setup.py b/flex/interactive/sdk/python/setup.py
index d42546f08c30..3e49ca8ae76f 100644
--- a/flex/interactive/sdk/python/setup.py
+++ b/flex/interactive/sdk/python/setup.py
@@ -1,7 +1,7 @@
# coding: utf-8
"""
- GraphScope Interactive API v0.0.3
+ GraphScope Interactive API v0.3
This is the definition of GraphScope Interactive API, including - AdminService API - Vertex/Edge API - QueryService AdminService API (with tag AdminService) defines the API for GraphManagement, ProcedureManagement and Service Management. Vertex/Edge API (with tag GraphService) defines the API for Vertex/Edge management, including creation/updating/delete/retrive. QueryService API (with tag QueryService) defines the API for procedure_call, Ahodc query.
@@ -21,8 +21,8 @@
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
-NAME = "interactive_sdk"
-VERSION = "0.0.3"
+NAME = "gs_interactive"
+VERSION = "0.3"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
@@ -53,7 +53,7 @@ def finalize_options(self):
def run(self):
proto_path = "../../../../interactive_engine/executor/ir/proto/"
proto_files = glob.glob(os.path.join(proto_path, '*.proto'))
- output_dir = "./interactive_sdk/client/generated/"
+ output_dir = "./gs_interactive/client/generated/"
os.makedirs(output_dir, exist_ok=True)
for proto_file in proto_files:
cmd = [
@@ -74,11 +74,11 @@ def run(self):
setup(
name=NAME,
version=VERSION,
- description="GraphScope Interactive API v0.0.3",
+ description="GraphScope Interactive API v0.3",
author="OpenAPI Generator community",
author_email="graphscope@alibaba-inc.com",
url="",
- keywords=["OpenAPI", "OpenAPI-Generator", "GraphScope Interactive API v0.0.3"],
+ keywords=["OpenAPI", "OpenAPI-Generator", "GraphScope Interactive API v0.3"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
@@ -87,6 +87,6 @@ def run(self):
long_description="""\
This is the definition of GraphScope Interactive API, including - AdminService API - Vertex/Edge API - QueryService AdminService API (with tag AdminService) defines the API for GraphManagement, ProcedureManagement and Service Management. Vertex/Edge API (with tag GraphService) defines the API for Vertex/Edge management, including creation/updating/delete/retrive. QueryService API (with tag QueryService) defines the API for procedure_call, Ahodc query.
""", # noqa: E501
- package_data={"interactive_sdk": ["py.typed"]},
+ package_data={"gs_interactive": ["py.typed"]},
cmdclass={"build_proto": BuildProto},
)
diff --git a/flex/interactive/sdk/python/test/test_driver.py b/flex/interactive/sdk/python/test/test_driver.py
index 29a488df8e46..44884e971761 100644
--- a/flex/interactive/sdk/python/test/test_driver.py
+++ b/flex/interactive/sdk/python/test/test_driver.py
@@ -23,48 +23,48 @@
import pytest
-from interactive_sdk.client.driver import Driver
-from interactive_sdk.openapi.models.base_edge_type_vertex_type_pair_relations_inner import (
+from gs_interactive.client.driver import Driver
+from gs_interactive.models.base_edge_type_vertex_type_pair_relations_inner import (
BaseEdgeTypeVertexTypePairRelationsInner,
)
-from interactive_sdk.openapi.models.create_edge_type import CreateEdgeType
-from interactive_sdk.openapi.models.create_graph_request import CreateGraphRequest
-from interactive_sdk.openapi.models.create_graph_schema_request import (
+from gs_interactive.models.create_edge_type import CreateEdgeType
+from gs_interactive.models.create_graph_request import CreateGraphRequest
+from gs_interactive.models.create_graph_schema_request import (
CreateGraphSchemaRequest,
)
-from interactive_sdk.openapi.models.create_procedure_request import (
+from gs_interactive.models.create_procedure_request import (
CreateProcedureRequest,
)
-from interactive_sdk.openapi.models.create_property_meta import CreatePropertyMeta
-from interactive_sdk.openapi.models.create_vertex_type import CreateVertexType
-from interactive_sdk.openapi.models.edge_mapping import EdgeMapping
-from interactive_sdk.openapi.models.edge_mapping_type_triplet import (
+from gs_interactive.models.create_property_meta import CreatePropertyMeta
+from gs_interactive.models.create_vertex_type import CreateVertexType
+from gs_interactive.models.edge_mapping import EdgeMapping
+from gs_interactive.models.edge_mapping_type_triplet import (
EdgeMappingTypeTriplet,
)
-from interactive_sdk.openapi.models.gs_data_type import GSDataType
-from interactive_sdk.openapi.models.typed_value import TypedValue
-from interactive_sdk.openapi.models.job_status import JobStatus
-from interactive_sdk.openapi.models.long_text import LongText
-from interactive_sdk.openapi.models.primitive_type import PrimitiveType
-from interactive_sdk.openapi.models.schema_mapping import SchemaMapping
-from interactive_sdk.openapi.models.schema_mapping_loading_config import (
+from gs_interactive.models.gs_data_type import GSDataType
+from gs_interactive.models.typed_value import TypedValue
+from gs_interactive.models.job_status import JobStatus
+from gs_interactive.models.long_text import LongText
+from gs_interactive.models.primitive_type import PrimitiveType
+from gs_interactive.models.schema_mapping import SchemaMapping
+from gs_interactive.models.schema_mapping_loading_config import (
SchemaMappingLoadingConfig,
)
-from interactive_sdk.openapi.models.schema_mapping_loading_config_format import (
+from gs_interactive.models.schema_mapping_loading_config_format import (
SchemaMappingLoadingConfigFormat,
)
-from interactive_sdk.openapi.models.start_service_request import StartServiceRequest
-from interactive_sdk.openapi.models.string_type import StringType
-from interactive_sdk.openapi.models.string_type_string import StringTypeString
-from interactive_sdk.openapi.models.vertex_mapping import VertexMapping
-from interactive_sdk.openapi.models.query_request import QueryRequest
+from gs_interactive.models.start_service_request import StartServiceRequest
+from gs_interactive.models.string_type import StringType
+from gs_interactive.models.string_type_string import StringTypeString
+from gs_interactive.models.vertex_mapping import VertexMapping
+from gs_interactive.models.query_request import QueryRequest
class TestDriver(unittest.TestCase):
"""Test usage of driver"""
def setUp(self):
- # get endpoint from environment variable INTERACTIVE_ENDPOINT
- self._endpoint = os.getenv("INTERACTIVE_ENDPOINT")
+ # get endpoint from environment variable gs_interactive_ENDPOINT
+ self._endpoint = os.getenv("gs_interactive_ENDPOINT")
if self._endpoint is None:
self._endpoint = "http://localhost:7777"
print("endpoint: ", self._endpoint)
diff --git a/flex/openapi/openapi_interactive.yaml b/flex/openapi/openapi_interactive.yaml
index eaba91d584e2..f12f76c8b4d3 100644
--- a/flex/openapi/openapi_interactive.yaml
+++ b/flex/openapi/openapi_interactive.yaml
@@ -20,7 +20,7 @@ info:
QueryService API (with tag QueryService) defines the API for procedure_call, Ahodc query.
version: "1.0.0"
- title: GraphScope Interactive API v0.0.3
+ title: GraphScope Interactive API v0.3
contact:
email: graphscope@alibaba-inc.com
license:
diff --git a/flex/tests/interactive/test_call_proc.py b/flex/tests/interactive/test_call_proc.py
index f4c1b81c97bc..d6e82c016a79 100644
--- a/flex/tests/interactive/test_call_proc.py
+++ b/flex/tests/interactive/test_call_proc.py
@@ -22,41 +22,41 @@
sys.path.append("../../interactive/sdk/python")
-from interactive_sdk.client.driver import Driver
-from interactive_sdk.openapi.models.base_edge_type_vertex_type_pair_relations_inner import (
+from gs_interactive.client.driver import Driver
+from gs_interactive.models.base_edge_type_vertex_type_pair_relations_inner import (
BaseEdgeTypeVertexTypePairRelationsInner,
)
-from interactive_sdk.openapi.models.create_edge_type import CreateEdgeType
-from interactive_sdk.openapi.models.create_graph_request import CreateGraphRequest
-from interactive_sdk.openapi.models.create_graph_schema_request import (
+from gs_interactive.models.create_edge_type import CreateEdgeType
+from gs_interactive.models.create_graph_request import CreateGraphRequest
+from gs_interactive.models.create_graph_schema_request import (
CreateGraphSchemaRequest,
)
-from interactive_sdk.openapi.models.create_procedure_request import (
+from gs_interactive.models.create_procedure_request import (
CreateProcedureRequest,
)
-from interactive_sdk.openapi.models.create_property_meta import CreatePropertyMeta
-from interactive_sdk.openapi.models.create_vertex_type import CreateVertexType
-from interactive_sdk.openapi.models.edge_mapping import EdgeMapping
-from interactive_sdk.openapi.models.edge_mapping_type_triplet import (
+from gs_interactive.models.create_property_meta import CreatePropertyMeta
+from gs_interactive.models.create_vertex_type import CreateVertexType
+from gs_interactive.models.edge_mapping import EdgeMapping
+from gs_interactive.models.edge_mapping_type_triplet import (
EdgeMappingTypeTriplet,
)
-from interactive_sdk.openapi.models.gs_data_type import GSDataType
-from interactive_sdk.openapi.models.typed_value import TypedValue
-from interactive_sdk.openapi.models.job_status import JobStatus
-from interactive_sdk.openapi.models.long_text import LongText
-from interactive_sdk.openapi.models.primitive_type import PrimitiveType
-from interactive_sdk.openapi.models.schema_mapping import SchemaMapping
-from interactive_sdk.openapi.models.schema_mapping_loading_config import (
+from gs_interactive.models.gs_data_type import GSDataType
+from gs_interactive.models.typed_value import TypedValue
+from gs_interactive.models.job_status import JobStatus
+from gs_interactive.models.long_text import LongText
+from gs_interactive.models.primitive_type import PrimitiveType
+from gs_interactive.models.schema_mapping import SchemaMapping
+from gs_interactive.models.schema_mapping_loading_config import (
SchemaMappingLoadingConfig,
)
-from interactive_sdk.openapi.models.schema_mapping_loading_config_format import (
+from gs_interactive.models.schema_mapping_loading_config_format import (
SchemaMappingLoadingConfigFormat,
)
-from interactive_sdk.openapi.models.start_service_request import StartServiceRequest
-from interactive_sdk.openapi.models.string_type import StringType
-from interactive_sdk.openapi.models.string_type_string import StringTypeString
-from interactive_sdk.openapi.models.vertex_mapping import VertexMapping
-from interactive_sdk.openapi.models.query_request import QueryRequest
+from gs_interactive.models.start_service_request import StartServiceRequest
+from gs_interactive.models.string_type import StringType
+from gs_interactive.models.string_type_string import StringTypeString
+from gs_interactive.models.vertex_mapping import VertexMapping
+from gs_interactive.models.query_request import QueryRequest
# Among the above procedures, the correct input format for each is:
# count_vertex_num: () -> (num: int64), CypherProcedure.