Skip to content

Commit

Permalink
Merge pull request #653 from andreped/add-missing-import-tests
Browse files Browse the repository at this point in the history
Added missing import tests; added missing modules to pyproject
  • Loading branch information
zainhoda authored Sep 27, 2024
2 parents 8263d0d + f5bc5fa commit ba657ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bigquery = ["google-cloud-bigquery"]
snowflake = ["snowflake-connector-python"]
duckdb = ["duckdb"]
google = ["google-generativeai", "google-cloud-aiplatform"]
all = ["psycopg2-binary", "db-dtypes", "PyMySQL", "google-cloud-bigquery", "snowflake-connector-python", "duckdb", "openai", "qianfan", "mistralai>=1.0.0", "chromadb", "anthropic", "zhipuai", "marqo", "google-generativeai", "google-cloud-aiplatform", "qdrant-client", "fastembed", "ollama", "httpx", "opensearch-py", "opensearch-dsl", "transformers", "pinecone-client", "pymilvus[model]","weaviate-client", "azure-search-documents", "azure-identity", "azure-common"]
all = ["psycopg2-binary", "db-dtypes", "PyMySQL", "google-cloud-bigquery", "snowflake-connector-python", "duckdb", "openai", "qianfan", "mistralai>=1.0.0", "chromadb", "anthropic", "zhipuai", "marqo", "google-generativeai", "google-cloud-aiplatform", "qdrant-client", "fastembed", "ollama", "httpx", "opensearch-py", "opensearch-dsl", "transformers", "pinecone-client", "pymilvus[model]","weaviate-client", "azure-search-documents", "azure-identity", "azure-common", "faiss-cpu", "boto", "botocore"]
test = ["tox"]
chromadb = ["chromadb"]
openai = ["openai"]
Expand All @@ -53,3 +53,5 @@ milvus = ["pymilvus[model]"]
bedrock = ["boto3", "botocore"]
weaviate = ["weaviate-client"]
azuresearch = ["azure-search-documents", "azure-identity", "azure-common", "fastembed"]
faiss-cpu = ["faiss-cpu"]
faiss-gpu = ["faiss-gpu"]
17 changes: 15 additions & 2 deletions tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

def test_regular_imports():
from vanna.anthropic.anthropic_chat import Anthropic_Chat
from vanna.azuresearch.azuresearch_vector import AzureAISearch_VectorStore
from vanna.base.base import VannaBase
from vanna.bedrock.bedrock_converse import Bedrock_Converse
from vanna.chromadb.chromadb_vector import ChromaDB_VectorStore
from vanna.faiss.faiss import FAISS
from vanna.google.bigquery_vector import BigQuery_VectorStore
from vanna.google.gemini_chat import GoogleGeminiChat
from vanna.hf.hf import Hf
from vanna.local import LocalContext_OpenAI
from vanna.marqo.marqo import Marqo_VectorStore
Expand All @@ -14,17 +19,23 @@ def test_regular_imports():
from vanna.openai.openai_embeddings import OpenAI_Embeddings
from vanna.opensearch.opensearch_vector import OpenSearch_VectorStore
from vanna.pinecone.pinecone_vector import PineconeDB_VectorStore
from vanna.qdrant.qdrant import Qdrant_VectorStore
from vanna.qianfan.Qianfan_Chat import Qianfan_Chat
from vanna.qianfan.Qianfan_embeddings import Qianfan_Embeddings
from vanna.qianwen.QianwenAI_chat import QianWenAI_Chat
from vanna.qianwen.QianwenAI_embeddings import QianWenAI_Embeddings
from vanna.remote import VannaDefault
from vanna.vannadb.vannadb_vector import VannaDB_VectorStore
from vanna.weaviate.weaviate_vector import WeaviateDatabase
from vanna.ZhipuAI.ZhipuAI_Chat import ZhipuAI_Chat
from vanna.ZhipuAI.ZhipuAI_embeddings import ZhipuAI_Embeddings
from vanna.azuresearch.azuresearch_vector import AzureAISearch_VectorStore

def test_shortcut_imports():
from vanna.anthropic import Anthropic_Chat
from vanna.azuresearch import AzureAISearch_VectorStore
from vanna.base import VannaBase
from vanna.chromadb import ChromaDB_VectorStore
from vanna.faiss import FAISS
from vanna.hf import Hf
from vanna.marqo import Marqo_VectorStore
from vanna.milvus import Milvus_VectorStore
Expand All @@ -33,8 +44,10 @@ def test_shortcut_imports():
from vanna.openai import OpenAI_Chat, OpenAI_Embeddings
from vanna.opensearch import OpenSearch_VectorStore
from vanna.pinecone import PineconeDB_VectorStore
from vanna.qdrant import Qdrant_VectorStore
from vanna.qianfan import Qianfan_Chat, Qianfan_Embeddings
from vanna.qianwen import QianWenAI_Chat, QianWenAI_Embeddings
from vanna.vannadb import VannaDB_VectorStore
from vanna.vllm import Vllm
from vanna.weaviate import WeaviateDatabase
from vanna.ZhipuAI import ZhipuAI_Chat, ZhipuAI_Embeddings
from vanna.azuresearch import AzureAISearch_VectorStore

0 comments on commit ba657ef

Please sign in to comment.