Skip to content

Commit

Permalink
Also add keys to show_history
Browse files Browse the repository at this point in the history
  • Loading branch information
cat-bro committed Feb 29, 2024
1 parent 4150d79 commit abf8f19
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions bioblend/galaxy/histories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _get_histories(
create_time_max: Optional[str] = None,
update_time_min: Optional[str] = None,
update_time_max: Optional[str] = None,
view: Optional[str] = "summary",
view: Optional[str] = None,
keys: Optional[List[str]] = None,
limit: Optional[int] = None,
offset: Optional[int] = None,
Expand Down Expand Up @@ -155,7 +155,7 @@ def get_histories(
create_time_max: Optional[str] = None,
update_time_min: Optional[str] = None,
update_time_max: Optional[str] = None,
view: Optional[str] = 'summary',
view: Optional[str] = None,
keys: Optional[List[str]] = None,
limit: Optional[int] = None,
offset: Optional[int] = None,
Expand Down Expand Up @@ -205,7 +205,7 @@ def get_histories(
:type view: str
:param view: Options are 'summary' or 'detailed'. This defaults to 'summary'.
Setting view to 'detailed' results in a larger number of fields returned.
Setting view to 'detailed' results in a larger number of fields returned.
:type keys: List[str]
:param keys: List of fields to return
Expand Down Expand Up @@ -316,6 +316,7 @@ def show_history(
visible: Optional[bool] = None,
details: Optional[str] = None,
types: Optional[List[str]] = None,
keys: Optional[List[str]] = None,
) -> List[Dict[str, Any]]: ...

# Fallback in case the caller provides a regular bool as contents
Expand All @@ -328,6 +329,7 @@ def show_history(
visible: Optional[bool] = None,
details: Optional[str] = None,
types: Optional[List[str]] = None,
keys: Optional[List[str]] = None,
) -> Union[Dict[str, Any], List[Dict[str, Any]]]:
pass

Expand All @@ -339,6 +341,7 @@ def show_history(
visible: Optional[bool] = None,
details: Optional[str] = None,
types: Optional[List[str]] = None,
keys: Optional[List[str]] = None,
) -> Union[Dict[str, Any], List[Dict[str, Any]]]:
"""
Get details of a given history. By default, just get the history meta
Expand Down Expand Up @@ -374,6 +377,9 @@ def show_history(
``['dataset_collection']``, return only dataset collections. If not
set, no filtering is applied.
:type keys: List[str]
:param keys: List of fields to return
:rtype: dict or list of dicts
:return: details of the given history or list of dataset info
Expand All @@ -393,6 +399,8 @@ def show_history(
params["visible"] = visible
if types is not None:
params["types"] = types
if keys:
params["keys"] = ",".join(keys)
return self._get(id=history_id, contents=contents, params=params)

def delete_dataset(self, history_id: str, dataset_id: str, purge: bool = False) -> None:
Expand Down

0 comments on commit abf8f19

Please sign in to comment.