Skip to content

Commit

Permalink
Rename documentation to marqo_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidz committed Feb 1, 2024
1 parent 1ad3d51 commit c5e2637
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/marqo/tensor_search/index_meta_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import time
from typing import Dict

from marqo import documentation
from marqo import marqo_docs
from marqo.api import exceptions
from marqo.config import Config
from marqo.core.exceptions import IndexNotFoundError
Expand Down Expand Up @@ -114,7 +114,7 @@ def refresh():
logger.warn(
"Failed to connect to vector store. If you are using an external vector store, "
"ensure that Marqo is configured properly for this. See "
f"{documentation.configuring_marqo()} for more details. Error: {e}"
f"{marqo_docs.configuring_marqo()} for more details. Error: {e}"
)
except Exception as e:
logger.error(f'Unexpected error in index cache refresh thread: {e}')
Expand Down
4 changes: 2 additions & 2 deletions src/marqo/tensor_search/on_start_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import torch

from marqo import config, documentation, version
from marqo import config, marqo_docs, version
from marqo.api import exceptions
from marqo.connections import redis_driver
from marqo.s2_inference.s2_inference import vectorise
Expand Down Expand Up @@ -54,7 +54,7 @@ def run(self):
logger.warn(
f"Could not create Marqo settings schema. If you are using an external vector store, "
"ensure that Marqo is configured properly for this. See "
f"{documentation.configuring_marqo()} for more details. Error: {e}"
f"{marqo_docs.configuring_marqo()} for more details. Error: {e}"
)


Expand Down
8 changes: 4 additions & 4 deletions tests/test_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

import httpx

from marqo import documentation
from marqo import marqo_docs


class TestDocumentation(unittest.TestCase):
def test_urls(self):
# Retrieve all public functions in the module
public_functions = [func for func in dir(documentation)
if callable(getattr(documentation, func)) and not func.startswith("_")]
public_functions = [func for func in dir(marqo_docs)
if callable(getattr(marqo_docs, func)) and not func.startswith("_")]

# Verify all URLs return a 200 response
for func in public_functions:
with self.subTest(func=func):
url = getattr(documentation, func)()
url = getattr(marqo_docs, func)()
response = httpx.get(url, follow_redirects=True)
response.raise_for_status()
self.assertFalse('404.html' in response.content.decode(), f"{func} URL returned a 404 response")

0 comments on commit c5e2637

Please sign in to comment.