Skip to content

Commit

Permalink
Drop broken deleted parameter of DatasetClient.show_dataset()
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Mar 7, 2024
1 parent 95b793a commit 1369958
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Dropped support for Python 3.7. Added support for Python 3.12. Added support
for Galaxy releases 23.2 and 24.0.

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

* Parameters after ``password`` in the ``__init__()`` method of the
``GalaxyClient``, ``GalaxyInstance`` and ``ToolShedInstance`` classes are now
keyword-only.
Expand Down
8 changes: 7 additions & 1 deletion bioblend/_tests/TestGalaxyDatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ def test_show_nonexistent_dataset(self):
self.gi.datasets.show_dataset("nonexistent_id")

def test_show_dataset(self):
self.gi.datasets.show_dataset(self.dataset_id)
dataset = self.gi.datasets.show_dataset(self.dataset_id)
assert dataset["id"] == self.dataset_id
assert not dataset["deleted"]
self.gi.histories.delete_dataset(self.history_id, self.dataset_id)
dataset = self.gi.datasets.show_dataset(self.dataset_id)
assert dataset["id"] == self.dataset_id
assert dataset["deleted"]

def test_download_dataset(self):
with pytest.raises((TypeError, ConnectionError)):
Expand Down
7 changes: 2 additions & 5 deletions bioblend/galaxy/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,13 @@ class DatasetClient(Client):
def __init__(self, galaxy_instance: "GalaxyInstance") -> None:
super().__init__(galaxy_instance)

def show_dataset(self, dataset_id: str, deleted: bool = False, hda_ldda: HdaLdda = "hda") -> Dict[str, Any]:
def show_dataset(self, dataset_id: str, hda_ldda: HdaLdda = "hda") -> Dict[str, Any]:
"""
Get details about a given dataset. This can be a history or a library dataset.
:type dataset_id: str
:param dataset_id: Encoded dataset ID
:type deleted: bool
:param deleted: Whether to return results for a deleted dataset
:type hda_ldda: str
:param hda_ldda: Whether to show a history dataset ('hda' - the default) or library
dataset ('ldda').
Expand All @@ -62,7 +59,7 @@ def show_dataset(self, dataset_id: str, deleted: bool = False, hda_ldda: HdaLdda
params = dict(
hda_ldda=hda_ldda,
)
return self._get(id=dataset_id, deleted=deleted, params=params)
return self._get(id=dataset_id, params=params)

def _initiate_download(
self, dataset_id: str, stream_content: bool, require_ok_state: bool = True, maxwait: float = 12000
Expand Down

0 comments on commit 1369958

Please sign in to comment.