-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/COG-553-graph-memory-projection
- Loading branch information
Showing
24 changed files
with
359 additions
and
183 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
72 changes: 0 additions & 72 deletions
72
cognee/infrastructure/engine/__tests__/model_to_graph_to_model.test.py
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
cognee/modules/data/processing/document_types/__tests__/PdfDocument.test.py
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-28.9 KB
cognee/modules/data/processing/document_types/__tests__/artificial-inteligence.pdf
Binary file not shown.
Binary file removed
BIN
-32.9 KB
cognee/modules/data/processing/document_types/__tests__/soldiers-home.pdf
Binary file not shown.
Empty file.
Binary file removed
BIN
-28.9 KB
cognee/modules/pipelines/operations/__tests__/artificial-inteligence.v1.pdf
Binary file not shown.
Binary file removed
BIN
-54.1 KB
cognee/modules/pipelines/operations/__tests__/artificial-inteligence.v2.pdf
Binary file not shown.
14 changes: 0 additions & 14 deletions
14
cognee/modules/pipelines/operations/__tests__/get_graph_url.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="session") | ||
def copy_cognee_db_to_target_location(): | ||
os.makedirs("cognee/.cognee_system/databases/", exist_ok=True) | ||
os.system( | ||
"cp cognee/tests/integration/run_toy_tasks/data/cognee_db cognee/.cognee_system/databases/cognee_db" | ||
) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
import uuid | ||
|
||
from cognee.modules.data.processing.document_types.PdfDocument import PdfDocument | ||
|
||
GROUND_TRUTH = [ | ||
{"word_count": 879, "len_text": 5622, "cut_type": "sentence_end"}, | ||
{"word_count": 951, "len_text": 6384, "cut_type": "sentence_end"}, | ||
] | ||
|
||
|
||
def test_PdfDocument(): | ||
test_file_path = os.path.join( | ||
os.sep, | ||
*(os.path.dirname(__file__).split(os.sep)[:-2]), | ||
"test_data", | ||
"artificial-intelligence.pdf", | ||
) | ||
pdf_doc = PdfDocument( | ||
id=uuid.uuid4(), name="Test document.pdf", raw_data_location=test_file_path | ||
) | ||
|
||
for ground_truth, paragraph_data in zip( | ||
GROUND_TRUTH, pdf_doc.read(chunk_size=1024) | ||
): | ||
assert ( | ||
ground_truth["word_count"] == paragraph_data.word_count | ||
), f'{ground_truth["word_count"] = } != {paragraph_data.word_count = }' | ||
assert ground_truth["len_text"] == len( | ||
paragraph_data.text | ||
), f'{ground_truth["len_text"] = } != {len(paragraph_data.text) = }' | ||
assert ( | ||
ground_truth["cut_type"] == paragraph_data.cut_type | ||
), f'{ground_truth["cut_type"] = } != {paragraph_data.cut_type = }' |
Oops, something went wrong.