manavgup / rag_modulo

1 stars 2 forks source link

Modify tests now that CollectionService constructor has been fixed #7

Open manavgup opened 2 months ago

manavgup commented 2 months ago
class CollectionService:
    """
    Service class for managing collections and their associated documents.
    """

    def __init__(self, db: Session):
        self.collection_repository = CollectionRepository(db)
        self.user_collection_repository = UserCollectionRepository(db)
        self.file_management_service = FileManagementService(db)
        self.vector_store = get_datastore(settings.vector_db)

PREVIOUSLY:

def __init__(self,
                 db: Session,
                 file_management_service: FileManagementService,
                 user_collection_service: UserCollectionService):
                 file_management_service: FileManagementService = None,
                 user_collection_service: UserCollectionService = None):
        self.collection_repository = CollectionRepository(db)
        self.file_management_service = file_management_service
        self.user_collection_service = user_collection_service
        self.file_management_service = file_management_service or FileManagementService(db)
        self.user_collection_service = user_collection_service or UserCollectionService(db)
        self.vector_store = get_datastore(settings.vector_db)

TASK:

  1. Find all references to CollectionService in tests and fix them. @LukeIBMNonEnterprise