From 9e8cf79457f2e54591eb771140b1171510f41801 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Fri, 27 Jan 2023 15:49:57 -0500 Subject: [PATCH 01/22] clarifying info messages for Collection Edit tabs --- .../Collections/common/CollectionEditView.vue | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/client/src/components/Collections/common/CollectionEditView.vue b/client/src/components/Collections/common/CollectionEditView.vue index 8e4dbe08f62..3568fbc89b4 100644 --- a/client/src/components/Collections/common/CollectionEditView.vue +++ b/client/src/components/Collections/common/CollectionEditView.vue @@ -2,15 +2,15 @@

{{ l("Edit Collection Attributes") }}

- {{ l(newCollectionInfoMessage) }} + {{ l(infoMessage) }}
- {{ errorMessage }} + {{ l(errorMessage) }}
- +
@@ -24,13 +24,13 @@
- + - + @@ -94,6 +94,10 @@ export default { jobError: null, noQuotaIncrease: true, loadingString: "Loading Datatypes", + infoMessage: "This will create a new collection in your History. Your quota will not increase.", //initialmessage on first/database tab + newCollectionMessage: "This will create a new collection in your History.", + noQuotaIncreaseMessage: "Your quota will not increase.", + expectWaitTimeMessage: "This operation might take a short while, depending on the size of your collection.", }; }, computed: { @@ -103,13 +107,6 @@ export default { datatypeFromElements: function () { return this.attributesData.extension; }, - newCollectionInfoMessage: function () { - let newCollectionMessage = "This will create a new collection in your History."; - if (this.noQuotaIncrease) { - newCollectionMessage += " Your quota usage will not increase."; - } - return newCollectionMessage; - }, historyId: function () { return this.$store.getters["history/currentHistoryId"]; }, @@ -118,6 +115,9 @@ export default { this.getCollectionDataAndAttributes(); }, methods: { + updateInfoMessage: function (strMessage) { + this.infoMessage = strMessage; + }, getCollectionDataAndAttributes: async function () { let attributesGet = this.$store.getters.getCollectionAttributes(this.collection_id); if (attributesGet == null) { From c320459d3ad916e47f3a7e130ccb8708f7d05790 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Fri, 27 Jan 2023 23:47:39 -0500 Subject: [PATCH 02/22] adding test for changing info message to the collection edit selenium tests --- client/src/components/Collections/common/CollectionEditView.vue | 2 +- client/src/utils/navigation/navigation.yml | 1 + lib/galaxy_test/selenium/test_collection_edit.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/Collections/common/CollectionEditView.vue b/client/src/components/Collections/common/CollectionEditView.vue index 3568fbc89b4..6a50660bad4 100644 --- a/client/src/components/Collections/common/CollectionEditView.vue +++ b/client/src/components/Collections/common/CollectionEditView.vue @@ -10,7 +10,7 @@
- +
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index 7114c497544..bf646312bfc 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -309,6 +309,7 @@ edit_dataset_attributes: edit_collection_attributes: selectors: + alert_info: 'div.alert-info' database_genome_tab: type: xpath selector: '//a[contains(text(), "Database/Build")]' diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 279724d97b9..87e77df3008 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -13,6 +13,7 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection() self.open_collection_edit_view() self.navigate_to_database_tab() + assert "This will create a new collection in your History. Your quota will not increase." in self.find_element_by_selector("div.alert-info").text dataValue = "unspecified" self.check_current_data_value(dataValue) dataNew = "hg17" @@ -27,6 +28,7 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection_txt() self.open_collection_edit_view() self.navigate_to_datatype_tab() + assert "This operation might take a short while, depending on the size of your collection." in self.find_element_by_selector("div.alert-info").text dataValue = "txt" self.check_current_data_value(dataValue) dataNew = "tabular" From 31967150cbe4c97701577827e03c0deb7ac4777f Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 30 Jan 2023 08:44:40 -0500 Subject: [PATCH 03/22] fixing linting errors --- lib/galaxy_test/selenium/test_collection_edit.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 87e77df3008..fd0f4fdb5d3 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -13,7 +13,10 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection() self.open_collection_edit_view() self.navigate_to_database_tab() - assert "This will create a new collection in your History. Your quota will not increase." in self.find_element_by_selector("div.alert-info").text + assert ( + "This will create a new collection in your History. Your quota will not increase." + in self.find_element_by_selector("div.alert-info").text + ) dataValue = "unspecified" self.check_current_data_value(dataValue) dataNew = "hg17" @@ -28,7 +31,10 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection_txt() self.open_collection_edit_view() self.navigate_to_datatype_tab() - assert "This operation might take a short while, depending on the size of your collection." in self.find_element_by_selector("div.alert-info").text + assert ( + "This operation might take a short while, depending on the size of your collection." + in self.find_element_by_selector("div.alert-info").text + ) dataValue = "txt" self.check_current_data_value(dataValue) dataNew = "tabular" From 9f9e163033e56be9a02eb07e13de056e82a2d7ea Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Sat, 4 Feb 2023 03:34:43 +0500 Subject: [PATCH 04/22] Add Database filter to HistoryFilters --- .../HistoryFilters/HistoryFilters.test.js | 4 ++- .../HistoryFilters/HistoryFilters.vue | 2 ++ .../src/components/History/HistoryFilters.js | 1 + lib/galaxy/managers/genomes.py | 34 +++++++++++++++++++ lib/galaxy/managers/hdas.py | 1 + lib/galaxy/managers/history_contents.py | 10 ++++-- 6 files changed, 49 insertions(+), 3 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryFilters/HistoryFilters.test.js b/client/src/components/History/CurrentHistory/HistoryFilters/HistoryFilters.test.js index 0fb9f79c592..22885e82301 100644 --- a/client/src/components/History/CurrentHistory/HistoryFilters/HistoryFilters.test.js +++ b/client/src/components/History/CurrentHistory/HistoryFilters/HistoryFilters.test.js @@ -38,6 +38,8 @@ describe("HistoryFilters", () => { "[placeholder='any extension']": "ext-filter", "[placeholder='any tag']": "tag filter", "[placeholder='any state']": "state-filter", + "[placeholder='any database']": "db-filter", + "[placeholder='index equals']": "hid-related", "[placeholder='index greater']": "hid-greater", "[placeholder='index lower']": "hid-lower", "[placeholder='created after']": "January 1, 2022", @@ -79,7 +81,7 @@ describe("HistoryFilters", () => { await expectCorrectEmits( wrapper, false, - "create_time>'January 1, 2022' create_time<'January 1, 2023' extension:ext-filter hid>hid-greater hid'January 1, 2022' create_time<'January 1, 2023' extension:ext-filter genome_build:db-filter related:hid-related hid>hid-greater hidFilter by state: + Filter by database: + Filter by related to item index: Filter by item index: diff --git a/client/src/components/History/HistoryFilters.js b/client/src/components/History/HistoryFilters.js index e8d9dd9bb8e..4f9c48a639c 100644 --- a/client/src/components/History/HistoryFilters.js +++ b/client/src/components/History/HistoryFilters.js @@ -5,6 +5,7 @@ export const validFilters = { state: equals("state"), name: contains("name"), extension: equals("extension"), + genome_build: contains("genome_build"), hid_ge: compare("hid", "ge"), hid_gt: compare("hid", "gt"), hid_le: compare("hid", "le"), diff --git a/lib/galaxy/managers/genomes.py b/lib/galaxy/managers/genomes.py index 4601824b3ea..f6af2d73d9a 100644 --- a/lib/galaxy/managers/genomes.py +++ b/lib/galaxy/managers/genomes.py @@ -1,8 +1,11 @@ from typing import ( Any, List, + TYPE_CHECKING, ) +from sqlalchemy import func + from galaxy import model as m from galaxy.exceptions import ( ReferenceDataError, @@ -10,6 +13,10 @@ from galaxy.exceptions import ( ) from galaxy.managers.context import ProvidesUserContext from galaxy.structured_app import StructuredApp +from .base import raise_filter_err + +if TYPE_CHECKING: + from galaxy.managers.base import OrmFilterParsersType class GenomesManager: @@ -64,3 +71,30 @@ class GenomesManager: raise ReferenceDataError(f"Data tables not found for {index_type} for {id}") else: return f"{file_name}{ext}" + + +class GenomeFilterMixin: + orm_filter_parsers: "OrmFilterParsersType" + valid_ops = ("eq", "contains", "has") + + def create_genome_filter(self, attr, op, val): + def _create_genome_filter(model_class=None): + if op not in GenomeFilterMixin.valid_ops: + raise_filter_err(attr, op, val, "bad op in filter") + if model_class is None: + return True + # Doesn't filter genome_build for collections + if model_class.__name__ == "HistoryDatasetCollectionAssociation": + return False + column = func.json_extract(model_class.table.c._metadata, "$.dbkey") + lower_val = val.lower() # Ignore case + if op == "eq": + cond = func.lower(column) == lower_val + else: + cond = func.lower(column).contains(lower_val, autoescape=True) + return cond + + return _create_genome_filter + + def _add_parsers(self): + self.orm_filter_parsers.update({"genome_build": self.create_genome_filter}) diff --git a/lib/galaxy/managers/hdas.py b/lib/galaxy/managers/hdas.py index 819eba9e447..7abbee7f3b7 100644 --- a/lib/galaxy/managers/hdas.py +++ b/lib/galaxy/managers/hdas.py @@ -337,6 +337,7 @@ class HDASerializer( # datasets._UnflattenedMetadataDatasetAssociationSerialize "hid", "history_content_type", "dataset_id", + "genome_build", "state", "extension", "deleted", diff --git a/lib/galaxy/managers/history_contents.py b/lib/galaxy/managers/history_contents.py index 8b3a87768d0..22adbfa74a2 100644 --- a/lib/galaxy/managers/history_contents.py +++ b/lib/galaxy/managers/history_contents.py @@ -37,6 +37,7 @@ from galaxy.managers import ( annotatable, base, deletable, + genomes, hdas, hdcas, taggable, @@ -521,6 +522,7 @@ class HistoryContentsFilters( base.ModelFilterParser, annotatable.AnnotatableFilterMixin, deletable.PurgableFiltersMixin, + genomes.GenomeFilterMixin, taggable.TaggableFilterMixin, tools.ToolFilterMixin, ): @@ -563,8 +565,10 @@ class HistoryContentsFilters( return sql.column("history_content_type") == val raise_filter_err(attr, op, val, "bad op in filter") - if attr == "related" and op == "eq": - return sql.column("hid").in_(json.loads(val)) + if attr == "related": + if op == "eq": + return sql.column("hid").in_(json.loads(val)) + raise_filter_err(attr, op, val, "bad op in filter") if attr == "type_id": if op == "eq": @@ -617,12 +621,14 @@ class HistoryContentsFilters( def _add_parsers(self): super()._add_parsers() annotatable.AnnotatableFilterMixin._add_parsers(self) + genomes.GenomeFilterMixin._add_parsers(self) deletable.PurgableFiltersMixin._add_parsers(self) taggable.TaggableFilterMixin._add_parsers(self) tools.ToolFilterMixin._add_parsers(self) self.orm_filter_parsers.update( { "history_content_type": {"op": ("eq")}, + # maybe remove related from here, as there's no corresponding field? "related": {"op": ("eq")}, "type_id": {"op": ("eq", "in"), "val": self.parse_type_id_list}, "hid": {"op": ("eq", "ge", "le", "gt", "lt"), "val": int}, From 752ffd4619ab38b93c7f8ab198dcf035144a0e9c Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Sat, 4 Feb 2023 05:18:36 +0500 Subject: [PATCH 05/22] Add Database filters to HistoryFilters: fix orm API test --- lib/galaxy_test/api/test_history_contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy_test/api/test_history_contents.py b/lib/galaxy_test/api/test_history_contents.py index a51528d96fe..eba99f84b94 100644 --- a/lib/galaxy_test/api/test_history_contents.py +++ b/lib/galaxy_test/api/test_history_contents.py @@ -1248,7 +1248,7 @@ class TestHistoryContentsApiBulkOperation(ApiTestCase): with self.dataset_populator.test_history() as history_id: self._create_test_history_contents(history_id) - invalid_filter_keys_with_stats = ["genome_build", "data_type", "annotation"] + invalid_filter_keys_with_stats = ["data_type", "annotation"] for filter_key in invalid_filter_keys_with_stats: response = self._get_contents_with_stats( From 0c50f443d011dcbaf520c91eb1ff8b35a4c4b379 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Sun, 5 Feb 2023 18:06:14 +0100 Subject: [PATCH 06/22] xsd fixes for output actions - `when` tags can contain `action` and `conditional` (i.e. `ActionsElement` and not only `Action`) https://github.com/galaxyproject/galaxy/blob/f1f16517e6384f680ebbcea0f0ffb2b871a3d36c/lib/galaxy/tool_util/parser/output_actions.py#L46 - `strip` is a string https://github.com/galaxyproject/galaxy/blob/f1f16517e6384f680ebbcea0f0ffb2b871a3d36c/lib/galaxy/tool_util/parser/output_actions.py#L481 - iterate attribute was missing all used for instance here: used for instance here: https://github.com/bgruening/galaxytools/blob/c27a05e92e6e03545903dd2ff90976f8cab5ebf7/tools/text_processing/text_processing/cut.xml#L69 --- lib/galaxy/tool_util/xsd/galaxy.xsd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 4666f85a31b..8b3c94f699c 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -5699,7 +5699,8 @@ of this directive. ]]> - + + @@ -5823,6 +5824,13 @@ Applies to ``param_value``, ``boolean`` ]]> + + + + ]]> + + @@ -5835,9 +5843,9 @@ Applies to ``param_value`` Applies to ``multiple_splitter`` - + - Applies to ``column_strip`` + Applies to ``column_strip``. The given string is removed from the start or end of the column. From e52a98152af8edd90af65e7d7ee36b5bdc40a4e7 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 6 Feb 2023 10:51:11 +0100 Subject: [PATCH 07/22] include ActionsOption in schema doc --- doc/schema_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/schema_template.md b/doc/schema_template.md index 9a6461d3f16..6bb23179654 100644 --- a/doc/schema_template.md +++ b/doc/schema_template.md @@ -74,6 +74,7 @@ $tag:tool|outputs|data|actions://complexType[@name='Actions'] $tag:tool|outputs|data|actions|conditional://complexType[@name='ActionsConditional'] $tag:tool|outputs|data|actions|conditional|when://complexType[@name='ActionsConditionalWhen'] $tag:tool|outputs|data|actions|action://complexType[@name='Action'] +$tag:tool|outputs|data|actions|action|option://complexType[@name='ActionsOption'] $tag:tool|outputs|data|discover_datasets://complexType[@name='OutputDiscoverDatasets'] $tag:tool|outputs|collection://complexType[@name='OutputCollection'] $tag:tool|outputs|collection|filter://complexType[@name='OutputFilter'] From 1a3777a6a9bdb5c725111ae6a869c39d3125198e Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 6 Feb 2023 11:38:34 +0100 Subject: [PATCH 08/22] Add doc for ActionsOption --- lib/galaxy/tool_util/xsd/galaxy.xsd | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 8b3c94f699c..4ac6b23f94f 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -5645,22 +5645,30 @@ Source of the tabular data ``from_data_table``, ``from_param``, or ``from_file`` - + - + - + - + From 09f553bbb1a0715958503a288a67f0194924ea8d Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 6 Feb 2023 13:41:48 -0500 Subject: [PATCH 09/22] Fix phyloviz template rendering -- this got messed up in some hierarchy changes and had an undefined title causing the 500 --- templates/webapps/galaxy/visualization/phyloviz.mako | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/webapps/galaxy/visualization/phyloviz.mako b/templates/webapps/galaxy/visualization/phyloviz.mako index af744a3339c..064412e469f 100644 --- a/templates/webapps/galaxy/visualization/phyloviz.mako +++ b/templates/webapps/galaxy/visualization/phyloviz.mako @@ -1,5 +1,7 @@ <%inherit file="/base/base_panels.mako"/> ## +<%def name="title()">${ config.get('title', 'Phyloviz') + ' | Galaxy' } + <%def name="init()"> <% self.has_left_panel=False From 17200eadefd0c8d3da2e2a3f41e89e59b9112b0f Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 7 Feb 2023 11:00:57 -0500 Subject: [PATCH 10/22] adding wait for visible in selenium test --- lib/galaxy_test/selenium/test_collection_edit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index fd0f4fdb5d3..70b6df102d5 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -13,6 +13,7 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection() self.open_collection_edit_view() self.navigate_to_database_tab() + self.components.edit_collection_attributes.alert_info.wait_for_visible() assert ( "This will create a new collection in your History. Your quota will not increase." in self.find_element_by_selector("div.alert-info").text @@ -31,6 +32,7 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection_txt() self.open_collection_edit_view() self.navigate_to_datatype_tab() + self.components.edit_collection_attributes.alert_info.wait_for_visible() assert ( "This operation might take a short while, depending on the size of your collection." in self.find_element_by_selector("div.alert-info").text From 9ac8e8bc3a1f4c6e511cd94a4410ac381d58fca3 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 7 Feb 2023 17:10:11 +0100 Subject: [PATCH 11/22] Fix webhook backbone view Fixes: ``` TypeError: data.reset is not a function. (In 'data.reset(filterType(data, options.type))', 'data.reset' is undefined) at promiseReactionJob([native code]) ``` --- client/src/utils/webhooks.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/client/src/utils/webhooks.js b/client/src/utils/webhooks.js index 1fb9452853a..c2ecd90bb3e 100644 --- a/client/src/utils/webhooks.js +++ b/client/src/utils/webhooks.js @@ -29,11 +29,9 @@ const WebhookView = Backbone.View.extend({ this.$el.attr("tool_version", toolVersion); getWebHookData().then((data) => { - if (options.type) { - data.reset(filterType(data, options.type)); - } - if (data.length > 0) { - this.render(weightedRandomPick(data)); + const filteredData = filterData(data, options); + if (filteredData.length > 0) { + this.render(weightedRandomPick(filteredData)); } }); }, @@ -46,13 +44,17 @@ const WebhookView = Backbone.View.extend({ }, }); +function filterData(data, options) { + let filteredData = data; + if (options.type) { + filteredData = filterType(data, options.type); + } + return filteredData; +} + const load = (options) => { getWebHookData().then((data) => { - let filteredData = data; - if (options.type) { - filteredData = filterType(data, options.type); - } - options.callback(filteredData); + options.callback(filterData(data, options)); }); }; From 7ed2ba0a5320a3003bc9a462d0846f01649fad45 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 7 Feb 2023 17:18:02 +0100 Subject: [PATCH 12/22] remove comment --- lib/galaxy/tool_util/xsd/galaxy.xsd | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 4ac6b23f94f..7eef95a7b42 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -5708,7 +5708,6 @@ of this directive. - From 1a00127f440fd362498d9922eb5dad259df892ea Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 7 Feb 2023 11:27:32 -0500 Subject: [PATCH 13/22] using the element from navigation to check text/value instead of searching for it --- lib/galaxy_test/selenium/test_collection_edit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 70b6df102d5..8a6596b9977 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -13,10 +13,10 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection() self.open_collection_edit_view() self.navigate_to_database_tab() - self.components.edit_collection_attributes.alert_info.wait_for_visible() + alert_element = self.components.edit_collection_attributes.alert_info.wait_for_visible() assert ( "This will create a new collection in your History. Your quota will not increase." - in self.find_element_by_selector("div.alert-info").text + in alert_element.text ) dataValue = "unspecified" self.check_current_data_value(dataValue) From bc142e22b2a39ee7b50791d8c07d1c55efd33da6 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 7 Feb 2023 11:39:43 -0500 Subject: [PATCH 14/22] running black/linting on file --- lib/galaxy_test/selenium/test_collection_edit.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 8a6596b9977..fbbafba5353 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -14,10 +14,7 @@ class TestCollectionEdit(SeleniumTestCase): self.open_collection_edit_view() self.navigate_to_database_tab() alert_element = self.components.edit_collection_attributes.alert_info.wait_for_visible() - assert ( - "This will create a new collection in your History. Your quota will not increase." - in alert_element.text - ) + assert "This will create a new collection in your History. Your quota will not increase." in alert_element.text dataValue = "unspecified" self.check_current_data_value(dataValue) dataNew = "hg17" From eb4598fb200b219502d3f82b7e2bf5f3e1af997e Mon Sep 17 00:00:00 2001 From: M Bernt Date: Tue, 7 Feb 2023 18:37:59 +0100 Subject: [PATCH 15/22] Typo fix Co-authored-by: Marius van den Beek --- lib/galaxy/tool_util/xsd/galaxy.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 7eef95a7b42..087c8eef30a 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -5646,7 +5646,7 @@ Source of the tabular data ``from_data_table``, ``from_param``, or ``from_file`` From fc1fc4bb6665a3017151d3769e8150d982c0f392 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 7 Feb 2023 19:49:22 +0100 Subject: [PATCH 16/22] Fix visible handling for exisiting datasets on discovery Fixes the flaky selenium upload tests and prevents fetch_data uploads from reverting from hidden to visible on job finish. --- lib/galaxy/model/store/discover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/model/store/discover.py b/lib/galaxy/model/store/discover.py index 9516626b649..e1d07ea1725 100644 --- a/lib/galaxy/model/store/discover.py +++ b/lib/galaxy/model/store/discover.py @@ -100,7 +100,6 @@ class ModelPersistenceContext(metaclass=abc.ABCMeta): if primary_data is not None: primary_data.extension = ext - primary_data.visible = visible primary_data.dbkey = dbkey else: if not library_folder: @@ -798,12 +797,13 @@ def persist_hdas(elements, model_persistence_context, final_job_state="ok"): hashes = fields_match.hashes created_from_basename = fields_match.created_from_basename extra_files = fields_match.extra_files + visible = fields_match.visible info, state = discovered_file.discovered_state(element, final_job_state) dataset = model_persistence_context.create_dataset( ext=ext, designation=designation, - visible=True, + visible=visible, dbkey=dbkey, name=name, filename=discovered_file.path, From 8800bc82cd4d57d0fec495948172a64c7d2019eb Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 7 Feb 2023 16:51:22 -0500 Subject: [PATCH 17/22] Update sample reference to static/style/base.css to dist --- static/welcome.html.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/welcome.html.sample b/static/welcome.html.sample index b35df44203c..b82ca6a713a 100644 --- a/static/welcome.html.sample +++ b/static/welcome.html.sample @@ -2,7 +2,7 @@ - +
From a0d18b599fe2b003361b00962b0202dd7745c4cf Mon Sep 17 00:00:00 2001 From: Dannon Date: Tue, 7 Feb 2023 21:53:31 -0500 Subject: [PATCH 18/22] Apply suggestions from code review Co-authored-by: Marius van den Beek --- lib/galaxy_test/selenium/test_collection_edit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index fbbafba5353..53693d40b84 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -29,10 +29,11 @@ class TestCollectionEdit(SeleniumTestCase): self.create_simple_list_collection_txt() self.open_collection_edit_view() self.navigate_to_datatype_tab() - self.components.edit_collection_attributes.alert_info.wait_for_visible() + alert_element = self.components.edit_collection_attributes.alert_info.wait_for_visible() + assert ( "This operation might take a short while, depending on the size of your collection." - in self.find_element_by_selector("div.alert-info").text + in alert_element.text ) dataValue = "txt" self.check_current_data_value(dataValue) From f071762034044578520595054e39ca9cd285a0c6 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 7 Feb 2023 21:55:06 -0500 Subject: [PATCH 19/22] Formatting after apply suggestions... --- lib/galaxy_test/selenium/test_collection_edit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/galaxy_test/selenium/test_collection_edit.py b/lib/galaxy_test/selenium/test_collection_edit.py index 53693d40b84..5a437ef7328 100644 --- a/lib/galaxy_test/selenium/test_collection_edit.py +++ b/lib/galaxy_test/selenium/test_collection_edit.py @@ -30,10 +30,9 @@ class TestCollectionEdit(SeleniumTestCase): self.open_collection_edit_view() self.navigate_to_datatype_tab() alert_element = self.components.edit_collection_attributes.alert_info.wait_for_visible() - + assert ( - "This operation might take a short while, depending on the size of your collection." - in alert_element.text + "This operation might take a short while, depending on the size of your collection." in alert_element.text ) dataValue = "txt" self.check_current_data_value(dataValue) From 015a957eaa0fb27bf820a9bdd5190a0289e1b9f7 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 8 Feb 2023 08:45:33 +0100 Subject: [PATCH 20/22] Fix shared histories navigation --- client/src/components/Grid/GridHistory.vue | 10 +++++++++- client/src/components/Grid/history-list.js | 2 +- client/src/entry/analysis/router.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/client/src/components/Grid/GridHistory.vue b/client/src/components/Grid/GridHistory.vue index c00cf5641ae..a7cabb8b37d 100644 --- a/client/src/components/Grid/GridHistory.vue +++ b/client/src/components/Grid/GridHistory.vue @@ -5,8 +5,16 @@ diff --git a/client/src/components/Grid/history-list.js b/client/src/components/Grid/history-list.js index 42b8c21ff2c..6e283988061 100644 --- a/client/src/components/Grid/history-list.js +++ b/client/src/components/Grid/history-list.js @@ -65,7 +65,7 @@ var View = Backbone.View.extend({ this.active_tab = "user"; this.model = new Backbone.Model(); Utils.get({ - url: `${getAppRoot()}history/list?${$.param(Galaxy.params)}`, + url: `${getAppRoot()}history/${options.action_id}?${$.param(Galaxy.params)}`, success: (response) => { this.model.set(response); this.render(); diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index 2506529252a..35f23445242 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -237,7 +237,7 @@ export function getRouter(Galaxy) { props: true, }, { - path: "histories/list", + path: "histories/:actionId", component: GridHistory, props: true, redirect: redirectAnon(), From 2d63389e7251b13bcc437798f57d6c42d99a8600 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 8 Feb 2023 11:19:23 +0100 Subject: [PATCH 21/22] Add test that verifies visible doesn't revert on job finish It isn't exactly a regression test, for that you'd have to time the test so that we change the visible attribute while the job is finishing. I think this test here is worth running independently, and I don't think we have an explicit test like that. --- lib/galaxy_test/api/test_tools.py | 17 +++++++++++ .../tools/galaxy_json_discover_and_sleep.xml | 28 +++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 19 +++++++------ 3 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 test/functional/tools/galaxy_json_discover_and_sleep.xml diff --git a/lib/galaxy_test/api/test_tools.py b/lib/galaxy_test/api/test_tools.py index fc8a9d4a66a..b90460c0c16 100644 --- a/lib/galaxy_test/api/test_tools.py +++ b/lib/galaxy_test/api/test_tools.py @@ -810,6 +810,23 @@ class ToolsTestCase(ApiTestCase, TestsTools): def test_apply_rules_6(self): self._apply_rules_and_check(rules_test_data.EXAMPLE_6) + @skip_without_tool("galaxy_json_sleep") + def test_dataset_hidden_after_job_finish(self): + with self.dataset_populator.test_history() as history_id: + inputs = { + "sleep_time": 5, + } + response = self._run("galaxy_json_sleep", history_id, inputs, assert_ok=True) + output = response["outputs"][0] + response = self._put( + f"histories/{history_id}/contents/datasets/{output['id']}", data={"visible": False}, json=True + ) + response.raise_for_status() + output_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=output, wait=False) + assert not output_details["visible"] + output_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=output, wait=True) + assert not output_details["visible"] + @skip_without_tool("multi_select") def test_multi_select_as_list(self): with self.dataset_populator.test_history() as history_id: diff --git a/test/functional/tools/galaxy_json_discover_and_sleep.xml b/test/functional/tools/galaxy_json_discover_and_sleep.xml new file mode 100644 index 00000000000..8b598bb72fa --- /dev/null +++ b/test/functional/tools/galaxy_json_discover_and_sleep.xml @@ -0,0 +1,28 @@ + + + + {"output_tool_supplied_metadata": { + "name": "my dynamic name", + "ext": "txt", + "info": "my dynamic info" + }} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 53ad4b741d2..9cc70aa05b9 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -1,15 +1,15 @@ - - + +
- - + + @@ -19,10 +19,10 @@ - - - - + + + + @@ -30,6 +30,7 @@ + @@ -283,4 +284,4 @@ -
+ \ No newline at end of file From 69d2decf8137dcff205abcf0b7fdf2221a3ea4ce Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 8 Feb 2023 11:19:53 +0100 Subject: [PATCH 22/22] Mention successor routes in deprecated routes --- lib/galaxy/webapps/galaxy/api/history_contents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index 33d67797a6c..9fc1e694033 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -418,7 +418,7 @@ class FastAPIHistoryContents: @router.get( "/api/histories/{history_id}/contents/{id}", name="history_content", - summary="Return detailed information about an HDA within a history.", + summary="Return detailed information about an HDA within a history. ``/api/histories/{history_id}/contents/{type}s/{id}`` should be used instead.", response_model_exclude_unset=True, deprecated=True, ) @@ -675,7 +675,7 @@ class FastAPIHistoryContents: ) @router.put( "/api/histories/{history_id}/contents/{id}", - summary="Updates the values for the history content item with the given ``ID``.", + summary="Updates the values for the history content item with the given ``ID``. ``/api/histories/{history_id}/contents/{type}s/{id}`` should be used instead.", response_model_exclude_unset=True, deprecated=True, )