code stringlengths 239 50.1k | apis list | extract_api stringlengths 374 34.7k |
|---|---|---|
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | [
"graphscope.proto.op_def_pb2.DagDef"
] | [((2396, 2409), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (2407, 2409), False, 'import queue\n'), ((2455, 2474), 'graphscope.proto.op_def_pb2.DagDef', 'op_def_pb2.DagDef', ([], {}), '()\n', (2472, 2474), False, 'from graphscope.proto import op_def_pb2\n'), ((2779, 2798), 'graphscope.proto.op_def_pb2.DagDef', 'op_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.graph.Graph"
] | [((1302, 1332), 'graphscope.framework.graph.Graph', 'Graph', (['sess'], {'directed': 'directed'}), '(sess, directed=directed)\n', (1307, 1332), False, 'from graphscope.framework.graph import Graph\n'), ((2024, 2059), 'os.path.join', 'os.path.join', (['prefix', '"""created.csv"""'], {}), "(prefix, 'created.csv')\n", (20... |
import networkx.algorithms.centrality.tests.test_current_flow_betweenness_centrality
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(
networkx.algorithms.centrality.tests.test_current_flow_betwee... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((542, 587), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (565, 587), False, 'import pytest\n'), ((589, 657), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestApproximateFlowBetweennessCentrality'], {}... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.app.AppAssets",
"graphscope.session",
"graphscope.framework.loader.Loader",
"graphscope.set_option",
"graphscope.property_sssp",
"graphscope.sssp"
] | [((814, 850), 'graphscope.set_option', 'graphscope.set_option', ([], {'show_log': '(True)'}), '(show_log=True)\n', (835, 850), False, 'import graphscope\n'), ((1207, 1243), 'os.path.expandvars', 'os.path.expandvars', (['"""${GS_TEST_DIR}"""'], {}), "('${GS_TEST_DIR}')\n", (1225, 1243), False, 'import os\n'), ((1253, 12... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.utils.s_to_attr",
"graphscope.client.session.get_default_session",
"graphscope.framework.errors.InvalidArgumentError",
"graphscope.proto.attr_value_pb2.AttrValue",
"graphscope.framework.utils.b_to_attr",
"graphscope.framework.utils.normalize_data_type_str",
"graphscope.framework.ut... | [((9787, 9816), 'graphscope.proto.attr_value_pb2.NameAttrList', 'attr_value_pb2.NameAttrList', ([], {}), '()\n', (9814, 9816), False, 'from graphscope.proto import attr_value_pb2\n'), ((10479, 10508), 'graphscope.proto.attr_value_pb2.NameAttrList', 'attr_value_pb2.NameAttrList', ([], {}), '()\n', (10506, 10508), False,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.client.rpc.GRPCClient",
"graphscope.interactive.query.InteractiveQuery",
"graphscope.proto.op_def_pb2.DagDef",
"graphscope.framework.errors.InvalidArgumentError",
"graphscope.deploy.hosts.cluster.HostsClusterLauncher",
"graphscope.client.utils.CaptureKeyboardInterrupt",
"graphscope.framework... | [((2378, 2409), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (2395, 2409), False, 'import logging\n'), ((2297, 2345), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.graphscope/session.json"""'], {}), "('~/.graphscope/session.json')\n", (2315, 2345), False, 'import os\n... |
import networkx.generators.tests.test_geometric
import pytest
from networkx.generators.tests.test_geometric import TestNavigableSmallWorldGraph
from graphscope.framework.errors import UnimplementedError
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscop... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((472, 517), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (495, 517), False, 'import pytest\n'), ((519, 575), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestNavigableSmallWorldGraph'], {}), '(TestNav... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.complete_graph",
"graphscope.nx.builtin.single_source_dijkstra_path_length",
"graphscope.nx.read_edgelist",
"graphscope.client.session.get_default_session",
"graphscope.session",
"graphscope.client.session.g.add_edge",
"graphscope.client.session.g._project_to_simple",
"graphscope.nx.les... | [((4390, 4435), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (4413, 4435), False, 'import pytest\n'), ((18519, 18564), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (18542, 18... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((431, 459), 'pytest.importorskip', 'pytest.importorskip', (['"""numpy"""'], {}), "('numpy')\n", (450, 459), False, 'import pytest\n'), ((1035, 1080), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1058, 1080), False, 'import pytest\n'), ((1082, 1... |
import networkx.algorithms.tree.tests.test_coding
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tree.tests.test_coding,
decorators=pytest.mark.usefixture... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((423, 468), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (446, 468), False, 'import pytest\n'), ((470, 516), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestPruferSequence'], {}), '(TestPruferSequenc... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.utils.normalize_data_type_str",
"graphscope.proto.types_pb2.GraphType.Name",
"graphscope.client.session.get_default_session",
"graphscope.framework.utils.transform_vertex_range",
"graphscope.framework.dag_utils.graph_to_dataframe",
"graphscope.framework.utils.decode_dataframe",
"gr... | [((1480, 1511), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1497, 1511), False, 'import logging\n'), ((3314, 3327), 'graphscope.framework.graph_schema.GraphSchema', 'GraphSchema', ([], {}), '()\n', (3325, 3327), False, 'from graphscope.framework.graph_schema import GraphSc... |
import os
import pytest
import graphscope
@pytest.fixture(scope="session")
def graphscope_session():
sess = graphscope.session(run_on_local=True, show_log=True, num_workers=1)
sess.as_default()
yield sess
sess.close()
| [
"graphscope.session"
] | [((47, 78), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (61, 78), False, 'import pytest\n'), ((116, 183), 'graphscope.session', 'graphscope.session', ([], {'run_on_local': '(True)', 'show_log': '(True)', 'num_workers': '(1)'}), '(run_on_local=True, show_log=True, num_wor... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.ladder_graph",
"graphscope.nx.empty_graph",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.path_graph"
] | [((672, 717), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (695, 717), False, 'import pytest\n'), ((719, 767), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorClassic'], {}), '(TestGeneratorCl... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.utils.normalize_data_type_str",
"graphscope.proto.graph_def_pb2.VineyardInfoPb",
"graphscope.proto.graph_def_pb2.GraphTypePb.Name",
"graphscope.framework.utils.transform_vertex_range",
"graphscope.framework.dag_utils.graph_to_dataframe",
"graphscope.framework.dag_utils.graph_to_numpy... | [((1730, 1761), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1747, 1761), False, 'import logging\n'), ((3839, 3868), 'graphscope.framework.dag_utils.dynamic_to_arrow', 'dag_utils.dynamic_to_arrow', (['g'], {}), '(g)\n', (3865, 3868), False, 'from graphscope.framework import... |
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENS... | [
"graphscope.nx.builtin.degree_assortativity_coefficient",
"graphscope.nx.tests.utils.almost_equal",
"graphscope.nx.DiGraph",
"graphscope.nx.path_graph",
"graphscope.nx.Graph"
] | [((508, 553), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (531, 553), False, 'import pytest\n'), ((631, 647), 'graphscope.nx.path_graph', 'nx.path_graph', (['(4)'], {}), '(4)\n', (644, 647), False, 'from graphscope import nx\n'), ((665, 677), 'gr... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.app.not_compatible_for",
"graphscope.framework.app.AppAssets"
] | [((894, 969), 'graphscope.framework.app.not_compatible_for', 'not_compatible_for', (['"""arrow_property"""', '"""dynamic_property"""', '"""arrow_flattened"""'], {}), "('arrow_property', 'dynamic_property', 'arrow_flattened')\n", (912, 969), False, 'from graphscope.framework.app import not_compatible_for\n'), ((1367, 14... |
import networkx.algorithms.traversal.tests.test_edgedfs
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.traversal.tests.test_edgedfs,
decorators=pytest.mar... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((434, 479), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (457, 479), False, 'import pytest\n'), ((481, 520), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestEdgeDFS'], {}), '(TestEdgeDFS)\n', (507, 5... |
import networkx.algorithms.link_analysis.tests.test_hits
import networkx.algorithms.link_analysis.tests.test_pagerank
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.link_analysis... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((585, 630), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (608, 630), False, 'import pytest\n'), ((632, 668), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestHITS'], {}), '(TestHITS)\n', (658, 668), F... |
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a... | [
"graphscope.average_degree_connectivity",
"graphscope.clustering",
"graphscope.pagerank_nx",
"graphscope.katz_centrality",
"graphscope.attribute_assortativity_coefficient",
"graphscope.k_core",
"graphscope.framework.errors.InvalidArgumentError",
"graphscope.framework.app.AppAssets",
"graphscope.eige... | [((2825, 2858), 'networkx.utils.decorators.not_implemented_for', 'not_implemented_for', (['"""multigraph"""'], {}), "('multigraph')\n", (2844, 2858), False, 'from networkx.utils.decorators import not_implemented_for\n'), ((4660, 4693), 'networkx.utils.decorators.not_implemented_for', 'not_implemented_for', (['"""multig... |
import networkx.algorithms.bipartite.tests.test_matching
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.bipartite.tests.test_matching,
decorators=pytest.m... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((438, 483), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (461, 483), False, 'import pytest\n'), ((485, 525), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestMatching'], {}), '(TestMatching)\n', (511,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.app.not_compatible_for",
"graphscope.framework.app.AppAssets"
] | [((874, 930), 'graphscope.framework.app.not_compatible_for', 'not_compatible_for', (['"""arrow_property"""', '"""dynamic_property"""'], {}), "('arrow_property', 'dynamic_property')\n", (892, 930), False, 'from graphscope.framework.app import not_compatible_for\n'), ((2305, 2350), 'graphscope.framework.app.AppAssets', '... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.circulant_graph",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.path_graph",
"graphscope.nx.generators.harary_graph.hkn_harary_graph"
] | [((795, 840), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (818, 840), False, 'import pytest\n'), ((842, 885), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestHararyGraph'], {}), '(TestHararyGraph)\n',... |
import pytest
from networkx.algorithms.tests.test_chordal import TestMCS
import graphscope.nx as nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
@pytest.mark.usefixtures("graphscope_session")
@with_graphscope_nx_context(TestMCS)
class TestMCS:
# NB: graphscope.nx does not support grid_graph,... | [
"graphscope.nx.cycle_graph",
"graphscope.nx.bull_graph",
"graphscope.nx.is_chordal",
"graphscope.nx.wheel_graph",
"graphscope.nx.ladder_graph",
"graphscope.nx.star_graph",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.complete_to_chordal_graph",
"graphscope.nx.barbell_graph... | [((170, 215), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (193, 215), False, 'import pytest\n'), ((217, 252), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestMCS'], {}), '(TestMCS)\n', (243, 252), Fal... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.complete_graph",
"graphscope.nx.builtin.single_source_dijkstra_path_length",
"graphscope.nx.read_edgelist",
"graphscope.session",
"graphscope.client.session.g.add_edge",
"graphscope.client.session.g._project_to_simple",
"graphscope.nx.les_miserables_graph",
"graphscope.g",
"graphscope... | [((998, 1029), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (1012, 1029), False, 'import pytest\n'), ((3669, 3714), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3692, 3714), False, 'import pytest\n'... |
import pytest
from networkx.generators.tests.test_internet_as_graphs import TestInternetASTopology
import graphscope.nx as nx
from graphscope.nx import is_directed
from graphscope.nx import neighbors
from graphscope.nx.generators.internet_as_graphs import random_internet_as_graph
from graphscope.nx.utils.compat import... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((351, 396), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (374, 396), False, 'import pytest\n'), ((398, 448), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestInternetASTopology'], {}), '(TestInternetA... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.client.session.get_session_by_id"
] | [((4517, 4552), 'graphscope.client.session.get_session_by_id', 'get_session_by_id', (['self._session_id'], {}), '(self._session_id)\n', (4534, 4552), False, 'from graphscope.client.session import get_session_by_id\n'), ((5118, 5145), 'google.protobuf.json_format.MessageToJson', 'MessageToJson', (['self._op_def'], {}), ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.builtin.edge_boundary",
"graphscope.nx.builtin.bfs_tree",
"graphscope.nx.builtin.k_core",
"graphscope.nx.builtin.average_shortest_path_length",
"graphscope.nx.builtin.numeric_assortativity_coefficient",
"graphscope.nx.builtin.bfs_edges",
"graphscope.nx.builtin.single_source_dijkstra_path_... | [((3926, 3971), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3949, 3971), False, 'import pytest\n'), ((6873, 6918), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (6896, 6918)... |
import networkx.algorithms.shortest_paths.tests.test_dense
import networkx.algorithms.shortest_paths.tests.test_dense_numpy
import networkx.algorithms.shortest_paths.tests.test_generic
import networkx.algorithms.shortest_paths.tests.test_unweighted
import networkx.algorithms.shortest_paths.tests.test_weighted
import py... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((546, 591), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (569, 591), False, 'import pytest\n'), ((593, 631), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['_TestAStar'], {}), '(_TestAStar)\n', (619, 631... |
import networkx.algorithms.tests.test_dominance
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_dominance,
decorators=... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((524, 569), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (547, 569), False, 'import pytest\n'), ((571, 621), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestDominanceFrontiers'], {}), '(... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.errors.InvalidArgumentError",
"graphscope.framework.errors.check_argument"
] | [((6606, 6635), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (6629, 6635), False, 'import collections\n'), ((1338, 1376), 'collections.defaultdict', 'collections.defaultdict', (['(lambda : dict)'], {}), '(lambda : dict)\n', (1361, 1376), False, 'import collections\n'), ((3419, 3454)... |
"""Generators - Small
=====================
Some small graphs
"""
import pytest
from networkx.generators.tests.test_small import TestGeneratorsSmall
from graphscope.framework.errors import UnimplementedError
from graphscope.nx.utils.compat import with_graphscope_nx_context
@pytest.mark.usefixtures("graphscope_ses... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((281, 326), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (304, 326), False, 'import pytest\n'), ((328, 375), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorsSmall'], {}), '(TestGeneratorsSm... |
import networkx.algorithms.assortativity.tests.test_pairs
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.assortativity.tests.test_pairs,
... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((650, 695), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (673, 695), False, 'import pytest\n'), ((697, 746), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestAttributeMixingXY'], {}), '(T... |
import pytest
from graphscope import nx
from graphscope.nx.tests.utils import replace_with_inf
class TestRunGenericPath:
def setup_method(self):
self.edges = [(0, 1), (0, 2), (1, 2), (2, 3), (1, 4)]
G = nx.Graph()
G.add_edges_from(self.edges, weight=1)
DG = nx.DiGraph()
DG... | [
"graphscope.nx.builtin.shortest_path",
"graphscope.nx.DiGraph",
"graphscope.nx.builtin.single_source_dijkstra_path_length",
"graphscope.nx.builtin.has_path",
"graphscope.nx.builtin.average_shortest_path_length",
"graphscope.nx.Graph"
] | [((226, 236), 'graphscope.nx.Graph', 'nx.Graph', ([], {}), '()\n', (234, 236), False, 'from graphscope import nx\n'), ((297, 309), 'graphscope.nx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (307, 309), False, 'from graphscope import nx\n'), ((519, 578), 'graphscope.nx.builtin.shortest_path', 'nx.builtin.shortest_path', (... |
import pytest
from networkx.algorithms.assortativity import degree_mixing_dict
# fmt: off
from networkx.generators.tests.test_joint_degree_seq import \
test_is_valid_directed_joint_degree
from networkx.generators.tests.test_joint_degree_seq import test_is_valid_joint_degree
from networkx.generators.tests.test_join... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((864, 909), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (887, 909), False, 'import pytest\n'), ((911, 965), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['test_is_valid_joint_degree'], {}), '(test_is_v... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.proto.types_pb2.DataType.Name",
"graphscope.framework.utils.unify_type"
] | [((8013, 8075), 'itertools.compress', 'itertools.compress', (['self._vertex_entries', 'self._valid_vertices'], {}), '(self._vertex_entries, self._valid_vertices)\n', (8031, 8075), False, 'import itertools\n'), ((8127, 8184), 'itertools.compress', 'itertools.compress', (['self._edge_entries', 'self._valid_edges'], {}), ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.proto.attr_value_pb2.NameAttrList",
"graphscope.framework.loader.Loader",
"graphscope.framework.utils.type_to_attr",
"graphscope.framework.utils.s_to_attr",
"graphscope.proto.attr_value_pb2.AttrValue",
"graphscope.framework.utils.b_to_attr",
"graphscope.framework.utils.unify_type",
"graphs... | [((8489, 8518), 'graphscope.proto.attr_value_pb2.NameAttrList', 'attr_value_pb2.NameAttrList', ([], {}), '()\n', (8516, 8518), False, 'from graphscope.proto import attr_value_pb2\n'), ((9187, 9216), 'graphscope.proto.attr_value_pb2.NameAttrList', 'attr_value_pb2.NameAttrList', ([], {}), '()\n', (9214, 9216), False, 'fr... |
import networkx.algorithms.centrality.tests.test_betweenness_centrality
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(
networkx.algorithms.centrality.tests.test_betweenness_centrality,
deco... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((487, 532), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (510, 532), False, 'import pytest\n'), ((534, 587), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestBetweennessCentrality'], {}), '(TestBetwee... |
"""Generators - Directed Graphs
----------------------------
"""
import pytest
from networkx.generators.tests.test_directed import TestGeneratorsDirected
from networkx.generators.tests.test_directed import TestRandomKOutGraph
from networkx.generators.tests.test_directed import TestUniformRandomKOutGraph
import graphsc... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((857, 902), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (880, 902), False, 'import pytest\n'), ((904, 954), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorsDirected'], {}), '(TestGenerator... |
import pytest
# fmt: off
from networkx.generators.tests.test_spectral_graph_forge import \
test_spectral_graph_forge
from graphscope.nx import NetworkXError
from graphscope.nx import is_isomorphic
from graphscope.nx.generators import karate_club_graph
from graphscope.nx.generators.spectral_graph_forge import spec... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((474, 519), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (497, 519), False, 'import pytest\n'), ((521, 574), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['test_spectral_graph_forge'], {}), '(test_spect... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.proto.query_args_pb2.QueryArgs",
"graphscope.proto.attr_value_pb2.NameAttrList",
"graphscope.framework.utils.normalize_data_type_str",
"graphscope.framework.utils.report_type_to_attr",
"graphscope.framework.utils.s_to_attr",
"graphscope.framework.utils.bytes_to_attr",
"graphscope.framework.u... | [((2048, 2144), 'graphscope.framework.operation.Operation', 'Operation', (['graph.session_id', 'types_pb2.CREATE_APP'], {'config': 'config', 'output_types': 'types_pb2.APP'}), '(graph.session_id, types_pb2.CREATE_APP, config=config,\n output_types=types_pb2.APP)\n', (2057, 2144), False, 'from graphscope.framework.op... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file convert_matrix.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/convert_matrix.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME>... | [
"graphscope.nx.empty_graph",
"graphscope.nx.selfloop_edges",
"graphscope.nx.NetworkXError",
"graphscope.nx.utils.compat.import_as_graphscope_nx"
] | [((714, 762), 'graphscope.nx.utils.compat.import_as_graphscope_nx', 'import_as_graphscope_nx', (['networkx.convert_matrix'], {}), '(networkx.convert_matrix)\n', (737, 762), False, 'from graphscope.nx.utils.compat import import_as_graphscope_nx\n'), ((914, 945), 'graphscope.nx.empty_graph', 'nx.empty_graph', (['(0)', 'c... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((1459, 1504), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1482, 1504), False, 'import pytest\n'), ((1506, 1556), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorsDirected'], {}), '(TestGen... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.proto.write_service_pb2.RemoteFlushRequest",
"graphscope.framework.record.to_write_requests_pb",
"graphscope.proto.write_service_pb2_grpc.ClientWriteStub",
"graphscope.proto.ddl_service_pb2_grpc.ClientDdlStub",
"graphscope.framework.graph_schema.GraphSchema",
"graphscope.proto.ddl_service_pb2.... | [((1403, 1416), 'graphscope.framework.graph_schema.GraphSchema', 'GraphSchema', ([], {}), '()\n', (1414, 1416), False, 'from graphscope.framework.graph_schema import GraphSchema\n'), ((1786, 1852), 'graphscope.framework.record.to_write_requests_pb', 'to_write_requests_pb', (['"""VERTEX"""', 'vertices', 'write_service_p... |
import networkx.algorithms.tests.test_dag
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_dag,
decorators=pytest.mark.... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((480, 525), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (503, 525), False, 'import pytest\n'), ((527, 573), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestDagLongestPath'], {}), '(Test... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.parse_adjlist"
] | [((837, 882), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (860, 882), False, 'import pytest\n'), ((884, 923), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestAdjlist'], {}), '(TestAdjlist)\n', (910, 9... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.convert.from_dict_of_lists",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.Graph",
"graphscope.nx.convert.from_dict_of_dicts",
"graphscope.nx.cycle_graph",
"graphscope.nx.convert.to_dict_of_lists",
"graphscope.nx.convert.to_dict_of_dicts",
"graphscope.nx.conver... | [((1033, 1078), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1056, 1078), False, 'import pytest\n'), ((1080, 1120), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['_TestConvert'], {}), '(_TestConvert)\n',... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.JavaApp"
] | [((806, 836), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (820, 836), False, 'import pytest\n'), ((935, 965), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (949, 965), False, 'import pytest\n'), ((1046, 1076), 'pytest.fixture', ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.tests.utils.almost_equal",
"graphscope.nx.builtin.has_path",
"graphscope.nx.builtin.eigenvector_centrality",
"graphscope.nx.builtin.katz_centrality",
"graphscope.nx.read_edgelist",
"graphscope.nx.builtin.single_source_dijkstra_path_length",
"graphscope.nx.builtin.pagerank",
"graphscope.... | [((847, 892), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (870, 892), False, 'import pytest\n'), ((5267, 5318), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""TODO: subgraph not ready"""'}), "(reason='TODO: subgraph not ready')\n", (... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.set_option",
"graphscope.session",
"graphscope.Graph",
"graphscope.sssp"
] | [((906, 951), 'os.path.expandvars', 'os.path.expandvars', (['"""${GS_TEST_DIR}/property"""'], {}), "('${GS_TEST_DIR}/property')\n", (924, 951), False, 'import os\n'), ((956, 992), 'graphscope.set_option', 'graphscope.set_option', ([], {'show_log': '(True)'}), '(show_log=True)\n', (977, 992), False, 'import graphscope\n... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.number_of_selfloops",
"graphscope.nx.set_node_attributes",
"graphscope.nx.nodes_with_selfloops",
"graphscope.nx.induced_subgraph",
"graphscope.nx.complete_graph",
"graphscope.nx.subgraph",
"graphscope.nx.set_edge_attributes",
"g... | [((810, 855), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (833, 855), False, 'import pytest\n'), ((857, 908), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['func_tests.TestFunction'], {}), '(func_tests.T... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file convert.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/convert.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <... | [
"graphscope.nx.from_dict_of_dicts",
"graphscope.nx.from_pandas_edgelist",
"graphscope.nx.from_scipy_sparse_matrix",
"graphscope.nx.from_numpy_matrix",
"graphscope.nx.utils.compat.patch_docstring",
"graphscope.nx.from_pandas_adjacency",
"graphscope.nx.from_edgelist",
"graphscope.nx.NetworkXError",
"g... | [((805, 846), 'graphscope.nx.utils.compat.import_as_graphscope_nx', 'import_as_graphscope_nx', (['networkx.convert'], {}), '(networkx.convert)\n', (828, 846), False, 'from graphscope.nx.utils.compat import import_as_graphscope_nx\n'), ((850, 901), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['netw... |
"""Unit tests for the :mod:`graphscope.nx.generators.expanders` module.
"""
# fmt: off
import pytest
from networkx import adjacency_matrix
from networkx.generators.tests.test_expanders import test_chordal_cycle_graph
from networkx.generators.tests.test_expanders import test_margulis_gabber_galil_graph
from networkx.g... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((1000, 1045), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1023, 1045), False, 'import pytest\n'), ((1047, 1107), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['test_margulis_gabber_galil_graph'], {}),... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.graph.GraphDAGNode",
"graphscope.framework.dag_utils.fetch_gremlin_result",
"graphscope.framework.dag_utils.gremlin_query",
"graphscope.framework.dag_utils.close_interactive_query",
"graphscope.framework.dag_utils.create_interactive_query",
"graphscope.framework.context.ResultDAGNode... | [((1432, 1463), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1449, 1463), False, 'import logging\n'), ((2267, 2300), 'graphscope.framework.dag_utils.fetch_gremlin_result', 'fetch_gremlin_result', (['self', '"""one"""'], {}), "(self, 'one')\n", (2287, 2300), False, 'from gra... |
"""Unit tests for the :mod:`networkx.generators.random_graphs` module.
"""
import pytest
from networkx.exception import NetworkXError
from networkx.generators.tests.test_random_graphs import TestGeneratorsRandom
from graphscope.nx.generators.random_graphs import barabasi_albert_graph
from graphscope.nx.generators.ran... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.generators.random_graphs.binomial_graph",
"graphscope.nx.generators.random_graphs.newman_watts_strogatz_graph",
"graphscope.nx.generators.random_graphs.fast_gnp_random_graph",
"graphscope.nx.generators.random_graphs.random_shell_graph",... | [((1673, 1718), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1696, 1718), False, 'import pytest\n'), ((1720, 1768), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorsRandom'], {}), '(TestGener... |
import networkx.algorithms.shortest_paths.tests.test_dense
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.shortest_paths.tests.test_dense,
decorators=pyte... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((441, 486), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (464, 486), False, 'import pytest\n'), ((488, 525), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestFloyd'], {}), '(TestFloyd)\n', (514, 525),... |
#!/usr/bin/env python
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a B... | [
"graphscope.nx.builtin.edge_boundary",
"graphscope.nx.complete_graph",
"graphscope.nx.DiGraph",
"graphscope.nx.builtin.node_boundary",
"graphscope.nx.path_graph"
] | [((537, 582), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (560, 582), False, 'import pytest\n'), ((1715, 1760), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1738, 1760), Fa... |
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENS... | [
"graphscope.experimental.nx.path_graph"
] | [((648, 693), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (671, 693), False, 'import pytest\n'), ((2107, 2171), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""not support to_undirected not as view"""'}), "(reason='not support to_undi... |
"""
====================
Generators - Classic
====================
Unit tests for various classic graph generators in generators/classic.py
"""
import pytest
from networkx.generators.tests.test_classic import TestGeneratorClassic
import graphscope.nx as nx
from graphscope.nx import is_isomorphic
from graphscope.nx.te... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.empty_graph",
"graphscope.nx.ladder_graph",
"graphscope.nx.path_graph"
] | [((425, 470), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (448, 470), False, 'import pytest\n'), ((472, 520), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorClassic'], {}), '(TestGeneratorCl... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file reportviews.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/classes/reportviews.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAM... | [
"graphscope.nx.utils.compat.patch_docstring"
] | [((1058, 1084), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['_NodeView'], {}), '(_NodeView)\n', (1073, 1084), False, 'from graphscope.nx.utils.compat import patch_docstring\n'), ((1637, 1670), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['_OutEdgeDataView'], {}), '(_OutEdgeD... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.to_edgelist",
"graphscope.nx.from_pandas_edgelist",
"graphscope.nx.to_networkx_graph",
"graphscope.nx.Graph",
"graphscope.nx.cycle_graph",
"graphscope.nx.DiGraph",
"graphscope.nx.to_pandas_adjacency"
] | [((730, 758), 'pytest.importorskip', 'pytest.importorskip', (['"""numpy"""'], {}), "('numpy')\n", (749, 758), False, 'import pytest\n'), ((764, 793), 'pytest.importorskip', 'pytest.importorskip', (['"""pandas"""'], {}), "('pandas')\n", (783, 793), False, 'import pytest\n'), ((797, 842), 'pytest.mark.usefixtures', 'pyte... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.katz_centrality",
"graphscope.degree_centrality",
"graphscope.wcc",
"graphscope.louvain",
"graphscope.cdlp",
"graphscope.is_simple_path",
"graphscope.hits",
"graphscope.clustering",
"graphscope.triangles",
"graphscope.bfs",
"graphscope.pagerank",
"graphscope.sssp",
"graphscope.ei... | [((11920, 12008), 'pytest.mark.skipif', 'pytest.mark.skipif', (["('FULL-TEST-SUITE' not in os.environ)"], {'reason': '"""Run in nightly CI"""'}), "('FULL-TEST-SUITE' not in os.environ, reason=\n 'Run in nightly CI')\n", (11938, 12008), False, 'import pytest\n'), ((1636, 1698), 'graphscope.framework.app.AppAssets', '... |
import pytest
from graphscope import nx
from graphscope.nx.tests.utils import replace_with_inf
@pytest.mark.usefixtures("graphscope_session")
class TestRunGenericPath:
def setup_method(self):
self.edges = [(0, 1), (0, 2), (1, 2), (2, 3), (1, 4)]
G = nx.Graph()
G.add_edges_from(self.edges,... | [
"graphscope.nx.builtin.all_pairs_shortest_path_length",
"graphscope.nx.tests.utils.replace_with_inf",
"graphscope.nx.builtin.shortest_path",
"graphscope.nx.builtin.has_path",
"graphscope.nx.builtin.single_source_dijkstra_path_length",
"graphscope.nx.Graph",
"graphscope.nx.cycle_graph",
"graphscope.nx.... | [((99, 144), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (122, 144), False, 'import pytest\n'), ((273, 283), 'graphscope.nx.Graph', 'nx.Graph', ([], {}), '()\n', (281, 283), False, 'from graphscope import nx\n'), ((344, 356), 'graphscope.nx.DiGra... |
import networkx.algorithms.tests.test_voronoi
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_voronoi,
decorators=pytest.mark.usefixtures("graph... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((409, 454), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (432, 454), False, 'import pytest\n'), ((456, 500), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestVoronoiCells'], {}), '(TestVoronoiCells)\n... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.tests.utils.assert_graphs_equal",
"graphscope.nx.DiGraph",
"graphscope.nx.to_scipy_sparse_matrix",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.generators.classic.path_graph",
"graphscope.nx.Graph",
"graphscope.nx.from_scipy_sparse_matrix",
"graphscope.nx.Mult... | [((804, 849), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (827, 849), False, 'import pytest\n'), ((851, 895), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestConvertNumpy'], {}), '(TestConvertNumpy)\n... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.utils._from_numpy_dtype",
"graphscope.framework.utils.data_type_to_cpp",
"graphscope.framework.utils.s_to_attr",
"graphscope.framework.utils.bytes_to_attr",
"graphscope.proto.attr_value_pb2.AttrValue"
] | [((1135, 1166), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1152, 1166), False, 'import logging\n'), ((8094, 8144), 'pyarrow.Table.from_pandas', 'pa.Table.from_pandas', (['source'], {'preserve_index': '(False)'}), '(source, preserve_index=False)\n', (8114, 8144), True, 'im... |
import networkx.algorithms.tests.test_euler
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_euler,
decorators=pytest.m... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((558, 603), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (581, 603), False, 'import pytest\n'), ((605, 647), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestIsEulerian'], {}), '(TestIsEu... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file adjlist.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/readwrite/adjlist.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<E... | [
"graphscope.nx.empty_graph",
"graphscope.nx.utils.compat.import_as_graphscope_nx",
"graphscope.nx.utils.compat.patch_docstring"
] | [((795, 846), 'graphscope.nx.utils.compat.import_as_graphscope_nx', 'import_as_graphscope_nx', (['networkx.readwrite.adjlist'], {}), '(networkx.readwrite.adjlist)\n', (818, 846), False, 'from graphscope.nx.utils.compat import import_as_graphscope_nx\n'), ((850, 881), 'graphscope.nx.utils.compat.patch_docstring', 'patch... |
import pytest
from networkx.testing import almost_equal
from graphscope import nx
from graphscope.nx.tests.utils import replace_with_inf
@pytest.mark.usefixtures("graphscope_session")
class TestRunGenericPath:
def setup_class(cls):
cls.edges = [(0, 1), (0, 2), (1, 2), (2, 3), (1, 4)]
G = nx.Graph... | [
"graphscope.nx.cycle_graph",
"graphscope.nx.DiGraph",
"graphscope.nx.builtin.has_path",
"graphscope.nx.builtin.average_shortest_path_length",
"graphscope.nx.path_graph",
"graphscope.nx.average_shortest_path_length",
"graphscope.nx.builtin.all_pairs_shortest_path_length",
"graphscope.nx.Graph",
"grap... | [((141, 186), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (164, 186), False, 'import pytest\n'), ((2815, 2860), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (2838, 2860), Fa... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.session",
"graphscope.pagerank",
"graphscope.dataset.modern_graph.load_modern_graph",
"graphscope.dataset.ldbc.load_ldbc",
"graphscope.triangles"
] | [((1000, 1031), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1017, 1031), False, 'import logging\n'), ((1412, 1673), 'graphscope.session', 'graphscope.session', ([], {'show_log': '(True)', 'num_workers': '(1)', 'k8s_gs_image': 'image', 'k8s_coordinator_cpu': '(0.5)', 'k8s_c... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.write_gexf",
"graphscope.nx.generate_gexf",
"graphscope.nx.path_graph",
"graphscope.nx.Graph",
"graphscope.nx.read_gexf"
] | [((611, 656), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (634, 656), False, 'import pytest\n'), ((658, 694), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGEXF'], {}), '(TestGEXF)\n', (684, 694), F... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020-2021 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | [
"graphscope.set_option"
] | [((1060, 1096), 'graphscope.set_option', 'graphscope.set_option', ([], {'show_log': '(True)'}), '(show_log=True)\n', (1081, 1096), False, 'import graphscope\n'), ((1106, 1137), 'logging.getLogger', 'logging.getLogger', (['"""graphscope"""'], {}), "('graphscope')\n", (1123, 1137), False, 'import logging\n'), ((2552, 257... |
import networkx.algorithms.tests.test_distance_measures
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_distance_measures,
decorators=pytest.mar... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((489, 534), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (512, 534), False, 'import pytest\n'), ((536, 576), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestDistance'], {}), '(TestDistance)\n', (562,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.DiGraph",
"graphscope.nx.selfloop_edges",
"graphscope.nx.nodes_with_selfloops",
"graphscope.nx.is_empty",
"graphscope.nx.path_graph",
"graphscope.nx.number_of_selfloops",
"graphscope.nx.complete_graph",
"graphscope.nx.Graph",
"graphscope.nx.star_graph"
] | [((740, 785), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (763, 785), False, 'import pytest\n'), ((866, 930), 'graphscope.nx.Graph', 'nx.Graph', (['{(0): [1, 2, 3], (1): [1, 2, 0], (4): []}'], {'name': '"""Test"""'}), "({(0): [1, 2, 3], (1): [1, ... |
import networkx.algorithms.bipartite.tests.test_edgelist
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.bipartite.tests.test_edgelist,
... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((464, 509), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (487, 509), False, 'import pytest\n'), ((511, 551), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestEdgelist'], {}), '(TestEdgeli... |
import pytest
from networkx.algorithms.centrality.tests.test_degree_centrality import \
TestDegreeCentrality
from graphscope.nx.utils.compat import with_graphscope_nx_context
@pytest.mark.usefixtures("graphscope_session")
@with_graphscope_nx_context(TestDegreeCentrality)
class TestDegreeCentrality:
@pytest.m... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((183, 228), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (206, 228), False, 'import pytest\n'), ((230, 278), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestDegreeCentrality'], {}), '(TestDegreeCentr... |
import networkx.algorithms.flow.tests.test_gomory_hu
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.flow.tests.test_gomory_hu,
decorators=pytest.mark.usef... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((431, 476), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (454, 476), False, 'import pytest\n'), ((496, 540), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGomoryHuTree'], {}), '(TestGomoryHuTree)\n... |
import networkx.algorithms.community.tests.test_modularity_max
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.community.tests.test_modularity_max,
decorat... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((453, 498), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (476, 498), False, 'import pytest\n'), ((500, 537), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestNaive'], {}), '(TestNaive)\n', (526, 537),... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.proto.data_types_pb2.BytesValue",
"graphscope.proto.data_types_pb2.DoubleValue",
"graphscope.proto.data_types_pb2.StringValue",
"graphscope.proto.attr_value_pb2.AttrValue",
"graphscope.proto.data_types_pb2.BoolValue",
"graphscope.proto.data_types_pb2.Int64Value",
"graphscope.client.archive.O... | [((1297, 1320), 'os.path.isfile', 'os.path.isfile', (['abs_dir'], {}), '(abs_dir)\n', (1311, 1320), False, 'import os\n'), ((1580, 1609), 'graphscope.proto.attr_value_pb2.AttrValue', 'attr_value_pb2.AttrValue', ([], {'i': 'i'}), '(i=i)\n', (1604, 1609), False, 'from graphscope.proto import attr_value_pb2\n'), ((1715, 1... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file digraph.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/classes/digraph.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMA... | [
"graphscope.framework.dag_utils.create_graph_view",
"graphscope.framework.graph_schema.GraphSchema",
"graphscope.client.session.get_session_by_id",
"graphscope.nx.classes.reportviews.OutEdgeView",
"graphscope.framework.dag_utils.copy_graph",
"graphscope.nx.convert.to_networkx_graph",
"graphscope.nx.Netw... | [((8037, 8068), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['Graph.__init__'], {}), '(Graph.__init__)\n', (8052, 8068), False, 'from graphscope.nx.utils.compat import patch_docstring\n'), ((10379, 10410), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['RefDiGraph.adj'], {}), '... |
import networkx.algorithms.tests.test_euler
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_euler,
decorators=pytest.mark.usefixtures("graphscop... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((538, 583), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (561, 583), False, 'import pytest\n'), ((585, 627), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestIsEulerian'], {}), '(TestIsEulerian)\n', (... |
import pytest
from networkx.generators.tests.test_atlas import TestAtlasGraph
from networkx.generators.tests.test_atlas import TestAtlasGraphG
import graphscope.nx as nx
from graphscope.nx import graph_atlas
from graphscope.nx import graph_atlas_g
from graphscope.nx.utils.compat import with_graphscope_nx_context
@py... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((318, 363), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (341, 363), False, 'import pytest\n'), ((365, 407), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestAtlasGraph'], {}), '(TestAtlasGraph)\n', (... |
import networkx.algorithms.shortest_paths.tests.test_astar
import pytest
from graphscope.experimental.nx.utils.compat import import_as_graphscope_nx
from graphscope.experimental.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.shortest_paths.tests.test_astar,
... | [
"graphscope.experimental.nx.utils.compat.with_graphscope_nx_context"
] | [((467, 512), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (490, 512), False, 'import pytest\n'), ((514, 551), 'graphscope.experimental.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestAStar'], {}), '(TestAStar)\n'... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.app.AppAssets",
"graphscope.eigenvector_centrality",
"graphscope.experimental.nx.utils.compat.patch_docstring",
"graphscope.k_core",
"graphscope.clustering",
"graphscope.degree_centrality",
"graphscope.experimental.nx.DiGraph",
"graphscope.triangles",
"graphscope.katz_centralit... | [((877, 906), 'graphscope.experimental.nx.utils.compat.patch_docstring', 'patch_docstring', (['nxa.pagerank'], {}), '(nxa.pagerank)\n', (892, 906), False, 'from graphscope.experimental.nx.utils.compat import patch_docstring\n'), ((995, 1020), 'graphscope.experimental.nx.utils.compat.patch_docstring', 'patch_docstring',... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.errors.check_argument",
"graphscope.proto.attr_value_pb2.NameAttrList",
"graphscope.framework.utils.unify_type",
"graphscope.framework.utils.s_to_attr",
"graphscope.framework.utils.type_to_attr",
"graphscope.framework.loader.Loader"
] | [((3883, 3912), 'graphscope.proto.attr_value_pb2.NameAttrList', 'attr_value_pb2.NameAttrList', ([], {}), '()\n', (3910, 3912), False, 'from graphscope.proto import attr_value_pb2\n'), ((5561, 5680), 'graphscope.framework.errors.check_argument', 'check_argument', (["(load_strategy in ('only_out', 'only_in', 'both_out_in... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.set_option",
"graphscope.session",
"graphscope.client.session.default_session",
"graphscope.nx.Graph",
"graphscope.sssp",
"graphscope.property_sssp"
] | [((1061, 1091), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1075, 1091), False, 'import pytest\n'), ((1326, 1362), 'os.path.expandvars', 'os.path.expandvars', (['"""${GS_TEST_DIR}"""'], {}), "('${GS_TEST_DIR}')\n", (1344, 1362), False, 'import os\n'), ((1382, 1434), 'os.p... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.nx.generators.expanders.margulis_gabber_galil_graph",
"graphscope.nx.utils.compat.with_graphscope_nx_context",
"graphscope.nx.number_of_nodes"
] | [((1589, 1634), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (1612, 1634), False, 'import pytest\n'), ((2336, 2381), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (2359, 2381)... |
# -*- coding: utf-8 -*-
#
# This file random_graphs.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/generators/random_graphs.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <... | [
"graphscope.nx.DiGraph",
"graphscope.nx.generators.classic.complete_graph",
"graphscope.nx.generators.degree_seq.degree_sequence_tree",
"graphscope.nx.operators.union",
"graphscope.nx.generators.classic.path_graph",
"graphscope.nx.gnp_random_graph",
"graphscope.nx.Graph",
"graphscope.nx.complete_graph... | [((1780, 1822), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docstring', (['nxa.fast_gnp_random_graph'], {}), '(nxa.fast_gnp_random_graph)\n', (1795, 1822), False, 'from graphscope.nx.utils.compat import patch_docstring\n'), ((1824, 1842), 'networkx.utils.py_random_state', 'py_random_state', (['(2)'], {}), '(2)... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((792, 837), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (815, 837), False, 'import pytest\n'), ((839, 883), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestWriteSparse6'], {}), '(TestWriteSparse6)\n... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.analytical.udf.utils.InMemoryZip",
"graphscope.analytical.udf.compile.GRAPECompiler",
"graphscope.analytical.udf.utils.LinesWrapper",
"graphscope.framework.utils.get_timestamp"
] | [((1904, 1917), 'graphscope.analytical.udf.utils.InMemoryZip', 'InMemoryZip', ([], {}), '()\n', (1915, 1917), False, 'from graphscope.analytical.udf.utils import InMemoryZip\n'), ((3056, 3114), 'graphscope.analytical.udf.compile.GRAPECompiler', 'GRAPECompiler', (['class_name', 'vd_type', 'md_type', 'program_model'], {}... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.framework.utils.b_to_attr",
"graphscope.framework.dag_utils.create_graph",
"graphscope.framework.graph_utils.normalize_parameter_vertices",
"graphscope.framework.utils.normalize_data_type_str",
"graphscope.framework.dag_utils.create_loader",
"graphscope.framework.utils.s_to_attr",
"graphscop... | [((6044, 6065), 'graphscope.client.session.get_default_session', 'get_default_session', ([], {}), '()\n', (6063, 6065), False, 'from graphscope.client.session import get_default_session\n'), ((6252, 6291), 'graphscope.framework.utils.normalize_data_type_str', 'utils.normalize_data_type_str', (['oid_type'], {}), '(oid_t... |
import networkx.algorithms.tests.test_lowest_common_ancestors
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_lowest_common_ancestors,
decorator... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((530, 575), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (553, 575), False, 'import pytest\n'), ((577, 615), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestDAGLCA'], {}), '(TestDAGLCA)\n', (603, 615... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file convert_matrix.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/convert_matrix.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME>... | [
"graphscope.nx.empty_graph",
"graphscope.nx.NetworkXError",
"graphscope.nx.utils.compat.patch_docstring",
"graphscope.nx.utils.compat.import_as_graphscope_nx"
] | [((759, 807), 'graphscope.nx.utils.compat.import_as_graphscope_nx', 'import_as_graphscope_nx', (['networkx.convert_matrix'], {}), '(networkx.convert_matrix)\n', (782, 807), False, 'from graphscope.nx.utils.compat import import_as_graphscope_nx\n'), ((811, 849), 'graphscope.nx.utils.compat.patch_docstring', 'patch_docst... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | [
"graphscope.JavaApp"
] | [((806, 836), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (820, 836), False, 'import pytest\n'), ((935, 965), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (949, 965), False, 'import pytest\n'), ((1046, 1076), 'pytest.fixture', ... |
#
# This file is referred and derived from project NetworkX
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# All rights reserved.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENS... | [
"graphscope.experimental.nx.OrderedGraph",
"graphscope.experimental.nx.path_graph",
"graphscope.experimental.nx.OrderedMultiGraph",
"graphscope.experimental.nx.tests.utils.assert_edges_equal",
"graphscope.experimental.nx.to_undirected",
"graphscope.experimental.nx.induced_subgraph",
"graphscope.experime... | [((706, 751), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (729, 751), False, 'import pytest\n'), ((4569, 4624), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""not support order-like graph"""'}), "(reason='not support order-like graph... |
import networkx.algorithms.tests.test_threshold
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
from graphscope.nx.utils.compat import with_graphscope_nx_context
import_as_graphscope_nx(networkx.algorithms.tests.test_threshold,
decorators=pytest.mark.usefixtures("g... | [
"graphscope.nx.utils.compat.with_graphscope_nx_context"
] | [((421, 466), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (444, 466), False, 'import pytest\n'), ((468, 518), 'graphscope.nx.utils.compat.with_graphscope_nx_context', 'with_graphscope_nx_context', (['TestGeneratorThreshold'], {}), '(TestGenerator... |
import networkx.algorithms.tests.test_triads
import pytest
from graphscope.nx.utils.compat import import_as_graphscope_nx
import_as_graphscope_nx(networkx.algorithms.tests.test_triads,
decorators=pytest.mark.usefixtures("graphscope_session"))
from collections import defaultdict
from itertools... | [
"graphscope.nx.is_isomorphic",
"graphscope.nx.DiGraph",
"graphscope.nx.is_directed",
"graphscope.nx.random_triad",
"graphscope.nx.karate_club_graph",
"graphscope.nx.all_triads",
"graphscope.nx.NetworkXAlgorithmError"
] | [((3278, 3323), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3301, 3323), False, 'import pytest\n'), ((3562, 3607), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""graphscope_session"""'], {}), "('graphscope_session')\n", (3585, 3607)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.