Skip to content

Commit

Permalink
fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Oct 19, 2023
1 parent 5a163b3 commit fb02932
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
8 changes: 8 additions & 0 deletions pipestat/backends/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def retrieve_multiple(
limit: Optional[int] = 1000,
offset: Optional[int] = 0,
) -> Union[Any, Dict[str, Any]]:
"""
:param List[str] record_identifier: list of record identifiers
:param List[str] result_identifier: list of result identifiers to be retrieved
:param int limit: limit number of records to this amount
:param int offset: offset records by this amount
:return Dict[str, any]: a mapping with filtered results reported for the record
"""

_LOGGER.warning("Not implemented yet for this backend")
pass

Check warning on line 203 in pipestat/backends/abstract.py

View check run for this annotation

Codecov / codecov/patch

pipestat/backends/abstract.py#L202-L203

Added lines #L202 - L203 were not covered by tests

Expand Down
8 changes: 8 additions & 0 deletions pipestat/backends/dbbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,14 @@ def retrieve_multiple(
limit: Optional[int] = 1000,
offset: Optional[int] = 0,
) -> Union[Any, Dict[str, Any]]:
"""
:param List[str] record_identifier: list of record identifiers
:param List[str] result_identifier: list of result identifiers to be retrieved
:param int limit: limit number of records to this amount
:param int offset: offset records by this amount
:return Dict[str, any]: a mapping with filtered results reported for the record
"""

record_list = []

if result_identifier == []:
Expand Down
8 changes: 8 additions & 0 deletions pipestat/backends/filebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,14 @@ def retrieve_multiple(
limit: Optional[int] = 1000,
offset: Optional[int] = 0,
) -> Union[Any, Dict[str, Any]]:
"""
:param List[str] record_identifier: list of record identifiers
:param List[str] result_identifier: list of result identifiers to be retrieved
:param int limit: limit number of records to this amount
:param int offset: offset records by this amount
:return Dict[str, any]: a mapping with filtered results reported for the record
"""

record_list = []

if result_identifier == []:
Expand Down
10 changes: 5 additions & 5 deletions pipestat/pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ def retrieve_distinct(
@require_backend
def retrieve(
self,
record_identifier: Optional[str] = None,
result_identifier: Optional[str] = None,
record_identifier: Optional[Union[str, List[str]]] = None,
result_identifier: Optional[Union[str, List[str]]] = None,
limit: Optional[int] = 1000,
offset: Optional[int] = 0,
) -> Union[Any, Dict[str, Any]]:
Expand All @@ -508,11 +508,11 @@ def retrieve(
If no result ID specified, results for the entire record will
be returned.
:param str record_identifier: name of the sample_level record
:param str result_identifier: name of the result to be retrieved
:param str | List[str] record_identifier: name of the sample_level record
:param str | List[str] result_identifier: name of the result to be retrieved
:param int limit: limit number of records to this amount
:param int offset: offset records by this amount
:return any | Dict[str, any]: a single result or a mapping with all the
:return any | Dict[str, any]: a single result or a mapping with filtered
results reported for the record
"""
if record_identifier is None and result_identifier is None:
Expand Down

0 comments on commit fb02932

Please sign in to comment.