From 15acb973ac364646939559259a222d1bd9e3f47c Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 6 Aug 2024 17:20:46 -0400 Subject: [PATCH] Use parameter models within Galaxy. --- .github/workflows/framework_tools.yaml | 3 +- client/src/components/Tool/ToolForm.vue | 235 ++++--- client/src/components/Tool/ToolSuccess.vue | 2 + .../components/Tool/ToolSuccessMessage.vue | 36 +- client/src/components/Tool/parameterModels.ts | 305 +++++++++ .../src/components/Tool/parameter_models.yml | 610 ++++++++++++++++++ .../Tool/parameter_specification.yml | 1 + client/src/components/Tool/services.js | 21 + client/src/components/Tool/structured.test.ts | 79 +++ client/src/components/Tool/structured.ts | 397 ++++++++++++ client/src/stores/jobStore.ts | 1 + lib/galaxy/app.py | 9 +- lib/galaxy/celery/tasks.py | 17 +- lib/galaxy/managers/jobs.py | 57 +- lib/galaxy/model/__init__.py | 30 + ...3d5d144_implement_structured_tool_state.py | 56 ++ lib/galaxy/schema/jobs.py | 13 + lib/galaxy/schema/schema.py | 11 + lib/galaxy/schema/tasks.py | 12 + lib/galaxy/tool_util/verify/interactor.py | 164 +++-- lib/galaxy/tools/__init__.py | 103 ++- lib/galaxy/tools/execute.py | 99 ++- lib/galaxy/tools/parameters/basic.py | 4 +- lib/galaxy/tools/parameters/meta.py | 77 ++- lib/galaxy/webapps/galaxy/api/histories.py | 12 + lib/galaxy/webapps/galaxy/api/jobs.py | 25 +- lib/galaxy/webapps/galaxy/api/tools.py | 61 +- .../webapps/galaxy/services/histories.py | 28 +- lib/galaxy/webapps/galaxy/services/jobs.py | 124 +++- lib/galaxy/webapps/galaxy/services/tools.py | 72 ++- lib/galaxy_test/base/populators.py | 20 +- scripts/gen_typescript_artifacts.py | 20 + test/functional/test_toolbox_pytest.py | 5 +- 33 files changed, 2519 insertions(+), 190 deletions(-) create mode 100644 client/src/components/Tool/parameterModels.ts create mode 100644 client/src/components/Tool/parameter_models.yml create mode 120000 client/src/components/Tool/parameter_specification.yml create mode 100644 client/src/components/Tool/structured.test.ts create mode 100644 client/src/components/Tool/structured.ts create mode 100644 lib/galaxy/model/migrations/alembic/versions_gxy/7ffd33d5d144_implement_structured_tool_state.py create mode 100644 scripts/gen_typescript_artifacts.py diff --git a/.github/workflows/framework_tools.yaml b/.github/workflows/framework_tools.yaml index a06f6e469aad..001222018822 100644 --- a/.github/workflows/framework_tools.yaml +++ b/.github/workflows/framework_tools.yaml @@ -26,6 +26,7 @@ jobs: strategy: matrix: python-version: ['3.8'] + use-legacy-api: ['0', '1'] services: postgres: image: postgres:13 @@ -66,7 +67,7 @@ jobs: path: 'galaxy root/.venv' key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-framework-tools - name: Run tests - run: ./run_tests.sh --coverage --framework-tools + run: GALAXY_TEST_USE_LEGACY_TOOL_API="${{ matrix.use-legacy-api }}" ./run_tests.sh --coverage --framework-tools working-directory: 'galaxy root' - uses: codecov/codecov-action@v3 with: diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue index 0268d65bad8e..827a95a22645 100644 --- a/client/src/components/Tool/ToolForm.vue +++ b/client/src/components/Tool/ToolForm.vue @@ -89,7 +89,7 @@