Skip to content

Commit fe2a861

Browse files
committed
chore: bump version to 0.2.0 and test improvements
- Bump version from 0.1.5 to 0.2.0 - Add test duration reporting - Optimize test timings in watcher tests
1 parent 95d7acb commit fe2a861

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
test:
2-
poetry run pytest --cov=gptme_rag
2+
poetry run pytest --cov=gptme_rag --durations=5
33

44
# run linting, typechecking, and tests
55
check:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "gptme-rag"
3-
version = "0.1.5"
3+
version = "0.2.0"
44
description = "RAG implementation for gptme context management"
55
authors = ["Bob <[email protected]>"]
66
readme = "README.md"

tests/test_watcher.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_file_watcher_batch_updates(temp_workspace, indexer: Indexer):
131131
"""Test handling of multiple rapid updates."""
132132
test_file = temp_workspace / "test.txt"
133133

134-
def wait_for_index(content: str, retries: int = 15, delay: float = 0.3) -> bool:
134+
def wait_for_index(content: str, retries: int = 15, delay: float = 0.1) -> bool:
135135
"""Wait for content to appear in index with retries."""
136136
logger.info(f"Waiting for content to be indexed: {content}")
137137
for attempt in range(retries):
@@ -150,15 +150,14 @@ def wait_for_index(content: str, retries: int = 15, delay: float = 0.3) -> bool:
150150

151151
with FileWatcher(indexer, [str(temp_workspace)], update_delay=0.2):
152152
# Wait for watcher to initialize
153-
time.sleep(1.0)
153+
time.sleep(0.5)
154154
logger.info("Watcher initialized")
155155

156156
# Make multiple updates
157157
for i in range(5):
158158
content = f"Content version {i}"
159159
logger.info(f"Writing content: {content}")
160160
test_file.write_text(content)
161-
time.sleep(0.3) # Wait for file to be fully written
162161

163162
# Wait for update to be indexed with retries
164163
assert wait_for_index(content), f"Update not indexed: '{content}'"

0 commit comments

Comments
 (0)