-
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 #202 from unoplat/108-feat-enable-function-call-li…
…nkage-with-content-also-enable-all-possible-function-metadata 108 feat enable function call linkage with content also enable all possible function metadata
- Loading branch information
Showing
27 changed files
with
163 additions
and
232 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
...-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_annotation.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,9 @@ | ||
from neomodel import StructuredNode, StringProperty, RelationshipFrom, ZeroOrMore, JSONProperty | ||
|
||
class ConfluenceAnnotation(StructuredNode): | ||
name = StringProperty(required=True) | ||
key_values = JSONProperty() | ||
position = JSONProperty() | ||
# Relationships | ||
annotated_classes = RelationshipFrom('.confluence_class.ConfluenceClass', 'HAS_ANNOTATION', cardinality=ZeroOrMore) | ||
annotated_methods = RelationshipFrom('.confluence_method.ConfluenceMethod', 'HAS_ANNOTATION', cardinality=ZeroOrMore) |
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
6 changes: 6 additions & 0 deletions
6
...confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_class_field.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,6 @@ | ||
from neomodel import StructuredNode, StringProperty, RelationshipTo, ZeroOrMore | ||
|
||
class ConfluenceClassField(StructuredNode): | ||
field_type = StringProperty() | ||
field_name = StringProperty() | ||
annotations = RelationshipTo('.confluence_annotation.ConfluenceAnnotation', 'HAS_ANNOTATION', cardinality=ZeroOrMore) |
8 changes: 8 additions & 0 deletions
8
...code-confluence-commons/unoplat_code_confluence_commons/graph_models/confluence_import.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,8 @@ | ||
from neomodel import StructuredNode, StringProperty, ArrayProperty, RelationshipFrom, ZeroOrMore | ||
|
||
class ConfluenceImport(StructuredNode): | ||
source = StringProperty(required=True) | ||
|
||
usage_names = ArrayProperty(StringProperty()) | ||
|
||
imported_by = RelationshipFrom('.confluence_class.ConfluenceClass', 'IMPORTS', cardinality=ZeroOrMore) |
13 changes: 11 additions & 2 deletions
13
...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 |
---|---|---|
@@ -1,12 +1,21 @@ | ||
from .base_models import BaseNode, ContainsRelationship | ||
from neomodel import RelationshipTo, StringProperty,One,ArrayProperty,FloatProperty | ||
from .base_models import BaseNode, ContainsRelationship, CallsRelationship | ||
from neomodel import RelationshipTo, StringProperty,One,ArrayProperty,FloatProperty,ZeroOrMore,IntegerProperty,JSONProperty | ||
|
||
class ConfluenceMethod(BaseNode): | ||
"""Represents a method in a class""" | ||
|
||
function_name = StringProperty(required=True) | ||
return_type = StringProperty() | ||
implementation_summary = StringProperty(default="") | ||
objective = StringProperty(default="") | ||
function_objective_embedding = ArrayProperty(FloatProperty()) | ||
function_implementation_summary_embedding = ArrayProperty(FloatProperty()) | ||
content = StringProperty() | ||
body_hash = IntegerProperty() | ||
position = JSONProperty() | ||
local_variables = JSONProperty() | ||
|
||
# Method relationships | ||
confluence_class = RelationshipTo('.confluence_class.ConfluenceClass', 'BELONGS_TO', model=ContainsRelationship, cardinality=One) | ||
annotations = RelationshipTo('.confluence_annotation.ConfluenceAnnotation', 'HAS_ANNOTATION', cardinality=ZeroOrMore) | ||
calls_methods = RelationshipTo('.confluence_method.ConfluenceMethod', 'CALLS', model=CallsRelationship, cardinality=ZeroOrMore) |
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
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
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
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
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
4 changes: 2 additions & 2 deletions
4
unoplat-code-confluence/unoplat_code_confluence/data_models/chapi_unoplat_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
10 changes: 0 additions & 10 deletions
10
unoplat-code-confluence/unoplat_code_confluence/data_models/dspy/dspy_o_function_summary.py
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...-confluence/unoplat_code_confluence/data_models/dspy/dspy_unoplat_fs_annotation_subset.py
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...nfluence/unoplat_code_confluence/data_models/dspy/dspy_unoplat_fs_function_call_subset.py
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
...de-confluence/unoplat_code_confluence/data_models/dspy/dspy_unoplat_fs_function_subset.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
...t-code-confluence/unoplat_code_confluence/data_models/dspy/dspy_unoplat_fs_node_subset.py
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...code-confluence/unoplat_code_confluence/data_models/dspy/dspy_unoplat_function_summary.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from typing import Optional | ||
from pydantic import BaseModel,Field | ||
|
||
from unoplat_code_confluence.data_models.dspy.dspy_o_function_summary import DspyFunctionSummary | ||
|
||
class DspyUnoplatFunctionSummary(BaseModel): | ||
function_name: str = Field( alias="FunctionName", description="The name of the function") | ||
function_summary: DspyFunctionSummary = Field( alias="FunctionSummary", description="A summary of the function") | ||
objective: Optional[str] = Field(default=None, alias="Objective",description="This should include high level objective of what function does based on function content and function metadata. Should not be more than 3 lines.") | ||
implementation_summary: Optional[str] = Field(default=None, alias="ImplementationSummary",description="This should include implementation details of the function. make sure if this function makes internal calls to other functions of same class and to external calls to other classes/libs is also covered. Use all metadata shared for the function to answer .") | ||
metadata: Optional[dict] = Field(default=None, description="Additional metadata for the function") |
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
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
Oops, something went wrong.