diff --git a/doc/source/releases/22.01_announce_user.rst b/doc/source/releases/22.01_announce_user.rst index c598d9c8743..283696d75d4 100644 --- a/doc/source/releases/22.01_announce_user.rst +++ b/doc/source/releases/22.01_announce_user.rst @@ -14,9 +14,7 @@ Do you use tools which require colour inputs, like Circos? Previously we had a r .. raw:: html - + **Improved File Export** @@ -25,9 +23,7 @@ If you've been exporting files from Galaxy lately, you've probably seen the amaz .. raw:: html - + **Improved File Uploads** @@ -142,7 +138,7 @@ A special thanks to the release testing team for testing many of the new feature - `Natalie Kucher `_ - `Alex Ostrovsky `_ - `Enis Afgan `_ - + Release Notes =========================================================== diff --git a/doc/source/releases/images/22.01-colour.mp4 b/doc/source/releases/images/22.01-colour.mp4 deleted file mode 100644 index b8ca5236894..00000000000 Binary files a/doc/source/releases/images/22.01-colour.mp4 and /dev/null differ diff --git a/doc/source/releases/images/22.01-export.mp4 b/doc/source/releases/images/22.01-export.mp4 deleted file mode 100644 index e832b0a2948..00000000000 Binary files a/doc/source/releases/images/22.01-export.mp4 and /dev/null differ diff --git a/lib/galaxy/managers/histories.py b/lib/galaxy/managers/histories.py index fbb55adeb78..f3aba257d70 100644 --- a/lib/galaxy/managers/histories.py +++ b/lib/galaxy/managers/histories.py @@ -480,9 +480,11 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri "size": lambda item, key, **context: int(item.disk_size), "nice_size": lambda item, key, **context: item.disk_nice_size, "state": self.serialize_history_state, - "url": lambda item, key, **context: self.url_for("history", id=self.app.security.encode_id(item.id)), + "url": lambda item, key, **context: self.url_for( + "history", id=self.app.security.encode_id(item.id), context=context + ), "contents_url": lambda item, key, **context: self.url_for( - "history_contents", history_id=self.app.security.encode_id(item.id) + "history_contents", history_id=self.app.security.encode_id(item.id), context=context ), "empty": lambda item, key, **context: (len(item.datasets) + len(item.dataset_collections)) <= 0, "count": lambda item, key, **context: len(item.datasets), diff --git a/lib/galaxy/webapps/galaxy/api/histories.py b/lib/galaxy/webapps/galaxy/api/histories.py index 2c3c7a8484c..89301104502 100644 --- a/lib/galaxy/webapps/galaxy/api/histories.py +++ b/lib/galaxy/webapps/galaxy/api/histories.py @@ -180,6 +180,7 @@ class FastAPIHistories: @router.get( "/api/histories/{id}", + name="history", summary="Returns the history with the given ID.", ) def show( diff --git a/lib/galaxy_test/api/test_histories.py b/lib/galaxy_test/api/test_histories.py index a5d15b2f63f..19090524b4d 100644 --- a/lib/galaxy_test/api/test_histories.py +++ b/lib/galaxy_test/api/test_histories.py @@ -93,6 +93,15 @@ class HistoriesApiTestCase(ApiTestCase, BaseHistories): self._assert_has_keys(state_details, *states) self._assert_has_keys(state_ids, *states) + def test_show_history_returns_expected_urls(self): + # This test can be dropped when the URL attributes become deprecated + history_id = self._create_history("TestHistoryForUrls")["id"] + show_response = self._show(history_id) + self._assert_has_key(show_response, "id", "url", "contents_url") + + assert show_response["url"] == f"/api/histories/{history_id}" + assert show_response["contents_url"] == f"/api/histories/{history_id}/contents" + def test_show_most_recently_used(self): history_id = self._create_history("TestHistoryRecent")["id"] show_response = self._get("histories/most_recently_used").json()