[chore]: Rename modules for better readability and maintainability (#587)

This commit is contained in:
Deshraj Yadav
2023-09-10 18:31:40 -07:00
committed by GitHub
parent 6fed75bb45
commit 79f5a1d052
65 changed files with 109 additions and 108 deletions

View File

@@ -12,8 +12,8 @@ class TestChromaDbHostsLoglevel(unittest.TestCase):
@patch("chromadb.api.models.Collection.Collection.add")
@patch("chromadb.api.models.Collection.Collection.get")
@patch("embedchain.embedchain.EmbedChain.retrieve_from_database")
@patch("embedchain.llm.base_llm.BaseLlm.get_answer_from_llm")
@patch("embedchain.llm.base_llm.BaseLlm.get_llm_model_answer")
@patch("embedchain.llm.base.BaseLlm.get_answer_from_llm")
@patch("embedchain.llm.base.BaseLlm.get_llm_model_answer")
def test_whole_app(
self,
_mock_get,

View File

@@ -3,8 +3,8 @@ import unittest
from embedchain import App
from embedchain.config import AppConfig
from embedchain.helper_classes.json_serializable import (
JSONSerializable, register_deserializable)
from embedchain.helper.json_serializable import (JSONSerializable,
register_deserializable)
class TestJsonSerializable(unittest.TestCase):

View File

@@ -4,7 +4,7 @@ from unittest.mock import MagicMock, patch
from embedchain import App
from embedchain.config import AppConfig, BaseLlmConfig
from embedchain.llm.base_llm import BaseLlm
from embedchain.llm.base import BaseLlm
class TestApp(unittest.TestCase):

View File

@@ -7,7 +7,7 @@ from chromadb.config import Settings
from embedchain import App
from embedchain.config import AppConfig, ChromaDbConfig
from embedchain.vectordb.chroma_db import ChromaDB
from embedchain.vectordb.chroma import ChromaDB
class TestChromaDbHosts(unittest.TestCase):
@@ -46,7 +46,7 @@ class TestChromaDbHosts(unittest.TestCase):
# Review this test
class TestChromaDbHostsInit(unittest.TestCase):
@patch("embedchain.vectordb.chroma_db.chromadb.Client")
@patch("embedchain.vectordb.chroma.chromadb.Client")
def test_app_init_with_host_and_port(self, mock_client):
"""
Test if the `App` instance is initialized with the correct host and port values.
@@ -66,7 +66,7 @@ class TestChromaDbHostsInit(unittest.TestCase):
class TestChromaDbHostsNone(unittest.TestCase):
@patch("embedchain.vectordb.chroma_db.chromadb.Client")
@patch("embedchain.vectordb.chroma.chromadb.Client")
def test_init_with_host_and_port_none(self, mock_client):
"""
Test if the `App` instance is initialized without default hosts and ports.
@@ -80,7 +80,7 @@ class TestChromaDbHostsNone(unittest.TestCase):
class TestChromaDbHostsLoglevel(unittest.TestCase):
@patch("embedchain.vectordb.chroma_db.chromadb.Client")
@patch("embedchain.vectordb.chroma.chromadb.Client")
def test_init_with_host_and_port_log_level(self, mock_client):
"""
Test if the `App` instance is initialized without a config that does not contain default hosts and ports.

View File

@@ -1,8 +1,8 @@
import unittest
from embedchain.config import ElasticsearchDBConfig
from embedchain.embedder.base_embedder import BaseEmbedder
from embedchain.vectordb.elasticsearch_db import ElasticsearchDB
from embedchain.embedder.base import BaseEmbedder
from embedchain.vectordb.elasticsearch import ElasticsearchDB
class TestEsDB(unittest.TestCase):