cwl-utils icon indicating copy to clipboard operation
cwl-utils copied to clipboard

Proposal for a Function to Generate JSON Schema for Workflow Parameter Files

Open suecharo opened this issue 1 year ago • 8 comments

From issue https://github.com/common-workflow-language/cwl-utils/issues/273

suecharo avatar Feb 05 '24 10:02 suecharo

I have not yet been able to address the comment discussed in https://github.com/common-workflow-language/cwl-utils/issues/273#issuecomment-1890921004.

suecharo avatar Feb 05 '24 10:02 suecharo

Impeccable timing @suecharo! I've also drafted up an implementation of this too that addresses this comment.

It also addresses complex input types, such as the inputs required for this pipeline - https://github.com/umccr/cwl-ica/blob/main/workflows/tso500-ctdna-with-post-processing-pipeline/1.2.0--1.0.0/tso500-ctdna-with-post-processing-pipeline__1.2.0--1.0.0.cwl

Or

https://github.com/umccr/cwl-ica/blob/main/workflows/bclconvert-with-qc-pipeline/4.0.3/bclconvert-with-qc-pipeline__4.0.3.cwl

Mind if I put in a PR into this script?

alexiswl avatar Feb 13 '24 22:02 alexiswl

On a different note I've also generated a schema for the workflows themselves! https://github.com/common-workflow-lab/cwl-ts-auto/pull/27

alexiswl avatar Feb 14 '24 02:02 alexiswl

@alexiswl

Mind if I put in a PR into this script?

Of course, thank you. I have granted you access to https://github.com/suecharo/cwl-utils. (Is this the correct way to do it?)"

suecharo avatar Feb 20 '24 08:02 suecharo

I have granted you access to https://github.com/suecharo/cwl-utils. (Is this the correct way to do it?)"

Many correct ways, but yes this one works. I've rebased off your branch onto this PR https://github.com/common-workflow-language/cwl-utils/pull/288

But can PR this branch onto your branch as well? Rather than PR from main on your remote, I'd recommend making a branch on your repo and putting the PR in from that.

My last step is generating a GH actions test to make sure that I can generate a schema for all of the cwl v1.2 tests and then validate the input jsons in the said test directory against the respective workflow input json schemas.

alexiswl avatar Feb 20 '24 09:02 alexiswl

@alexiswl Thank you for your advice.

Rather than PR from main on your remote, I'd recommend making a branch on your repo and putting the PR in from that.

Indeed, you are correct. I should have created a separate branch. I have now created a new branch https://github.com/suecharo/cwl-utils/commits/enhancement/cwl-inputs-schema-gen .

Due to GitHub's constraints, we can't change the source branch in a PR after forking. We'll need to make a new PR instead...

But can PR this branch onto your branch as well?

Absolutely, it is possible. In scenarios where both of us are working on similar matters across our forks, it necessitates sending PRs between our forks, doesn’t it? However, given the circumstances with the main branch as mentioned, should there be a need for further modifications on my end, I will send a PR to your alexiswl:enhancement/cwl-inputs-schema-gen .

Furthermore, feel free to close this PR and shift our discussion to https://github.com/common-workflow-language/cwl-utils/pull/288 if that is more convenient.

suecharo avatar Feb 29 '24 09:02 suecharo

Hi @suecharo,

Sorry for the delay in the response here.

Yes I think it makes sense to move to #288, I'll 'cherry-picked' your commits in #282 and based my code from there.

Main task I think is to test the json-schema generator against the tests in v1.2

alexiswl avatar Mar 03 '24 23:03 alexiswl

@alexiswl

Thank you. I have confirmed that commits have been cherry-picked in PR #288 . So, it's ok to close this PR.

P.S., I'm looking forward to the CWL conference!

suecharo avatar Mar 04 '24 04:03 suecharo