-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report model and value being checked #862
Open
mvdbeek
wants to merge
2
commits into
common-workflow-language:main
Choose a base branch
from
mvdbeek:improve_validation_reporting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Report model and value being checked #862
mvdbeek
wants to merge
2
commits into
common-workflow-language:main
from
mvdbeek:improve_validation_reporting
+600
−177
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mr-c
force-pushed
the
improve_validation_reporting
branch
2 times, most recently
from
September 5, 2024 15:09
b3abc4c
to
1f6f795
Compare
This gxformat2 document has a wrong type on the max of a float parameter. ``` class: GalaxyWorkflow doc: | Simple workflow that no-op cats a file. inputs: the_input: type: File doc: input doc the_collection: type: collection collection_type: list the_integer: type: int min: 1 max: 3 the_float: type: float min: 1.0 max: 3.0a outputs: the_output: outputSource: cat/out_file1 steps: cat: tool_id: cat1 doc: cat doc in: input1: the_input ``` Before: ``` .. ERROR: Validation failed schema/v19_09/examples/valid1.yml:1:1: Object `valid1.yml` is not valid because: schema/v19_09/examples/valid1.yml:4:1: the `inputs` field is not valid because: array item is invalid because schema/v19_09/examples/valid1.yml:15:3: checking object `valid1.yml#the_float` * checking object `valid1.yml#the_float` schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `type`, `regex` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `type`, `regex` schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` schema/v19_09/examples/valid1.yml:18:5: the `max` field is not valid because: Value is a str, but valid types for this field are (int, float) schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` schema/v19_09/examples/valid1.yml:18:5: * the `max` field is not valid because: Value is a str, but valid types for this field are (int, float) schema/v19_09/examples/valid1.yml:16:5: * the `type` field is not valid because: Expected one of ('integer', 'int') schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` schema/v19_09/examples/valid1.yml:16:5: * the `type` field is not valid because: Value is a str, but valid values for this field are ("File", "data") schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type` schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` schema/v19_09/examples/valid1.yml:16:5: * the `type` field is not valid because: Expected one of ('collection',) schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type`, `collection_type` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type`, `collection_type` ``` After: ``` .. ERROR: Validation failed schema/v19_09/examples/valid1.yml:1:1: Object `valid1.yml` is not valid because: schema/v19_09/examples/valid1.yml:4:1: the `inputs` field with value `ordereddict([('the_input', ordereddict([('type', 'File'), ('doc', 'input doc')])), ('the_collection', ordereddict([('type', 'collection'), ('collection_type', 'list')])), ('the_integer', ordereddict([('type', 'int'), ('min', 1), ('max', 3)])), ('the_float', ordereddict([('type', 'float'), ('min', 1.0), ('max', '3.0a')]))])` is not valid because: array item is invalid because schema/v19_09/examples/valid1.yml:15:3: checking object `valid1.yml#the_float` using `WorkflowInputParameterLoader` * checking object `valid1.yml#the_float` using `WorkflowTextParameter` schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `type`, `regex` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `type`, `regex` schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` using `WorkflowFloatParameter` schema/v19_09/examples/valid1.yml:18:5: the `max` field is not valid because: Value `3.0a` is a str, but valid types for this field are (float, int) schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` using `WorkflowIntegerParameter` schema/v19_09/examples/valid1.yml:18:5: * the `max` field is not valid because: Value `3.0a` is a str, but valid types for this field are (float, int) schema/v19_09/examples/valid1.yml:16:5: * the `type` field with value `float` is not valid because: Expected one of ('integer', 'int') schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` using `WorkflowDataParameter` schema/v19_09/examples/valid1.yml:16:5: * the `type` field is not valid because: Value `float` is a str, but valid values for this field are ("data", "File") schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type` schema/v19_09/examples/valid1.yml:15:3: * checking object `valid1.yml#the_float` using `WorkflowCollectionParameter` schema/v19_09/examples/valid1.yml:16:5: * the `type` field with value `float` is not valid because: Expected one of ('collection',) schema/v19_09/examples/valid1.yml:17:5: * invalid field `min`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type`, `collection_type` schema/v19_09/examples/valid1.yml:18:5: * invalid field `max`, expected one of: `label`, `doc`, `id`, `default`, `position`, `optional`, `format`, `type`, `collection_type` ``` I don't know if we like the top level dictionary dump there, but in terms of understanding why a document didn't validate I find the after version much easier to understand.
mr-c
force-pushed
the
improve_validation_reporting
branch
from
November 5, 2024 08:20
1f6f795
to
78fcf8d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This gxformat2 document has a wrong type on the max of a float parameter.
Before:
After:
I don't know if we like the top level dictionary dump there, but in terms of understanding why a document didn't validate I find the after version much easier to understand.