Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Committed-by: xiaolei.zl from Dev container
  • Loading branch information
zhanglei1949 committed Feb 12, 2025
1 parent 14fb02d commit 1680233
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 35 deletions.
3 changes: 1 addition & 2 deletions coordinator/graphscope_runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
# limitations under the License.
#

"""Dummy package dir for gs-engine package
"""
"""Dummy package dir for gs-engine package"""
4 changes: 3 additions & 1 deletion coordinator/gscoordinator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@
except ModuleNotFoundError:
# if graphscope is not installed, try to locate it by relative path,
# which is strong related with the directory structure of GraphScope
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "python"))
sys.path.insert(
0, os.path.join(os.path.dirname(__file__), "..", "..", "python")
)
8 changes: 3 additions & 5 deletions coordinator/gscoordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@
from concurrent import futures

import connexion

from gscoordinator.flex.core.config import SOLUTION
import grpc
from graphscope.proto import coordinator_service_pb2_grpc

from gscoordinator.flex.core.config import SOLUTION

if SOLUTION != "INTERACTIVE":
from graphscope.proto import coordinator_service_pb2_grpc
from gscoordinator.monitor import Monitor
from gscoordinator.servicer import init_graphscope_one_service_servicer
from gscoordinator.utils import GS_GRPC_MAX_MESSAGE_LENGTH


from flask_cors import CORS
from graphscope.config import Config
Expand Down Expand Up @@ -99,8 +98,7 @@ def launch_graphscope():

config_logging(config.log_level)
logger.info("Start server with args \n%s", config.dumps_yaml())



if config.coordinator.http_server_only:
start_http_service(config)
else:
Expand Down
4 changes: 3 additions & 1 deletion coordinator/gscoordinator/flex/core/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
from gscoordinator.flex.core.config import INSTANCE_NAME
from gscoordinator.flex.core.config import MAXSIZE
from gscoordinator.flex.core.config import NAMESPACE
from gscoordinator.flex.core.config import STORAGE_TYPE
from gscoordinator.flex.core.config import SOLUTION
from gscoordinator.flex.core.config import STORAGE_TYPE

if SOLUTION == "GRAPHSCOPE_INSIGHT":
from gscoordinator.flex.core.scheduler import schedule

from gscoordinator.flex.core.stoppable_thread import StoppableThread
from gscoordinator.flex.core.utils import encode_datetime
from gscoordinator.flex.core.utils import resolve_api_client
Expand Down
2 changes: 2 additions & 0 deletions coordinator/gscoordinator/flex/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
from typing import Union

import requests

from gscoordinator.flex.core.config import CLUSTER_TYPE

if CLUSTER_TYPE == "KUBERNETES":
from kubernetes import client as kube_client
from kubernetes import config as kube_config
Expand Down
3 changes: 1 addition & 2 deletions coordinator/gscoordinator/hook/prestop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

"""Prestop hook for delete all resource created by coordinator in kubernetes
"""
"""Prestop hook for delete all resource created by coordinator in kubernetes"""

import json
import os
Expand Down
2 changes: 1 addition & 1 deletion python/graphscope/analytical/udf/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#

""" An almost-complete Python to Cython AST transformer, with injected
"""An almost-complete Python to Cython AST transformer, with injected
GRAPHSCOPE-specific translation.
Python AST nodes are translated to corresponding Cython AST nodes as
Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/analytical/udf/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" Patch for Cython writer
"""
"""Patch for Cython writer"""

import functools

Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/client/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" Manage connections of the GraphScope store service.
"""
"""Manage connections of the GraphScope store service."""

import base64
import json
Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" Manage sessions to the GraphScope coordinator.
"""
"""Manage sessions to the GraphScope coordinator."""

import atexit
import base64
Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" GraphScope default configuration.
"""
"""GraphScope default configuration."""

import base64
import json
Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/framework/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" Classes and functions used to manage dags.
"""
"""Classes and functions used to manage dags."""


import queue
Expand Down
3 changes: 1 addition & 2 deletions python/graphscope/framework/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License.
#

""" Classes and functions used to construct dags.
"""
"""Classes and functions used to construct dags."""

import hashlib
import uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# information.
#
"""
Unit tests for attribute assortativity coefficient.
Unit tests for attribute assortativity coefficient.
"""
import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# information.
#
"""
Unit tests for degree assortativity coefficient.
Unit tests for degree assortativity coefficient.
"""
import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# information.
#
"""
Unit tests for degree centrality.
Unit tests for degree centrality.
"""
import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# information.
#
"""
Unit tests for average degree connectivity.
Unit tests for average degree connectivity.
"""
from itertools import permutations

Expand Down
2 changes: 1 addition & 1 deletion python/graphscope/nx/readwrite/tests/test_edgelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def test_write_edgelist_4(self):
G = nx.Graph()
G.add_edge(1, 2, weight=2.0)
G.add_edge(2, 3, weight=3.0)
nx.write_edgelist(G, fh, data=[("weight")])
nx.write_edgelist(G, fh, data=["weight"])
fh.seek(0)
assert fh.read() in (b"1 2 2.0\n2 3 3.0\n", b"2 3 3.0\n2 1 2.0\n")
12 changes: 6 additions & 6 deletions python/setup_flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
#

"""
GraphScope FLEX HTTP SERVICE API
GraphScope FLEX HTTP SERVICE API
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
The version of the OpenAPI document: 0.9.1
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)
The version of the OpenAPI document: 0.9.1
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Do not edit the class manually.
""" # noqa: E501

import os
Expand Down

0 comments on commit 1680233

Please sign in to comment.