From 702a3ed563bfca457a3cdd65e07c9cfbdc6a7d1b Mon Sep 17 00:00:00 2001
From: jamescalam <james.briggs@hotmail.com>
Date: Wed, 20 Nov 2024 15:05:26 +0100
Subject: [PATCH] feat: add test and update version

---
 docs/indexes/pinecone-sync-routes.ipynb |  2 +-
 docs/source/conf.py                     |  2 +-
 pyproject.toml                          |  2 +-
 semantic_router/__init__.py             |  2 +-
 tests/unit/test_sync.py                 | 15 +++++++++++++++
 5 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/docs/indexes/pinecone-sync-routes.ipynb b/docs/indexes/pinecone-sync-routes.ipynb
index 67738ebc..14e78905 100644
--- a/docs/indexes/pinecone-sync-routes.ipynb
+++ b/docs/indexes/pinecone-sync-routes.ipynb
@@ -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\""
    ]
   },
   {
diff --git a/docs/source/conf.py b/docs/source/conf.py
index aa9ffa73..2dae787f 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -15,7 +15,7 @@ sys.path.insert(0, os.path.abspath("../.."))  # Source code dir relative to this
 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
diff --git a/pyproject.toml b/pyproject.toml
index 42d11227..68881c73 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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 <hello@aurelio.ai>"]
 readme = "README.md"
diff --git a/semantic_router/__init__.py b/semantic_router/__init__.py
index a45ea30a..a2ed0d07 100644
--- a/semantic_router/__init__.py
+++ b/semantic_router/__init__.py
@@ -4,4 +4,4 @@ from semantic_router.route import Route
 
 __all__ = ["RouteLayer", "HybridRouteLayer", "Route", "LayerConfig"]
 
-__version__ = "0.1.0.dev0"
+__version__ = "0.1.0.dev1"
diff --git a/tests/unit/test_sync.py b/tests/unit/test_sync.py
index 296da0d2..c2ddee90 100644
--- a/tests/unit/test_sync.py
+++ b/tests/unit/test_sync.py
@@ -381,6 +381,21 @@ class TestRouteLayer:
                 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"
     )
-- 
GitLab