-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wired up the rest of the ignored MGraph__Json tests
improved test coverage
- Loading branch information
Showing
21 changed files
with
419 additions
and
233 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
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
18 changes: 1 addition & 17 deletions
18
mgraph_ai/providers/json/domain/Domain__MGraph__Json__Node.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,21 +1,5 @@ | ||
from typing import Optional | ||
from mgraph_ai.mgraph.domain.Domain__MGraph__Node import Domain__MGraph__Node | ||
from mgraph_ai.providers.json.models.Model__MGraph__Json__Node import Model__MGraph__Json__Node | ||
from mgraph_ai.providers.json.schemas.Schema__MGraph__Json__Node__Dict import Schema__MGraph__Json__Node__Dict | ||
from mgraph_ai.providers.json.schemas.Schema__MGraph__Json__Node__List import Schema__MGraph__Json__Node__List | ||
from mgraph_ai.providers.json.schemas.Schema__MGraph__Json__Node__Value import Schema__MGraph__Json__Node__Value | ||
|
||
|
||
class Domain__MGraph__Json__Node(Domain__MGraph__Node): | ||
node: Model__MGraph__Json__Node # Reference to node model | ||
|
||
def get_type(self) -> Optional[str]: # Get node type | ||
"""Get the type of this JSON node (dict, list, or value)""" | ||
node_type = self.node.data.node_type | ||
if node_type == Schema__MGraph__Json__Node__Dict: | ||
return 'dict' | ||
elif node_type == Schema__MGraph__Json__Node__List: | ||
return 'list' | ||
elif node_type == Schema__MGraph__Json__Node__Value: | ||
return 'value' | ||
return None | ||
node: Model__MGraph__Json__Node # Reference to node model |
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.