Skip to content

Commit

Permalink
Restore position of all parameter in ``HistoryClient.get_historie…
Browse files Browse the repository at this point in the history
…s()``
  • Loading branch information
nsoranzo committed May 10, 2024
1 parent 1afbe68 commit 803b30d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
for Galaxy releases 23.2 and 24.0.

* Added ``wait`` parameter to ``HistoryClient.delete_dataset()`` and
``HistoryDatasetAssociation.delete()`` methods.
BioBlend.objects ``HistoryDatasetAssociation.delete()`` methods.

* Added ``create_time_min``, ``create_time_max``, ``update_time_min``,
``update_time_max``, ``view``, ``keys``, ``limit`` and ``offset`` parameters
to ``HistoryClient.get_histories()`` (thanks to
[cat-bro](https://github.com/cat-bro)).

* Added ``create_time_min``, ``create_time_max``, ``update_time_min`` and
``update_time_max`` parameters to ``HistoryClient.get_published_histories()``
(thanks to [cat-bro](https://github.com/cat-bro)).

* Added ``keys`` parameter to ``HistoryClient.show_history()`` (thanks to
[cat-bro](https://github.com/cat-bro)).

* Dropped broken ``deleted`` parameter of ``DatasetClient.show_dataset()``.

Expand Down
26 changes: 13 additions & 13 deletions bioblend/galaxy/histories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def _get_histories(
filter_user_published: Optional[bool] = None,
get_all_published: bool = False,
slug: Optional[str] = None,
all: Optional[bool] = False,
create_time_min: Optional[str] = None,
create_time_max: Optional[str] = None,
update_time_min: Optional[str] = None,
update_time_max: Optional[str] = None,
all: Optional[bool] = False,
view: Optional[Literal["summary", "detailed"]] = None,
keys: Optional[List[str]] = None,
limit: Optional[int] = None,
Expand All @@ -118,6 +118,8 @@ def _get_histories(
if slug is not None:
params.setdefault("q", []).append("slug")
params.setdefault("qv", []).append(slug)
if all:
params["all"] = True
if create_time_min:
params.setdefault("q", []).append("create_time-ge")
params.setdefault("qv", []).append(create_time_min)
Expand All @@ -130,8 +132,6 @@ def _get_histories(
if update_time_max:
params.setdefault("q", []).append("update_time-le")
params.setdefault("qv", []).append(update_time_max)
if all:
params["all"] = True
if view:
params["view"] = view
if keys:
Expand All @@ -155,11 +155,11 @@ def get_histories(
deleted: bool = False,
published: Optional[bool] = None,
slug: Optional[str] = None,
all: Optional[bool] = False,
create_time_min: Optional[str] = None,
create_time_max: Optional[str] = None,
update_time_min: Optional[str] = None,
update_time_max: Optional[str] = None,
all: Optional[bool] = False,
view: Optional[Literal["summary", "detailed"]] = None,
keys: Optional[List[str]] = None,
limit: Optional[int] = None,
Expand All @@ -186,6 +186,11 @@ def get_histories(
:type slug: str
:param slug: History slug to filter on
:type all: bool
:param all: Whether to include histories from other users. This
parameter works only on Galaxy 20.01 or later and can be specified
only if the user is a Galaxy admin.
:type create_time_min: str
:param create_time_min: Return histories created after the provided
time and date, which should be formatted as ``YYYY-MM-DDTHH-MM-SS``.
Expand All @@ -202,11 +207,6 @@ def get_histories(
:param update_time_max: Return histories last updated before the provided
time and date, which should be formatted as ``YYYY-MM-DDTHH-MM-SS``.
:type all: bool
:param all: Whether to include histories from other users. This
parameter works only on Galaxy 20.01 or later and can be specified
only if the user is a Galaxy admin.
: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.
Expand Down Expand Up @@ -239,14 +239,14 @@ def get_histories(
get_all_published=False,
slug=slug,
all=all,
view=view,
keys=keys,
limit=limit,
offset=offset,
create_time_min=create_time_min,
create_time_max=create_time_max,
update_time_min=update_time_min,
update_time_max=update_time_max,
view=view,
keys=keys,
limit=limit,
offset=offset,
)

def get_published_histories(
Expand Down

0 comments on commit 803b30d

Please sign in to comment.