From d85a49916e620e62d511c222799b83266d1e2d46 Mon Sep 17 00:00:00 2001 From: John Davis Date: Wed, 29 Nov 2023 16:08:09 -0500 Subject: [PATCH 1/6] Expose file_name property in DatasetFilenameWrapper --- lib/galaxy/tools/wrappers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/galaxy/tools/wrappers.py b/lib/galaxy/tools/wrappers.py index 9e59536c6529..f4fa82410eb9 100644 --- a/lib/galaxy/tools/wrappers.py +++ b/lib/galaxy/tools/wrappers.py @@ -450,6 +450,10 @@ def serialize(self, invalid_chars: Sequence[str] = ("/",)) -> Dict[str, Any]: def is_collection(self) -> bool: return False + @property + def file_name(self) -> str: + return self.get_file_name() + def is_of_type(self, *exts: str) -> bool: datatypes = [] if not self.datatypes_registry: From 27beffd8900ac38253dbf469ab9144d19c5c635e Mon Sep 17 00:00:00 2001 From: John Davis Date: Thu, 30 Nov 2023 17:21:46 -0500 Subject: [PATCH 2/6] Simplify: just check for both keys --- lib/galaxy/tools/wrappers.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/galaxy/tools/wrappers.py b/lib/galaxy/tools/wrappers.py index f4fa82410eb9..81a904c953de 100644 --- a/lib/galaxy/tools/wrappers.py +++ b/lib/galaxy/tools/wrappers.py @@ -450,10 +450,6 @@ def serialize(self, invalid_chars: Sequence[str] = ("/",)) -> Dict[str, Any]: def is_collection(self) -> bool: return False - @property - def file_name(self) -> str: - return self.get_file_name() - def is_of_type(self, *exts: str) -> bool: datatypes = [] if not self.datatypes_registry: @@ -475,7 +471,7 @@ def __str__(self) -> str: return str(self.unsanitized.get_file_name()) def __getattr__(self, key: Any) -> Any: - if self.false_path is not None and key == "get_file_name": + if self.false_path is not None and key in ("get_file_name", "file_name"): # Path to dataset was rewritten for this job. return lambda *args, **kwargs: self.false_path elif key in ("extra_files_path", "files_path"): From 861a54b002017c02895dfbfa56282f1d4d457911 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 1 Dec 2023 18:42:25 +0300 Subject: [PATCH 3/6] Apply logout fix to properly clear session from @nuwang --- lib/galaxy/webapps/galaxy/controllers/authnz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/galaxy/webapps/galaxy/controllers/authnz.py b/lib/galaxy/webapps/galaxy/controllers/authnz.py index 71bd0fbcf7e4..8a31dc89e446 100644 --- a/lib/galaxy/webapps/galaxy/controllers/authnz.py +++ b/lib/galaxy/webapps/galaxy/controllers/authnz.py @@ -188,6 +188,7 @@ def logout(self, trans, provider, **kwargs): success, message, redirect_uri = trans.app.authnz_manager.logout( provider, trans, post_user_logout_href=post_user_logout_href ) + trans.handle_user_logout() if success: return {"redirect_uri": redirect_uri} else: From 0cc9225ca01b6b9f22b92621ea68311381f4d7dc Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 1 Dec 2023 16:29:26 +0100 Subject: [PATCH 4/6] Add file_name property on DatasetFilenameWrapper --- lib/galaxy/tools/wrappers.py | 9 +++++---- test/functional/tools/md5sum.xml | 2 +- test/unit/app/tools/test_wrappers.py | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/tools/wrappers.py b/lib/galaxy/tools/wrappers.py index 81a904c953de..7421ce7e3cc9 100644 --- a/lib/galaxy/tools/wrappers.py +++ b/lib/galaxy/tools/wrappers.py @@ -470,11 +470,12 @@ def __str__(self) -> str: else: return str(self.unsanitized.get_file_name()) + @property + def file_name(self) -> str: + return str(self) + def __getattr__(self, key: Any) -> Any: - if self.false_path is not None and key in ("get_file_name", "file_name"): - # Path to dataset was rewritten for this job. - return lambda *args, **kwargs: self.false_path - elif key in ("extra_files_path", "files_path"): + if key in ("extra_files_path", "files_path"): if not self.compute_environment: # Only happens in WrappedParameters context, refactor! return self.unsanitized.extra_files_path diff --git a/test/functional/tools/md5sum.xml b/test/functional/tools/md5sum.xml index 252e051ca48e..577f873e6081 100644 --- a/test/functional/tools/md5sum.xml +++ b/test/functional/tools/md5sum.xml @@ -1,6 +1,6 @@ - cp $input $output + cp '$input.file_name' '$output' diff --git a/test/unit/app/tools/test_wrappers.py b/test/unit/app/tools/test_wrappers.py index 69cca55f204f..a7be2e271d1b 100644 --- a/test/unit/app/tools/test_wrappers.py +++ b/test/unit/app/tools/test_wrappers.py @@ -207,7 +207,7 @@ def test_dataset_wrapper(): dataset = cast(DatasetInstance, MockDataset()) wrapper = DatasetFilenameWrapper(dataset) assert str(wrapper) == MOCK_DATASET_PATH - assert wrapper.get_file_name() == MOCK_DATASET_PATH + assert wrapper.file_name == MOCK_DATASET_PATH assert wrapper.ext == MOCK_DATASET_EXT @@ -219,7 +219,7 @@ def test_dataset_wrapper_false_path(): dataset, compute_environment=cast(ComputeEnvironment, MockComputeEnvironment(false_path=new_path)) ) assert str(wrapper) == new_path - assert wrapper.get_file_name() == new_path + assert wrapper.file_name == new_path class MockComputeEnvironment: From 33ccacf77ae53a33f6d2bc301662272e2357e17b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 1 Dec 2023 17:44:55 +0100 Subject: [PATCH 5/6] Fix upload1 tool --- tools/data_source/upload.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/data_source/upload.xml b/tools/data_source/upload.xml index de3c80404e0c..548b63163334 100644 --- a/tools/data_source/upload.xml +++ b/tools/data_source/upload.xml @@ -14,7 +14,7 @@ #while $varExists('output%i' % $outnum): #set $output = $getVar('output%i' % $outnum) #set $outnum += 1 - #set $file_name = $output.get_file_name() + #set $file_name = str($output) ## FIXME: This is not future-proof for other uses of external_filename (other than for use by the library upload's "link data" feature) #if $output.dataset.dataset.external_filename: #set $file_name = "None" From d671b2023a952b846aa4ee698f153b7c0f7d01a0 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 2 Dec 2023 11:00:02 +0100 Subject: [PATCH 6/6] Fix css affecting all dropdown menus --- client/src/components/Panels/Menus/PanelViewMenu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Panels/Menus/PanelViewMenu.vue b/client/src/components/Panels/Menus/PanelViewMenu.vue index a6daa5ca7317..b6afe4a69006 100644 --- a/client/src/components/Panels/Menus/PanelViewMenu.vue +++ b/client/src/components/Panels/Menus/PanelViewMenu.vue @@ -106,7 +106,7 @@ export default {