From d9b66a89599a3433d0046aafbbb2bc9474342eb7 Mon Sep 17 00:00:00 2001 From: Branden Chan <33759007+brandenchan@users.noreply.github.com> Date: Fri, 21 Oct 2022 12:51:11 +0100 Subject: [PATCH] docs: Extend utils API docs coverage (#3402) * Add more utils modules * Format docstrings * Incorporate reviewer feedback --- haystack/utils/doc_store.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/haystack/utils/doc_store.py b/haystack/utils/doc_store.py index 2e8423149b..9d34618c5a 100644 --- a/haystack/utils/doc_store.py +++ b/haystack/utils/doc_store.py @@ -16,7 +16,9 @@ def launch_es(sleep=15, delete_existing=False): - # Start an Elasticsearch server via Docker + """ + Start an Elasticsearch server via Docker. + """ logger.debug("Starting Elasticsearch ...") if delete_existing: @@ -37,8 +39,9 @@ def launch_es(sleep=15, delete_existing=False): def launch_opensearch(sleep=15, delete_existing=False): - # Start an OpenSearch server via docker - + """ + Start an OpenSearch server via Docker. + """ logger.debug("Starting OpenSearch...") # This line is needed since it is not possible to start a new docker container with the name opensearch if there is a stopped image with the same now # docker rm only succeeds if the container is stopped, not if it is running @@ -60,7 +63,9 @@ def launch_opensearch(sleep=15, delete_existing=False): def launch_weaviate(sleep=15): - # Start a Weaviate server via Docker + """ + Start a Weaviate server via Docker. + """ logger.debug("Starting Weaviate ...") status = subprocess.run( @@ -121,8 +126,9 @@ def stop_service(document_store, delete_container=False): def launch_milvus(sleep=15, delete_existing=False): - # Start a Milvus server via docker - + """ + Start a Milvus server via Docker + """ logger.debug("Starting Milvus ...") milvus_dir = Path.home() / "milvus" @@ -146,7 +152,9 @@ def launch_milvus(sleep=15, delete_existing=False): def launch_milvus1(sleep=15): - # Start a Milvus (version <2.0.0) server via docker + """ + Start a Milvus (version <2.0.0) server via Docker + """ logger.debug("Starting Milvus ...") logger.warning(