Skip to content

Commit

Permalink
Merge pull request #178 from unoplat/177-refactor-remove-vector-index…
Browse files Browse the repository at this point in the history
…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
JayGhiya authored Oct 24, 2024
2 parents a8ed40f + 393331a commit 1752bfe
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 88 deletions.

This file was deleted.

This file was deleted.

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)
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)



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)
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)

This file was deleted.

This file was deleted.

0 comments on commit 1752bfe

Please sign in to comment.