Skip to content

Commit

Permalink
docs: Extend utils API docs coverage (#3402)
Browse files Browse the repository at this point in the history
* Add more utils modules

* Format docstrings

* Incorporate reviewer feedback
  • Loading branch information
brandenchan authored Oct 21, 2022
1 parent df4d20d commit 03ba07d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/_src/api/pydoc/utils.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
loaders:
- type: python
search_path: [../../../../haystack/utils]
modules: ['doc_store', 'export_utils', 'preprocessing', 'squad_data', 'early_stopping']
modules: ['doc_store', 'export_utils', 'preprocessing', 'squad_data', 'early_stopping', 'cleaning', 'context_matching', 'deepsetcloud', 'docker']
ignore_when_discovered: ['__init__']
processors:
- type: filter
Expand Down
22 changes: 15 additions & 7 deletions haystack/utils/doc_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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"
Expand All @@ -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(
Expand Down

0 comments on commit 03ba07d

Please sign in to comment.