Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/improved dependency management #76

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Minor black and ruff refactoring changes.
proudfeet committed Sep 8, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 53563947d697d1590dfdc26da8c481bb4e9a53b1
6 changes: 3 additions & 3 deletions tests/test_monitoring/test_metric_service.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
@pytest.mark.parametrize(
"response, expectation",
[
(int(123), pytest.raises(TypeError)),
(123, pytest.raises(TypeError)),
(
{"incorrect key": "mock response", "dataset": "mock_dataset"},
pytest.raises(ValueError),
@@ -21,9 +21,9 @@
{"response": "mock response", "incorrect key": "mock_dataset"},
pytest.raises(ValueError),
),
({"response": int(123), "dataset": "mock_dataset"}, pytest.raises(TypeError)),
({"response": 123, "dataset": "mock_dataset"}, pytest.raises(TypeError)),
({"response": "", "dataset": "mock_dataset"}, pytest.raises(ValueError)),
({"response": "mock response", "dataset": int(123)}, pytest.raises(TypeError)),
({"response": "mock response", "dataset": 123}, pytest.raises(TypeError)),
({"response": "mock response", "dataset": ""}, pytest.raises(ValueError)),
({"response": "mock response", "dataset": "mock_dataset"}, does_not_raise()),
],
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
@pytest.mark.parametrize(
"reference_embeddings, current_embeddings, expectation",
[
(int(123), [[1.0, 2.1, 3.2], [3.1, 4.2, 5.3]], pytest.raises(TypeError)),
(123, [[1.0, 2.1, 3.2], [3.1, 4.2, 5.3]], pytest.raises(TypeError)),
(
[[1.1, 2.2, 3.3], ["a", "a", True]],
[[1.1, 2.2, 3.3], [3.1, 4.1, 5.1]],
6 changes: 2 additions & 4 deletions tests/test_utils/test_chroma_store.py
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ def __call__(self, texts: Documents) -> Embeddings:
Returns:
Embeddings: Return fixed embedding
"""
return [[float(1.0)] * 2 + [float(i)] for i in range(len(texts))]
return [[1.0] * 2 + [float(i)] for i in range(len(texts))]


@pytest.mark.parametrize(
@@ -104,9 +104,7 @@ def test_add_texts(local_persist_api: API):
"bdd740fb-0667-4ad1-9c80-317fa3b1799d",
]
input_texts = ["a", "b"]
expected_embeddings = [
[float(1.0)] * 2 + [float(i)] for i in range(len(input_texts))
]
expected_embeddings = [[1.0] * 2 + [float(i)] for i in range(len(input_texts))]

store = ChromaStore()
store._client = local_persist_api