From fb316a1a0d69f657102aecb5f33fd5e21b1fd761 Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Sat, 25 May 2024 14:17:36 +0200 Subject: [PATCH] try few things --- cognee/infrastructure/InfrastructureConfig.py | 8 ++++---- cognee/tests/test_library.py | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cognee/infrastructure/InfrastructureConfig.py b/cognee/infrastructure/InfrastructureConfig.py index 01a532c8e..a7dc5ec6a 100644 --- a/cognee/infrastructure/InfrastructureConfig.py +++ b/cognee/infrastructure/InfrastructureConfig.py @@ -45,10 +45,10 @@ class InfrastructureConfig(): def get_config(self, config_entity: str = None) -> dict: if (config_entity is None or config_entity == "database_engine") and self.database_engine is None: - if self.system_root_directory is None: - self.system_root_directory ='/Users/runner/work/cognee/cognee/.cognee_system' - if config.db_path is None: - config.db_path = "databases" + # if self.system_root_directory is None: + # self.system_root_directory ='/Users/runner/work/cognee/cognee/.cognee_system' + # if config.db_path is None: + # config.db_path = "databases" db_path = self.system_root_directory + "/" + config.db_path diff --git a/cognee/tests/test_library.py b/cognee/tests/test_library.py index 949df5282..b7ce292d2 100755 --- a/cognee/tests/test_library.py +++ b/cognee/tests/test_library.py @@ -3,23 +3,23 @@ async def main(): import pathlib import cognee - print("Working dir: ", str(pathlib.Path(__file__).parent)) - data_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.data")).resolve()) - print("Data dir: ", data_directory_path) - cognee.config.data_root_directory(data_directory_path) - - cognee_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.cognee_system")).resolve()) - print("System dir: ", cognee_directory_path) - cognee.config.system_root_directory(cognee_directory_path) + # print("Working dir: ", str(pathlib.Path(__file__).parent)) + # data_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.data")).resolve()) + # print("Data dir: ", data_directory_path) + # cognee.config.data_root_directory(data_directory_path) + # + # cognee_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.cognee_system")).resolve()) + # print("System dir: ", cognee_directory_path) + # cognee.config.system_root_directory(cognee_directory_path) dataset_name = "cs_explanations" - explanation_file_path = path.join(pathlib.Path(__file__).parent, "test_data/Natural_language_processing.txt") + explanation_file_path = path.join("/Users/runner/work/cognee/cognee/tests/", "test_data/Natural_language_processing.txt") await cognee.add([explanation_file_path], dataset_name) dataset_name = "short_stories" # data_directory_path is defined above - await cognee.add("data://" + data_directory_path, dataset_name) + await cognee.add("data://" + "/Users/runner/work/cognee/cognee/tests/", dataset_name) text_1 = """A quantum computer is a computer that takes advantage of quantum mechanical phenomena. At small scales, physical matter exhibits properties of both particles and waves, and quantum computing leverages this behavior, specifically quantum superposition and entanglement, using specialized hardware that supports the preparation and manipulation of quantum states.