From dffe7217443f8d1d55cccf921d92b64e363ca3b4 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 23 Jul 2024 09:58:46 -0400 Subject: [PATCH 1/5] Fix sqlalchemy statement in tooltagmanager reset output --- lib/galaxy/tools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 7209daa65cf1..42fe49f58f4d 100644 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -378,7 +378,7 @@ def __init__(self, app): def reset_tags(self): log.info( - f"removing all tool tag associations ({str(self.sa_session.scalar(select(func.count(self.app.model.ToolTagAssociation))))})" + f"removing all tool tag associations ({str(self.sa_session.scalar(select(func.count(self.app.model.ToolTagAssociation.id))))})" ) self.sa_session.execute(delete(self.app.model.ToolTagAssociation)) with transaction(self.sa_session): From 67e89d943f4710c96e77e9514f8f612cce421b9d Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 28 Jul 2024 12:19:16 +0200 Subject: [PATCH 2/5] Set minimum weasyprint version We're not pinning transitive conditional dependencies, and a new pydyf version, which is a dependency of weasyprint, had a new release with a breaking change, see (https://github.com/Kozea/WeasyPrint/issues/2200). Newer releases of weasyprint have introduced max version pins, so I think we're ok with just setting a minimum version here. --- lib/galaxy/dependencies/conditional-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/dependencies/conditional-requirements.txt b/lib/galaxy/dependencies/conditional-requirements.txt index 087d825912c8..52b04ab8787e 100644 --- a/lib/galaxy/dependencies/conditional-requirements.txt +++ b/lib/galaxy/dependencies/conditional-requirements.txt @@ -56,7 +56,7 @@ tensorflow==2.9.3 # xref https://github.com/galaxyproject/galaxy/pull/9651 # Run run.sh or common_startup script with GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT=1 # to install weasyprint as part of Galaxy's conditonal dependency instalation process. -weasyprint +weasyprint>=62.3 # AWS Batch runner boto3 From 77efbaf792df90aba6514cb9fb379bf97e5cb117 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 28 Jul 2024 13:17:28 +0200 Subject: [PATCH 3/5] Lower weasyprint versino pin and fix problematic transitive dependency --- lib/galaxy/dependencies/__init__.py | 4 ++++ lib/galaxy/dependencies/conditional-requirements.txt | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/dependencies/__init__.py b/lib/galaxy/dependencies/__init__.py index 17aa22c8d60d..437e5e82ee25 100644 --- a/lib/galaxy/dependencies/__init__.py +++ b/lib/galaxy/dependencies/__init__.py @@ -288,6 +288,10 @@ def check_weasyprint(self): # See notes in ./conditional-requirements.txt for more information. return os.environ.get("GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT") == "1" + def check_pydyf(self): + # See notes in ./conditional-requirements.txt for more information. + return os.environ.get("GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT") == "1" and sys.version_info < (3, 9) + def check_custos_sdk(self): return "custos" == self.vault_type diff --git a/lib/galaxy/dependencies/conditional-requirements.txt b/lib/galaxy/dependencies/conditional-requirements.txt index 52b04ab8787e..67693579b105 100644 --- a/lib/galaxy/dependencies/conditional-requirements.txt +++ b/lib/galaxy/dependencies/conditional-requirements.txt @@ -56,7 +56,12 @@ tensorflow==2.9.3 # xref https://github.com/galaxyproject/galaxy/pull/9651 # Run run.sh or common_startup script with GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT=1 # to install weasyprint as part of Galaxy's conditonal dependency instalation process. -weasyprint>=62.3 +weasyprint>=61.2 +# We pin the transitive weasyprint dependency pydyf here because newer versions are +# not compatible with the last weasyprint version that still supports python 3.8. +# This dependency is ignored on python >= 3.9 and should be removed when deprecating +# support for python 3.8. +pydyf==0.10.0 # AWS Batch runner boto3 From 0a637a5b02bd44d3a5d15aaf129462edf5fa0c8b Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Sun, 28 Jul 2024 21:13:32 +0200 Subject: [PATCH 4/5] Use python version syntax I don't think this works with our custom parsing, but worth a try. Co-authored-by: Nicola Soranzo --- lib/galaxy/dependencies/__init__.py | 2 +- lib/galaxy/dependencies/conditional-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/dependencies/__init__.py b/lib/galaxy/dependencies/__init__.py index 437e5e82ee25..95011848eaf6 100644 --- a/lib/galaxy/dependencies/__init__.py +++ b/lib/galaxy/dependencies/__init__.py @@ -290,7 +290,7 @@ def check_weasyprint(self): def check_pydyf(self): # See notes in ./conditional-requirements.txt for more information. - return os.environ.get("GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT") == "1" and sys.version_info < (3, 9) + return os.environ.get("GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT") == "1" def check_custos_sdk(self): return "custos" == self.vault_type diff --git a/lib/galaxy/dependencies/conditional-requirements.txt b/lib/galaxy/dependencies/conditional-requirements.txt index 67693579b105..ee55dac30c1a 100644 --- a/lib/galaxy/dependencies/conditional-requirements.txt +++ b/lib/galaxy/dependencies/conditional-requirements.txt @@ -61,7 +61,7 @@ weasyprint>=61.2 # not compatible with the last weasyprint version that still supports python 3.8. # This dependency is ignored on python >= 3.9 and should be removed when deprecating # support for python 3.8. -pydyf==0.10.0 +pydyf<0.12; python_version<"3.9" # AWS Batch runner boto3 From 69058114dbfce138bc2793b5c31353345106c7a7 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Mon, 29 Jul 2024 08:40:02 +0200 Subject: [PATCH 5/5] Pin pydyf to < 0.11 Co-authored-by: Nicola Soranzo --- lib/galaxy/dependencies/conditional-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/dependencies/conditional-requirements.txt b/lib/galaxy/dependencies/conditional-requirements.txt index ee55dac30c1a..549c1c42fea2 100644 --- a/lib/galaxy/dependencies/conditional-requirements.txt +++ b/lib/galaxy/dependencies/conditional-requirements.txt @@ -61,7 +61,7 @@ weasyprint>=61.2 # not compatible with the last weasyprint version that still supports python 3.8. # This dependency is ignored on python >= 3.9 and should be removed when deprecating # support for python 3.8. -pydyf<0.12; python_version<"3.9" +pydyf<0.11; python_version<"3.9" # AWS Batch runner boto3