From 945bd5db130d1aa206e7cd2467f39d4abe97678a Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 12 Jul 2024 18:16:51 +0100 Subject: [PATCH 1/4] Sync cwl_conformance GitHub workflow with api one --- .github/workflows/cwl_conformance.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cwl_conformance.yaml b/.github/workflows/cwl_conformance.yaml index f9ac963071ac..fc696787fe11 100644 --- a/.github/workflows/cwl_conformance.yaml +++ b/.github/workflows/cwl_conformance.yaml @@ -4,10 +4,12 @@ on: paths-ignore: - 'client/**' - 'doc/**' + - 'lib/galaxy_test/selenium/**' pull_request: paths-ignore: - 'client/**' - 'doc/**' + - 'lib/galaxy_test/selenium/**' env: GALAXY_TEST_DBURI: 'postgresql://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8' concurrency: @@ -59,7 +61,7 @@ jobs: uses: actions/cache@v4 with: path: 'galaxy root/.venv' - key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }} + key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-api - name: Run tests run: ./run_tests.sh --coverage --skip_flakey_fails -cwl lib/galaxy_test/api/cwl -- -m "${{ matrix.marker }} and ${{ matrix.conformance-version }}" working-directory: 'galaxy root' From e0ee749c1638a15c5d4c0df7bde9a8cfc0ae58bd Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 12 Jul 2024 18:17:42 +0100 Subject: [PATCH 2/4] Type annotation fix --- lib/galaxy/structured_app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/structured_app.py b/lib/galaxy/structured_app.py index 7ab7bcba3977..1d1986dee1a8 100644 --- a/lib/galaxy/structured_app.py +++ b/lib/galaxy/structured_app.py @@ -46,7 +46,10 @@ from galaxy.managers.collections import DatasetCollectionManager from galaxy.managers.hdas import HDAManager from galaxy.managers.histories import HistoryManager - from galaxy.managers.workflows import WorkflowsManager + from galaxy.managers.workflows import ( + WorkflowContentsManager, + WorkflowsManager, + ) from galaxy.tool_shed.galaxy_install.installed_repository_manager import InstalledRepositoryManager from galaxy.tools import ToolBox from galaxy.tools.cache import ToolCache @@ -110,7 +113,7 @@ class MinimalManagerApp(MinimalApp): history_manager: "HistoryManager" hda_manager: "HDAManager" workflow_manager: "WorkflowsManager" - workflow_contents_manager: Any # 'galaxy.managers.workflows.WorkflowContentsManager' + workflow_contents_manager: "WorkflowContentsManager" library_folder_manager: Any # 'galaxy.managers.folders.FolderManager' library_manager: Any # 'galaxy.managers.libraries.LibraryManager' role_manager: Any # 'galaxy.managers.roles.RoleManager' From 5c7b6b6085329154e3afe20d699a83d2c58b8681 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 12 Jul 2024 18:18:38 +0100 Subject: [PATCH 3/4] Easier debugging of assertion --- lib/galaxy/tool_util/cwl/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/cwl/parser.py b/lib/galaxy/tool_util/cwl/parser.py index 674b3abcc357..1599955eb796 100644 --- a/lib/galaxy/tool_util/cwl/parser.py +++ b/lib/galaxy/tool_util/cwl/parser.py @@ -903,7 +903,7 @@ def split_step_references(step_references, workflow_id=None, multiple=True): if multiple: return split_references else: - assert len(split_references) == 1 + assert len(split_references) == 1, split_references return split_references[0] From e8e1b4a1605432f32c446bbe4f1b965c294b3566 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 12 Jul 2024 18:20:04 +0100 Subject: [PATCH 4/4] Move try/except one level down --- lib/galaxy_test/base/populators.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index 1e284135937b..fcf59fd12d1f 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -2532,13 +2532,13 @@ def run_conformance_test(self, version: str, doc: str): raise Exception("Expected run to fail but it didn't.") expected_outputs = test["output"] - try: - for key, value in expected_outputs.items(): + for key, value in expected_outputs.items(): + try: actual_output = run.get_output_as_object(key) cwltest.compare.compare(value, actual_output) - except Exception: - self.dataset_populator._summarize_history(run.history_id) - raise + except Exception: + self.dataset_populator._summarize_history(run.history_id) + raise class LibraryPopulator: