Enable attaching sample sheet to landing requests#21489
Enable attaching sample sheet to landing requests#21489mvdbeek merged 6 commits intogalaxyproject:devfrom
Conversation
ca7fb09 to
25ccc4a
Compare
|
I'm not opposed to any of this and I do appreciate you getting it to work - I think maybe I wish the validation felt more holistic. Like I assume we're not validating collection_type any of those places and we're not validating record types (if there is record type validation code anywhere). But I can create an issue to revisit this and clean it up if I'm unhappy with it - I know you're in a hurry and you've done way more work than you expected to get it working and I really appreciate all of that. |
|
I can work on the validation, I agree that's just as important as the functionality. I think feature-wise we're probably good for the planned demo in January, so there's no particular rush ... I can always deploy from a branch for test.galaxyproject.org |
This commit addresses the feedback from PR galaxyproject#21489 to make validation feel more holistic by consolidating validation into Pydantic models and applying it consistently across the codebase. Changes: - Consolidate SampleSheetColumnDefinition: Replace TypedDict with Pydantic model in schema.py, providing runtime validation at API boundaries. Add backwards-compatible dict-like access methods. - Extend collection_type validation: Update _check_collection_type() to validate all collection types (list, paired, paired_or_unpaired, sample_sheet, record). Flat types (sample_sheet, record) cannot be nested with other types. - Add RecordField model: New Pydantic model for record collection field definitions with name and type validation. - Fix landing request validation: Remove silent error swallowing in validate_workflow_request_state(). ValidationError is now properly converted to RequestParameterInvalidException. - Add cross-validation: BaseCollectionTarget now validates that: * record collections require 'fields' * sample_sheet collections require 'column_definitions' - Update imports: sample_sheet_util.py, sample_sheet_workbook.py, and dataset_collections service now import from the canonical schema.py location.
|
Did you have something like https://github.com/galaxyproject/galaxy/compare/dev...mvdbeek:claude/enhance-sample-validation-TjCue?expand=1 in mind ? I think I'd make that a follow up, I hope that's ok ? |
That is not what I was imagining - it uses Pydantic so much more intelligently than what I was thinking and will probably produce much clearer errors, much more consistently. Very nice enhancement - thank you - totally fine with me if it comes in a subsequent PR. |
and relax test.
8d002de to
55b76db
Compare
Both for data landing and workflow landing requests
How to test the changes?
(Select all options that apply)
License