-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from unoplat/177-refactor-remove-vector-index…
…es-from-neomodel-as-we-have-to-create-them-manually-on-the-fly-after-knowing-the-embedding-models-dimensions fix: removed vector indexes and renamed properly to ensure right dime…
- Loading branch information
Showing
8 changed files
with
61 additions
and
88 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
unoplat-code-confluence-commons/unoplat_code_confluence_commons/graph_models/class_node.py
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...lat-code-confluence-commons/unoplat_code_confluence_commons/graph_models/codebase_node.py
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...-code-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_class.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from .base_models import BaseNode, ContainsRelationship | ||
from neomodel import RelationshipFrom, RelationshipTo, StringProperty,ZeroOrMore,One,ArrayProperty,VectorIndex,FloatProperty | ||
|
||
class ConfluenceClass(BaseNode): | ||
"""Represents a class in a package""" | ||
class_name = StringProperty(required=True) | ||
class_implementation_summary = StringProperty(default="") | ||
class_objective = StringProperty(default="") | ||
class_objective_embedding = ArrayProperty(FloatProperty()) | ||
class_implementation_summary_embedding = ArrayProperty(FloatProperty()) | ||
# Class relationships | ||
package = RelationshipFrom('ConfluencePackage', 'CONTAINS', model=ContainsRelationship, cardinality=One) | ||
methods = RelationshipTo('ConfluenceMethod', 'CONTAINS', model=ContainsRelationship, cardinality=ZeroOrMore) |
23 changes: 23 additions & 0 deletions
23
...de-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_codebase.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from neomodel import ( | ||
StringProperty, | ||
RelationshipTo, | ||
RelationshipFrom, | ||
ZeroOrMore, | ||
One, | ||
ArrayProperty, | ||
VectorIndex, | ||
FloatProperty | ||
) | ||
from .base_models import BaseNode, ContainsRelationship | ||
|
||
class ConfluenceCodebase(BaseNode): | ||
"""Represents a codebase in the system""" | ||
codebase_summary = StringProperty(default="") | ||
codebase_objective = StringProperty(default="") | ||
codebase_objective_embedding = ArrayProperty(FloatProperty()) | ||
codebase_implementation_embedding = ArrayProperty(FloatProperty()) | ||
# One codebase can contain multiple packages | ||
packages = RelationshipTo('ConfluencePackage', 'CONTAINS', model=ContainsRelationship, cardinality=ZeroOrMore) | ||
|
||
|
||
|
12 changes: 12 additions & 0 deletions
12
...code-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_method.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .base_models import BaseNode, ContainsRelationship | ||
from neomodel import RelationshipFrom, StringProperty,One,ArrayProperty,VectorIndex,FloatProperty | ||
|
||
class ConfluenceMethod(BaseNode): | ||
"""Represents a method in a class""" | ||
function_name = StringProperty(required=True) | ||
function_implementation_summary = StringProperty(default="") | ||
function_objective = StringProperty(default="") | ||
function_objective_embedding = ArrayProperty(FloatProperty()) | ||
function_summary_embedding = ArrayProperty(FloatProperty()) | ||
# Method relationships | ||
confluence_class = RelationshipFrom('ConfluenceClass', 'CONTAINS', model=ContainsRelationship, cardinality=One) |
13 changes: 13 additions & 0 deletions
13
...ode-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_package.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from .base_models import BaseNode, ContainsRelationship | ||
from neomodel import RelationshipFrom, RelationshipTo, StringProperty,ZeroOrMore,One,ArrayProperty,VectorIndex,FloatProperty | ||
|
||
class ConfluencePackage(BaseNode): | ||
"""Represents a package in the codebase""" | ||
package_objective = StringProperty(required=True) | ||
package_implementation_summary = StringProperty(required=True,default="") | ||
|
||
package_objective_embedding = ArrayProperty(FloatProperty()) | ||
package_implementation_summary_embedding = ArrayProperty(FloatProperty()) | ||
confluence_codebase = RelationshipFrom('ConfluenceCodebase', 'CONTAINS', model=ContainsRelationship, cardinality=One) | ||
sub_packages = RelationshipTo('ConfluencePackage', 'CONTAINS', model=ContainsRelationship, cardinality=ZeroOrMore) | ||
classes = RelationshipTo('ConfluenceClass', 'CONTAINS', model=ContainsRelationship, cardinality=ZeroOrMore) |
18 changes: 0 additions & 18 deletions
18
unoplat-code-confluence-commons/unoplat_code_confluence_commons/graph_models/method_node.py
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
unoplat-code-confluence-commons/unoplat_code_confluence_commons/graph_models/package_node.py
This file was deleted.
Oops, something went wrong.