From ae6826b40240b18a4e954e985fb02e75cf1ba72f Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Mon, 18 Nov 2024 23:34:19 -0400 Subject: [PATCH] fix: Rename Spacy to SpaCy --- src/rago/augmented/__init__.py | 4 ++-- src/rago/augmented/spacy.py | 2 +- tests/test_retrieval_pdf.py | 4 ++-- tests/test_spacy.py | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/rago/augmented/__init__.py b/src/rago/augmented/__init__.py index 0e97d00..1d7ed5b 100644 --- a/src/rago/augmented/__init__.py +++ b/src/rago/augmented/__init__.py @@ -5,11 +5,11 @@ from rago.augmented.base import AugmentedBase from rago.augmented.openai import OpenAIAug from rago.augmented.sentence_transformer import SentenceTransformerAug -from rago.augmented.spacy import SpacyAug +from rago.augmented.spacy import SpaCyAug __all__ = [ 'AugmentedBase', 'OpenAIAug', 'SentenceTransformerAug', - 'SpacyAug', + 'SpaCyAug', ] diff --git a/src/rago/augmented/spacy.py b/src/rago/augmented/spacy.py index 009fe95..67ccd34 100644 --- a/src/rago/augmented/spacy.py +++ b/src/rago/augmented/spacy.py @@ -18,7 +18,7 @@ @typechecked -class SpacyAug(AugmentedBase): +class SpaCyAug(AugmentedBase): """Class for augmentation with SpaCy embeddings.""" default_model_name = 'en_core_web_md' diff --git a/tests/test_retrieval_pdf.py b/tests/test_retrieval_pdf.py index c64841f..f4b78da 100644 --- a/tests/test_retrieval_pdf.py +++ b/tests/test_retrieval_pdf.py @@ -4,7 +4,7 @@ import pytest -from rago.augmented import SpacyAug +from rago.augmented import SpaCyAug from rago.retrieval import PDFPathRet PDF_DATA_PATH = Path(__file__).parent / 'data' / 'pdf' @@ -43,7 +43,7 @@ def test_retrieval_pdfs_extraction_aug_spacy( aug_top_k = 3 - aug_openai = SpacyAug(top_k=aug_top_k) + aug_openai = SpaCyAug(top_k=aug_top_k) aug_result = aug_openai.search(query, documents=chunks) assert aug_result diff --git a/tests/test_spacy.py b/tests/test_spacy.py index be25841..fc304ad 100644 --- a/tests/test_spacy.py +++ b/tests/test_spacy.py @@ -1,11 +1,11 @@ -"""Tests for Rago package using Spacy.""" +"""Tests for Rago package using SpaCy.""" -from rago.augmented import SpacyAug +from rago.augmented import SpaCyAug from rago.retrieval import StringRet def test_aug_spacy(animals_data: list[str]) -> None: - """Test RAG pipeline with Spacy.""" + """Test RAG pipeline with SpaCy.""" logs = { 'augmented': {}, } @@ -14,7 +14,7 @@ def test_aug_spacy(animals_data: list[str]) -> None: top_k = 3 ret_string = StringRet(animals_data) - aug_openai = SpacyAug( + aug_openai = SpaCyAug( top_k=top_k, logs=logs['augmented'], )