From 103f6bdba550d0778d6e40fedc0a942218a7aafc Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Jan 2024 11:00:42 +0100 Subject: [PATCH 1/4] Always copy datasets in collection builder modals Fixes https://github.com/galaxyproject/galaxy/issues/17249 --- .../src/components/Collections/ListCollectionCreatorModal.js | 4 +--- .../src/components/Collections/PairCollectionCreatorModal.js | 4 +--- .../Collections/PairedListCollectionCreatorModal.js | 4 +--- .../components/Collections/RuleBasedCollectionCreatorModal.js | 3 +-- .../src/components/History/adapters/buildCollectionModal.js | 3 +-- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/client/src/components/Collections/ListCollectionCreatorModal.js b/client/src/components/Collections/ListCollectionCreatorModal.js index 7f0ee56abc21..41b84c896345 100644 --- a/client/src/components/Collections/ListCollectionCreatorModal.js +++ b/client/src/components/Collections/ListCollectionCreatorModal.js @@ -28,7 +28,6 @@ function listCollectionCreatorModal(elements, options) { */ function createListCollection(contents, defaultHideSourceItems = true) { const elements = contents.toJSON(); - let copyElements; const promise = listCollectionCreatorModal(elements, { defaultHideSourceItems: defaultHideSourceItems, creationFn: function (elements, name, hideSourceItems) { @@ -38,8 +37,7 @@ function createListCollection(contents, defaultHideSourceItems = true) { //TODO: this allows for list:list even if the filter above does not - reconcile src: element.src || (element.history_content_type == "dataset" ? "hda" : "hdca"), })); - copyElements = !hideSourceItems; - return contents.createHDCA(elements, "list", name, hideSourceItems, copyElements); + return contents.createHDCA(elements, "list", name, hideSourceItems); }, }); return promise; diff --git a/client/src/components/Collections/PairCollectionCreatorModal.js b/client/src/components/Collections/PairCollectionCreatorModal.js index 7d9fe752d0f9..4eb362b2ad44 100644 --- a/client/src/components/Collections/PairCollectionCreatorModal.js +++ b/client/src/components/Collections/PairCollectionCreatorModal.js @@ -24,7 +24,6 @@ function pairCollectionCreatorModal(elements, options) { } function createPairCollection(contents, defaultHideSourceItems = true) { var elements = contents.toJSON(); - var copyElements; var promise = pairCollectionCreatorModal(elements, { defaultHideSourceItems: defaultHideSourceItems, creationFn: function (elements, name, hideSourceItems) { @@ -32,8 +31,7 @@ function createPairCollection(contents, defaultHideSourceItems = true) { { name: "forward", src: elements[0].src || "hda", id: elements[0].id }, { name: "reverse", src: elements[1].src || "hda", id: elements[1].id }, ]; - copyElements = !hideSourceItems; - return contents.createHDCA(elements, "paired", name, hideSourceItems, copyElements); + return contents.createHDCA(elements, "paired", name, hideSourceItems); }, }); return promise; diff --git a/client/src/components/Collections/PairedListCollectionCreatorModal.js b/client/src/components/Collections/PairedListCollectionCreatorModal.js index d455128f46a8..12f0a59944be 100644 --- a/client/src/components/Collections/PairedListCollectionCreatorModal.js +++ b/client/src/components/Collections/PairedListCollectionCreatorModal.js @@ -27,7 +27,6 @@ function pairedListCollectionCreatorModal(elements, options) { */ function createPairedListCollection(contents, defaultHideSourceItems) { const elements = contents.toJSON(); - var copyElements; const promise = pairedListCollectionCreatorModal(elements, { defaultHideSourceItems: defaultHideSourceItems, creationFn: function (elements, name, hideSourceItems) { @@ -48,8 +47,7 @@ function createPairedListCollection(contents, defaultHideSourceItems) { }, ], })); - copyElements = !hideSourceItems; - return contents.createHDCA(elements, "list:paired", name, hideSourceItems, copyElements); + return contents.createHDCA(elements, "list:paired", name, hideSourceItems); }, }); return promise; diff --git a/client/src/components/Collections/RuleBasedCollectionCreatorModal.js b/client/src/components/Collections/RuleBasedCollectionCreatorModal.js index 46fb48e879b2..b29778db23cd 100644 --- a/client/src/components/Collections/RuleBasedCollectionCreatorModal.js +++ b/client/src/components/Collections/RuleBasedCollectionCreatorModal.js @@ -47,7 +47,6 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) { let elementsType; let importType; const selectionType = selection.selectionType; - const copyElements = !defaultHideSourceItems; if (!selectionType) { // Have HDAs from the history panel. elements = selection.toJSON(); @@ -81,7 +80,7 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) { ftpUploadSite: selection.ftpUploadSite, defaultHideSourceItems: defaultHideSourceItems, creationFn: function (elements, collectionType, name, hideSourceItems) { - return selection.createHDCA(elements, collectionType, name, hideSourceItems, copyElements); + return selection.createHDCA(elements, collectionType, name, hideSourceItems); }, }); return promise; diff --git a/client/src/components/History/adapters/buildCollectionModal.js b/client/src/components/History/adapters/buildCollectionModal.js index 355204c9675c..1be6cc19f605 100644 --- a/client/src/components/History/adapters/buildCollectionModal.js +++ b/client/src/components/History/adapters/buildCollectionModal.js @@ -45,12 +45,11 @@ const createBackboneContent = (historyId, selection) => { toJSON: () => selectionJson, // result must be a $.Deferred object instead of a promise because // that's the kind of deprecated data format that backbone likes to use. - createHDCA(element_identifiers, collection_type, name, hide_source_items, copy_elements, options = {}) { + createHDCA(element_identifiers, collection_type, name, hide_source_items, options = {}) { const def = jQuery.Deferred(); return def.resolve(null, { collection_type, name, - copy_elements, hide_source_items, element_identifiers, options, From e4f8315c2bacce38f3e37e7cde559a727cc548f5 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Jan 2024 12:33:12 +0100 Subject: [PATCH 2/4] Adjust selenium tests for new numbering --- .../selenium/test_collection_builders.py | 12 +++++++----- lib/galaxy_test/selenium/test_collection_edit.py | 6 +++--- lib/galaxy_test/selenium/test_uploads.py | 16 ++++++++++------ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_builders.py b/lib/galaxy_test/selenium/test_collection_builders.py index 40de27bab006..ec03563d0343 100644 --- a/lib/galaxy_test/selenium/test_collection_builders.py +++ b/lib/galaxy_test/selenium/test_collection_builders.py @@ -17,7 +17,7 @@ def test_build_list_simple_hidden(self): self.collection_builder_set_name("my cool list") self.screenshot("collection_builder_list") self.collection_builder_create() - self._wait_for_hid_visible(2) + self._wait_for_hid_visible(3) @selenium_test @managed_history @@ -30,7 +30,6 @@ def test_build_list_and_show_items(self): self.collection_builder_hide_originals() self.collection_builder_set_name("my cool list") self.collection_builder_create() - self.home() # this shouldn't be necessary, and it isn't with a real browser. self._wait_for_hid_visible(3) @selenium_test @@ -43,7 +42,7 @@ def test_build_pair_simple_hidden(self): self.collection_builder_set_name("my awesome pair") self.screenshot("collection_builder_pair") self.collection_builder_create() - self._wait_for_hid_visible(3) + self._wait_for_hid_visible(5) @selenium_test @managed_history @@ -58,11 +57,13 @@ def test_build_paired_list_simple(self): self.collection_builder_set_name("my awesome paired list") self.screenshot("collection_builder_paired_list") self.collection_builder_create() - self._wait_for_hid_visible(3) + self._wait_for_hid_visible(5) # switch to hidden filters to see the hidden datasets appear self._show_hidden_content() self._wait_for_hid_visible(1) self._wait_for_hid_visible(2) + self._wait_for_hid_visible(3) + self._wait_for_hid_visible(4) @selenium_test @managed_history @@ -98,9 +99,10 @@ def test_build_simple_list_via_rules_hidden(self): self.collection_builder_set_name("my cool list") self.screenshot("collection_builder_rules_list") self.collection_builder_create() - self._wait_for_hid_visible(2) + self._wait_for_hid_visible(3) self._show_hidden_content() self._wait_for_hid_visible(1) + self._wait_for_hid_visible(2) def _wait_for_hid_visible(self, hid, state="ok"): # takes a little while for these things to upload and end up in the history diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 037f7d84d644..09ff53d71d55 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -20,7 +20,7 @@ def test_change_dbkey_simple_list(self): self.check_current_data_value(dataValue) dataNew = "hg17" self.change_dbkey_value_and_click_submit(dataValue, dataNew) - self.history_panel_wait_for_hid_ok(4) + self.history_panel_wait_for_hid_ok(5) self.open_collection_edit_view() self.navigate_to_database_tab() self.check_current_data_value(dataNew) @@ -42,7 +42,7 @@ def test_change_datatype_simple_list(self): self.change_datatype_value_and_click_submit(dataValue, dataNew) self.check_current_data_value(dataNew) self.wait_for_history() - self.history_panel_expand_collection(2) + self.history_panel_expand_collection(3) self.history_panel_ensure_showing_item_details(1) item = self.history_panel_item_component(hid=1) item.datatype.wait_for_visible() @@ -56,7 +56,7 @@ def _create_simple_list_collection(self, filename, ext): self.collection_builder_set_name("my cool list") self.collection_builder_create() - self._wait_for_hid_visible(2) + self._wait_for_hid_visible(3) def open_collection_edit_view(self): self.components.history_panel.collection_menu_edit_attributes.wait_for_and_click() diff --git a/lib/galaxy_test/selenium/test_uploads.py b/lib/galaxy_test/selenium/test_uploads.py index c2c45a564c92..ddaddff0873b 100644 --- a/lib/galaxy_test/selenium/test_uploads.py +++ b/lib/galaxy_test/selenium/test_uploads.py @@ -118,11 +118,11 @@ def test_upload_deferred(self): @selenium_test def test_upload_list(self): self.upload_list([self.get_filename("1.tabular")], name="Test List") - self.history_panel_wait_for_hid_ok(2) + self.history_panel_wait_for_hid_ok(3) # Make sure modals disappeared - both List creator (TODO: upload). self.wait_for_selector_absent_or_hidden(".collection-creator") - self.assert_item_name(2, "Test List") + self.assert_item_name(3, "Test List") # Make sure source item is hidden when the collection is created. self.history_panel_wait_for_hid_hidden(1) @@ -130,15 +130,17 @@ def test_upload_list(self): @selenium_test def test_upload_pair(self): self.upload_list([self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Pair") - self.history_panel_wait_for_hid_ok(3) + self.history_panel_wait_for_hid_ok(5) # Make sure modals disappeared - both collection creator (TODO: upload). self.wait_for_selector_absent_or_hidden(".collection-creator") - self.assert_item_name(3, "Test Pair") + self.assert_item_name(5, "Test Pair") # Make sure source items are hidden when the collection is created. self.history_panel_wait_for_hid_hidden(1) self.history_panel_wait_for_hid_hidden(2) + self.history_panel_wait_for_hid_hidden(3) + self.history_panel_wait_for_hid_hidden(4) @selenium_test def test_upload_pair_specify_extension(self): @@ -161,14 +163,16 @@ def test_upload_paired_list(self): self.upload_paired_list( [self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Paired List" ) - self.history_panel_wait_for_hid_ok(3) + self.history_panel_wait_for_hid_ok(5) # Make sure modals disappeared - both collection creator (TODO: upload). self.wait_for_selector_absent_or_hidden(".collection-creator") - self.assert_item_name(3, "Test Paired List") + self.assert_item_name(5, "Test Paired List") # Make sure source items are hidden when the collection is created. self.history_panel_wait_for_hid_hidden(1) self.history_panel_wait_for_hid_hidden(2) + self.history_panel_wait_for_hid_hidden(3) + self.history_panel_wait_for_hid_hidden(4) @selenium_test @pytest.mark.gtn_screenshot From b7f90ec87d03f4d99a0f7c5df14861d004a5ba68 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 16 Jan 2024 18:53:58 +0100 Subject: [PATCH 3/4] Install newer celery on python 3.8+ Latest celery fixes exception reporting, but doesn't work on python 3.7. I'm only adding this to {pinned,dev}-requirements.txt. When merging forward we can drop the 3.7 dependency. --- lib/galaxy/dependencies/dev-requirements.txt | 9 ++++++--- lib/galaxy/dependencies/pinned-requirements.txt | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index 52ed8a5e480e..d3c0730685dd 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -9,13 +9,15 @@ asynctest==0.13.0 ; python_version >= "3.7" and python_version < "3.8" attrs==23.1.0 ; python_version >= "3.7" and python_version < "3.12" axe-selenium-python==2.1.6 ; python_version >= "3.7" and python_version < "3.12" babel==2.13.1 ; python_version >= "3.7" and python_version < "3.12" -billiard==3.6.4.0 ; python_version >= "3.7" and python_version < "3.12" +billiard==3.6.4.0 ; python_version >= "3.7" and python_version < "3.8" +billiard==4.2.0 ; python_version >= "3.8" and python_version < "3.12" black==23.3.0 ; python_version >= "3.7" and python_version < "3.12" bleach==6.0.0 ; python_version >= "3.7" and python_version < "3.12" build==1.0.3 ; python_version >= "3.7" and python_version < "3.12" cachecontrol[filecache]==0.13.1 ; python_version >= "3.7" and python_version < "3.12" cached-property==1.5.2 ; python_version >= "3.7" and python_version < "3.8" -celery==5.2.7 ; python_version >= "3.7" and python_version < "3.12" +celery==5.2.7 ; python_version >= "3.7" and python_version < "3.8" +celery==5.3.6 ; python_version >= "3.8" and python_version < "3.12" certifi==2023.11.17 ; python_version >= "3.7" and python_version < "3.12" cffi==1.15.1 ; python_version >= "3.7" and python_version < "3.12" charset-normalizer==3.3.2 ; python_version >= "3.7" and python_version < "3.12" @@ -57,7 +59,8 @@ jinja2==3.1.2 ; python_version >= "3.7" and python_version < "3.12" junit-xml==1.9 ; python_version >= "3.7" and python_version < "3.12" keyring==24.1.1 ; python_version >= "3.7" and python_version < "3.12" kiwisolver==1.4.5 ; python_version >= "3.7" and python_version < "3.12" -kombu==5.2.4 ; python_version >= "3.7" and python_version < "3.12" +kombu==5.2.4 ; python_version >= "3.7" and python_version < "3.8" +kombu==5.3.6 ; python_version >= "3.8" and python_version < "3.12" lxml==4.9.3 ; python_version >= "3.7" and python_version < "3.12" markdown-it-py==2.2.0 ; python_version >= "3.7" and python_version < "3.12" markdown-it-reporter==0.0.2 ; python_version >= "3.7" and python_version < "3.12" diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index d0c127d7b1b4..cc8d86eec7dc 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -25,7 +25,8 @@ bagit==1.8.1 ; python_version >= "3.7" and python_version < "3.12" bcrypt==4.0.1 ; python_version >= "3.7" and python_version < "3.12" bdbag==1.7.1 ; python_version >= "3.7" and python_version < "3.12" beaker==1.12.1 ; python_version >= "3.7" and python_version < "3.12" -billiard==3.6.4.0 ; python_version >= "3.7" and python_version < "3.12" +billiard==3.6.4.0 ; python_version >= "3.7" and python_version < "3.8" +billiard==4.2.0 ; python_version >= "3.8" and python_version < "3.12" bioblend==1.2.0 ; python_version >= "3.7" and python_version < "3.12" bleach==6.0.0 ; python_version >= "3.7" and python_version < "3.12" boltons==23.1.1 ; python_version >= "3.7" and python_version < "3.12" @@ -34,7 +35,8 @@ botocore==1.27.59 ; python_version >= "3.7" and python_version < "3.12" bx-python==0.10.0 ; python_version >= "3.7" and python_version < "3.12" cachecontrol[filecache]==0.13.1 ; python_version >= "3.7" and python_version < "3.12" cached-property==1.5.2 ; python_version >= "3.7" and python_version < "3.8" -celery==5.2.7 ; python_version >= "3.7" and python_version < "3.12" +celery==5.2.7 ; python_version >= "3.7" and python_version < "3.8" +celery==5.3.6 ; python_version >= "3.8" and python_version < "3.12" certifi==2023.11.17 ; python_version >= "3.7" and python_version < "3.12" cffi==1.15.1 ; python_version >= "3.7" and python_version < "3.12" charset-normalizer==3.3.2 ; python_version >= "3.7" and python_version < "3.12" @@ -95,7 +97,8 @@ jinja2==3.1.2 ; python_version >= "3.7" and python_version < "3.12" jmespath==1.0.1 ; python_version >= "3.7" and python_version < "3.12" jsonref==1.1.0 ; python_version >= "3.7" and python_version < "3.12" jsonschema==4.17.3 ; python_version >= "3.7" and python_version < "3.12" -kombu==5.2.4 ; python_version >= "3.7" and python_version < "3.12" +kombu==5.2.4 ; python_version >= "3.7" and python_version < "3.8" +kombu==5.3.5 ; python_version >= "3.8" and python_version < "3.12" lagom==2.6.0 ; python_version >= "3.7" and python_version < "3.12" lxml==4.9.3 ; python_version >= "3.7" and python_version < "3.12" mako==1.2.4 ; python_version >= "3.7" and python_version < "3.12" From 6c42b169e9b7778f48c0e3ae48577eb7c67df788 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Tue, 16 Jan 2024 19:13:25 +0100 Subject: [PATCH 4/4] Fix kombu version Co-authored-by: Nicola Soranzo --- lib/galaxy/dependencies/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index d3c0730685dd..7d876c80b8d9 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -60,7 +60,7 @@ junit-xml==1.9 ; python_version >= "3.7" and python_version < "3.12" keyring==24.1.1 ; python_version >= "3.7" and python_version < "3.12" kiwisolver==1.4.5 ; python_version >= "3.7" and python_version < "3.12" kombu==5.2.4 ; python_version >= "3.7" and python_version < "3.8" -kombu==5.3.6 ; python_version >= "3.8" and python_version < "3.12" +kombu==5.3.5 ; python_version >= "3.8" and python_version < "3.12" lxml==4.9.3 ; python_version >= "3.7" and python_version < "3.12" markdown-it-py==2.2.0 ; python_version >= "3.7" and python_version < "3.12" markdown-it-reporter==0.0.2 ; python_version >= "3.7" and python_version < "3.12"