Schema regularization/validation fixes for tests around workflow outputs#1286
Schema regularization/validation fixes for tests around workflow outputs#1286jmchilton wants to merge 3 commits into
Conversation
Galaxy's Tests (GalaxyWorkflowTests) pydantic model and gxwf validate-tests discriminate dataset-vs-collection outputs solely on class: Collection. An output asserted with element_tests but no class: Collection routes to the dataset branch (extra=forbid) and is rejected, though planemo runs it fine. Add class: Collection to the 204 collection output/element nodes (recursive) across 50 files; runtime ignores the key. gxwf validate-tests green count 39 -> 68, no regressions. 24 files using the old duplicate-key asserts syntax are skipped here (separate normalization). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…b inputs
Nested collection elements in test `job:` inputs used the legacy `type:`
key (e.g. `class: Collection` / `type: paired`) while the top-level
collection used `collection_type:`. The input Collection pydantic model
(galaxy.tool_util_models.test_job.Collection, extra=forbid) accepts only
`collection_type`; a stray nested `type:` fails the Collection branch and
makes the smart-union fall back to the File branch, producing confusing
"required property 'location'" / "additionalProperty: collection_type"
errors on the whole input. gxwf validate-tests job-input errors 686 -> 0.
Runtime-safe: planemo delegates staging to Galaxy's galactic_job_json
(lib/galaxy/tool_util/cwl/util.py). Its to_elements() derives every
nested sub-collection type by splitting the top-level collection_type
string ("list:paired" -> "paired" -> ...) and reads only `identifier`
and `elements` off each nested element -- never the element's own
`type`/`collection_type` key. The nested `type:` was dead metadata at
run time; renaming it is inert to planemo/Galaxy and only aligns the
fixtures with the strict Tests schema. No test-run behavior changes.
46 renames across 24 files. 24 files using the old duplicate-key asserts
syntax are unparseable by the round-trip loader and skipped (front C).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Applies the same two mechanical transforms to files that became eligible on current main: several duplicate-key-asserts files that main has since fixed (now round-trip parseable), a new test file, and MAGs-generation (whose rebase conflict resolution re-ran only the input rename). Re-running both idempotent transforms on the full tree closes the coverage gaps the rebase left. class:Collection added to 31 collection output/element nodes across 8 files; nested job-input type -> collection_type on 3. gxwf validate-tests: 0 element_tests and 0 job-input discriminator errors remain in parseable files (16 duplicate-key files still skipped, front C). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mvdbeek
left a comment
There was a problem hiding this comment.
Looks great, i wonder if we'll hit the 6h timeout but in principle this is fine of course
Test Results (powered by Planemo)Test Summary
Errored Tests
Failed Tests
Passed Tests
|
|
Note Posted by Claude (AI assistant) on behalf of @jmchilton — not authored by them personally. Closing this in favor of smaller PRs. This one bundled 55 workflow directories, which CI structurally cannot complete: the PR test job caps at What CI did tell usFrom the combined artifact plus the raw chunk logs of run 29268785765: 38 workflow directories passed, 11 failed, 6 got no result. Every failure has a pre-existing cause unrelated to the schema change in this PR. The diff here is two mechanical patterns only — Replacement PRs (expected green)All workflows in these passed on this branch:
Held back — pre-existing breakage, needs work first
Never ranhyphy, cutandrun, hic-hicup-cooler, functional-annotation-of-sequences, histological-staining-area-quantification, multiplex-tissue-microarray-analysis. These need their own small PR to get an actual verdict; Suggested follow-upRaising |
… reached in #1286) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-rebased tests: declare class:Collection / collection_type (workflows CI never reached in #1286)
…ularization fasttree 2.1.10+galaxy1 is no longer installable from the toolshed (only 2.1.10 and 2.1.10+galaxy3 are), so the workflow could not be invoked and lint errored. Supersedes #1162, which bumped content_id/tool_id/changeset but left tool_version at +galaxy1 in all three fasttree steps. Also carries the class:Collection / collection_type test annotations for this workflow, split out of #1286. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
I think a bunch of this will be red based on other structural PRs uncovering pre-existing red workflows - but I'll extract the green stuff and try to work on isolating and green-ifying the red workflows.
FOR CONTRIBUTOR:
FOR REVIEWERS:
This workflow does/runs/performs … xyz … to generate/analyze/etc …namefield should be human readable (spaces are fine, no underscore, dash only where spelling dictates it), no abbreviation unless generally understood-) over underscore (_), prefer all lowercase. Folder becomes repository in iwc-workflows organization and is included in TRS id