Skip to content

Commit

Permalink
feat: add test and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Nov 20, 2024
1 parent a2ef8fe commit 702a3ed
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/indexes/pinecone-sync-routes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install -qU \"semantic-router[pinecone]==0.1.0.dev0\""
"!pip install -qU \"semantic-router[pinecone]==0.1.0.dev1\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
project = "Semantic Router"
copyright = "2024, Aurelio AI"
author = "Aurelio AI"
release = "0.1.0.dev0"
release = "0.1.0.dev1"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "semantic-router"
version = "0.1.0.dev0"
version = "0.1.0.dev1"
description = "Super fast semantic router for AI decision making"
authors = ["Aurelio AI <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion semantic_router/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__all__ = ["RouteLayer", "HybridRouteLayer", "Route", "LayerConfig"]

__version__ = "0.1.0.dev0"
__version__ = "0.1.0.dev1"
15 changes: 15 additions & 0 deletions tests/unit/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,21 @@ def test_auto_sync_merge_force_remote(
Utterance(route="Route 3", utterance="Boo"),
], "The routes in the index should match the local routes"

@pytest.mark.skipif(
os.environ.get("PINECONE_API_KEY") is None, reason="Pinecone API key required"
)
def test_sync(self, openai_encoder, index_cls):
route_layer = RouteLayer(
encoder=openai_encoder,
routes=[],
index=init_index(index_cls),
sync=None,
)
route_layer.sync("remote")
time.sleep(PINECONE_SLEEP) # allow for index to be populated
# confirm local and remote are synced
assert route_layer.is_synced()

@pytest.mark.skipif(
os.environ.get("PINECONE_API_KEY") is None, reason="Pinecone API key required"
)
Expand Down

0 comments on commit 702a3ed

Please sign in to comment.