Remove unneeded ground truth dicts and autoformat

This commit is contained in:
Leon Luithlen 2024-11-12 16:38:57 +01:00
parent 826de0edbf
commit 8a59cadd08
4 changed files with 10 additions and 41 deletions

View file

@ -1,8 +1,7 @@
import os import os
import uuid import uuid
from cognee.modules.data.processing.document_types.PdfDocument import \ from cognee.modules.data.processing.document_types.PdfDocument import PdfDocument
PdfDocument
GROUND_TRUTH = [ GROUND_TRUTH = [
{"word_count": 879, "len_text": 5622, "cut_type": "sentence_end"}, {"word_count": 879, "len_text": 5622, "cut_type": "sentence_end"},

View file

@ -5,41 +5,11 @@ from typing import Optional
import pytest import pytest
from cognee.infrastructure.engine import DataPoint from cognee.infrastructure.engine import DataPoint
from cognee.modules.graph.utils import (get_graph_from_model, from cognee.modules.graph.utils import (
get_model_instance_from_graph) get_graph_from_model,
get_model_instance_from_graph,
EDGE_GROUND_TRUTH = (
"boris",
"car1",
"owns_car",
{
"source_node_id": "boris",
"target_node_id": "car1",
"relationship_name": "owns_car",
"metadata": {"type": "list"},
},
) )
CAR_GROUND_TRUTH = {
"id": "car1",
"brand": "Toyota",
"model": "Camry",
"year": 2020,
"color": "Blue",
}
PERSON_GROUND_TRUTH = {
"id": "boris",
"name": "Boris",
"age": 30,
"driving_license": {
"issued_by": "PU Vrsac",
"issued_on": "2025-11-06",
"number": "1234567890",
"expires_on": "2025-11-06",
},
}
class CarTypeName(Enum): class CarTypeName(Enum):
Pickup = "Pickup" Pickup = "Pickup"

View file

@ -1,8 +1,9 @@
from cognee.infrastructure.engine import DataPoint from cognee.infrastructure.engine import DataPoint
from cognee.modules.graph.utils import (get_graph_from_model, from cognee.modules.graph.utils import (
get_model_instance_from_graph) get_graph_from_model,
from cognee.tests.unit.interfaces.graph.util import \ get_model_instance_from_graph,
run_test_against_ground_truth )
from cognee.tests.unit.interfaces.graph.util import run_test_against_ground_truth
EDGE_GROUND_TRUTH = ( EDGE_GROUND_TRUTH = (
"boris", "boris",

View file

@ -1,5 +1,4 @@
from cognee.tests.unit.interfaces.graph.util import \ from cognee.tests.unit.interfaces.graph.util import run_test_against_ground_truth
run_test_against_ground_truth
PARSED_PERSON_GROUND_TRUTH = { PARSED_PERSON_GROUND_TRUTH = {
"id": "boris", "id": "boris",