Skip to content

Commit 63af4e7

Browse files
author
Guillem Duran
committed
Fix imports to match new namespace
Signed-off-by: Guillem Duran <guillem@sourced.tech>
1 parent e8adb83 commit 63af4e7

61 files changed

Lines changed: 143 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sourced/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Common namespace for sourced tools."""
22
# You must not include any other code and data in a namespace package's __init__.py
3-
import pkg_resources
4-
pkg_resources.declare_namespace(__name__)
3+
# import pkg_resources
4+
# pkg_resources.declare_namespace(__name__)

sourced/ml/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""MLonCode research playground."""

sourced/ml/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
except ImportError:
77
pass
88

9-
__version__ = "0.8.3"
9+
__version__ = "0.8.3"
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# flake8: noqa
2-
from sourced.ml.algorithms.tf_idf import log_tf_log_idf
2+
from sourced.ml.core.algorithms.tf_idf import log_tf_log_idf
33
from sourced.ml.core.algorithms.uast_ids_to_bag import UastIds2Bag, uast2sequence
4-
from sourced.ml.algorithms.uast_struct_to_bag import UastRandomWalk2Bag, UastSeq2Bag
5-
from sourced.ml.algorithms.uast_inttypes_to_nodes import Uast2QuantizedChildren
6-
from sourced.ml.algorithms.uast_inttypes_to_graphlets import Uast2GraphletBag
7-
from sourced.ml.algorithms.uast_to_role_id_pairs import Uast2RoleIdPairs
8-
from sourced.ml.algorithms.uast_id_distance import Uast2IdLineDistance, Uast2IdTreeDistance
9-
from sourced.ml.algorithms.uast_to_id_sequence import Uast2IdSequence
4+
from sourced.ml.core.algorithms.uast_struct_to_bag import UastRandomWalk2Bag, UastSeq2Bag
5+
from sourced.ml.core.algorithms.uast_inttypes_to_nodes import Uast2QuantizedChildren
6+
from sourced.ml.core.algorithms.uast_inttypes_to_graphlets import Uast2GraphletBag
7+
from sourced.ml.core.algorithms.uast_to_role_id_pairs import Uast2RoleIdPairs
8+
from sourced.ml.core.algorithms.uast_id_distance import Uast2IdLineDistance, Uast2IdTreeDistance
9+
from sourced.ml.core.algorithms.uast_to_id_sequence import Uast2IdSequence

sourced/ml/core/algorithms/uast_id_distance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import bblfsh
55

66
from sourced.ml.core.algorithms.uast_ids_to_bag import UastIds2Bag
7-
from sourced.ml.utils import bblfsh_roles
7+
from sourced.ml.core.utils import bblfsh_roles
88

99

1010
class Uast2IdDistance(UastIds2Bag):

sourced/ml/core/algorithms/uast_ids_to_bag.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import bblfsh
44

5-
from sourced.ml.algorithms import NoopTokenParser, TokenParser
6-
from sourced.ml.algorithms.uast_to_bag import Uast2BagBase
7-
from sourced.ml.utils import bblfsh_roles
5+
from sourced.ml.core.algorithms.token_parser import NoopTokenParser, TokenParser
6+
from sourced.ml.core.algorithms.uast_to_bag import Uast2BagBase
7+
from sourced.ml.core.utils import bblfsh_roles
88

99

1010
def uast2sequence(root):

sourced/ml/core/algorithms/uast_inttypes_to_graphlets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections import defaultdict
22

33
from sourced.ml.core.algorithms.uast_ids_to_bag import Uast2BagBase
4-
from sourced.ml.algorithms.uast_struct_to_bag import Node
4+
from sourced.ml.core.algorithms.uast_struct_to_bag import Node
55

66

77
class Uast2GraphletBag(Uast2BagBase):

sourced/ml/core/algorithms/uast_inttypes_to_nodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from bblfsh import Node
44
import numpy
55

6-
from sourced.ml.algorithms.uast_to_bag import Uast2BagThroughSingleScan
6+
from sourced.ml.core.algorithms.uast_to_bag import Uast2BagThroughSingleScan
77

88

99
class Uast2QuantizedChildren(Uast2BagThroughSingleScan):

sourced/ml/core/algorithms/uast_struct_to_bag.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from collections import defaultdict
22
import random
33

4-
from sourced.ml.algorithms import uast2sequence
5-
from sourced.ml.core.algorithms.uast_ids_to_bag import FakeVocabulary, Uast2BagBase
4+
from sourced.ml.core.algorithms.uast_ids_to_bag import FakeVocabulary, Uast2BagBase, uast2sequence
65

76

87
class Uast2StructBagBase(Uast2BagBase):

sourced/ml/core/algorithms/uast_to_id_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import bblfsh
44

5-
from sourced.ml.algorithms.uast_id_distance import Uast2IdLineDistance
5+
from sourced.ml.core.algorithms.uast_id_distance import Uast2IdLineDistance
66

77

88
class Uast2IdSequence(Uast2IdLineDistance):

0 commit comments

Comments
 (0)