-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add test for SchemaDefRequirement with a workflow and the types containing an $import statement #171
Conversation
It would be a better test if it did output something related to the custom types, yes. |
Roger that, will keep that in mind for future PR's :-) thanks |
0a2c83f
to
655f41a
Compare
conformance_tests.yaml
Outdated
- tool: tests/schemadef_types_with_import-wf.cwl | ||
job: tests/schemadef_types_with_import-job.json | ||
output: { | ||
"out": "ordereddict([('CN', 'UNKNOWN'), ('DT', '1970-01-01T00:00:00Z'), ('ID', 'SRR622461'), ('LB', 'Illumina NA12878'), ('PI', '250'), ('PL', 'ILLUMINA'), ('SM', 'NA12878')])\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out
here was interesting. In tests/schemadef_types_with_import-tool.cwl
I used valueFrom: $(self.readgroup_meta_list)
and it returned the repr
of the ordered dict (I think).
If I used valueFrom: $(self.readgroup_meta_list)[]
then the ordereddict
prefix was gone 😕
What I wanted was to access DT
or ID
for the echo command. Any idea if that's doable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a cwltool bug, the serialization should be a pure JSON object. Can you open an issue with a reproducer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating the smallest example to reproduce the issue, then will create the issue (and maybe a PR too).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- id: message | ||
type: "schemadef_types_with_import_readgroup.yml#readgroups_bam_file" | ||
inputBinding: | ||
valueFrom: $(self.readgroup_meta_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want the value of DT, you could try this:
valueFrom: $(self.readgroup_meta_list) | |
valueFrom: $(self.readgroup_meta_list["DT"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That almost worked. But the error message displayed the read_group_meta_list
that made me realize we had type: array
in the input type. So $(self.readgroup_meta_list[0]['DT'])
did the trick 👍 thanks @mr-c !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either the cwltool serialization bug with ordereddict
needs fixing, or the test needs to be change to not trigger that.
655f41a
to
d37ea74
Compare
…ining an $import statement. Used example written by @jeremiahsavage (thanks!)
d37ea74
to
ef3ded9
Compare
Created |
Thanks! |
For common-workflow-language/common-workflow-language#703
Used example written by @jeremiahsavage (thanks!). It doesn't output anything, but validates that it could import the types successfully.
Or if we prefer to test for some output, I can rewrite it to output something.
Cheers
Bruno