Skip to content

Regenerate 2026-01-03 with some CWL extensions#43

Open
mr-c wants to merge 1 commit intomainfrom
regen_20260103
Open

Regenerate 2026-01-03 with some CWL extensions#43
mr-c wants to merge 1 commit intomainfrom
regen_20260103

Conversation

@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 27.82324% with 441 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.42%. Comparing base (2047d22) to head (149ea50).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ProcessGenerator.ts 2.81% 138 Missing ⚠️
src/LoopInput.ts 4.25% 90 Missing ⚠️
src/CUDARequirement.ts 24.32% 49 Missing and 7 partials ⚠️
src/Loop.ts 32.81% 37 Missing and 6 partials ⚠️
src/Secrets.ts 30.00% 31 Missing and 4 partials ⚠️
src/MPIRequirement.ts 31.25% 29 Missing and 4 partials ⚠️
src/ShmSize.ts 31.25% 29 Missing and 4 partials ⚠️
src/Operation.ts 0.00% 2 Missing ⚠️
src/WorkflowStepOutput.ts 0.00% 2 Missing ⚠️
src/CommandInputParameter.ts 50.00% 1 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
- Coverage   54.36%   52.42%   -1.94%     
==========================================
  Files         136      143       +7     
  Lines        8218     8709     +491     
  Branches     1657     1792     +135     
==========================================
+ Hits         4468     4566      +98     
- Misses       3381     3749     +368     
- Partials      369      394      +25     
Flag Coverage Δ
unittests 52.42% <27.82%> (-1.94%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mr-c
Copy link
Member Author

mr-c commented Jan 3, 2026

@alexiswl Can you help fix these errors with generating JSON schema from the CWL TypeScript schema?

https://github.com/common-workflow-lab/cwl-ts-auto/actions/runs/20676746678/job/59365385211?pr=43

*/
export interface CommandLineBindableProperties {

extensionFields?: Internal.Dictionary<any>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would adding this back in resolve this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that, but then there are other validation issues: https://github.com/common-workflow-lab/cwl-ts-auto/actions/runs/20676696133/job/59365273384

The removal is legitimate, as the class is now abstract..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class is now abstract

Yes but the object constructor still expects the extension fields, such as https://github.com/common-workflow-lab/cwl-ts-auto/blob/regen_20260103/src/CommandLineBindable.ts#L88

So you either need to either remove the extension fields from those types of calls, OR update the constructor type to add in the extension fields type (which was previously just in the CommandLineBindable properties), like so

This constructor

  constructor ({loadingOptions, extensionFields, inputBinding} : {loadingOptions?: LoadingOptions} & Internal.CommandLineBindableProperties) {

to

  constructor ({loadingOptions, extensionFields, inputBinding} : {loadingOptions?: LoadingOptions} & Internal.Dictionary<any> & Internal.CommandLineBindableProperties) {

I tried that, but then there are other validation issues

Yep because id is now set to 'mandatory' in many of the fields, such as https://github.com/common-workflow-lab/cwl-ts-auto/pull/43/changes#diff-07abac72669befd367f8ae59ac50db4ca16d87201905fb78ab737201b14488a6R27 but none of the cwl tests have 'id' in their attributes? If this is intentional, we will need to update the script that generates the cwl schema to ensure that the 'id' attribute is removed from the required fields, which shouldn't be too difficult.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like some of the SALAD processing for maps isn't happening, either on the Typescript side or the JSON schema generation/testing side.

https://www.commonwl.org/v1.2/Workflow.html#map

For example, the id field for WorkflowStepInput (used by the in field of a workflow step) is rarely in the long form:

class: Workflow
inputs:
  message: string
steps:
  a_step:
    run: something.cwl
    in:
      - id: an_input
        source: message
# […]

but usually written in the short form:

class: Workflow
inputs:
  message: string
steps:
  a_step:
    run: something.cwl
    in:
      an_input: message
# […]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can manually remove the 'id' fields in these sections from the json schema, that's why we generate the cwl-raw file and then the curated schema from that as the typescript isn't a perfect representation of a CWL file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can manually remove the 'id' fields in these sections from the json schema, that's why we generate the cwl-raw file and then the curated schema from that as the typescript isn't a perfect representation of a CWL file.

The JSON schema should be modified to support all variations of the map syntax. I guess that information isn't present in the TypeScript objects because the loader functions take care of the variations. So the post-processing from the TypeScript to JSON Schema is going to need additional information on where to encode the map varients.

That information is in the SALAD definition of CWL.

I see at least 3 options to move forward:

A. Record the information about the map field variations during the TypeScript code generation that produced this repository. Use that information in a post-processing step after the TypeScript objects to JSON Schema generation.

or

B. Create schema-salad-tool --codegen json-schema to directly output JSON schema, taking into account all the map field varients.

or

C. Create manual patches to apply to the generated JSON Schema, updating them as the CWL 1.2 schema continues to be refined, and manually porting them for the future CWL versions.

I feel like Option B is the most future-proofed and brings value to other SALAD users, but also the most work. In some ways it won't be as difficult as the other additions of new codegen targets as we have two examples of what JSON Schema for CWL would look like.

I can assist with all of these options, but I'm not available to do any of these options entirely myself.

@alexiswl
Copy link
Contributor

alexiswl commented Jan 5, 2026

Can you help fix these errors with generating JSON schema from the CWL TypeScript schema?

This looks more like Typescript errors than json schema generation errors. See https://github.com/common-workflow-lab/cwl-ts-auto/pull/43/changes#r2660063670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants