-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add generated code for cwl-v1.2.1_proposed #2
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 generated code for cwl-v1.2.1_proposed #2
Conversation
Great to see the progress! Any thoughts on how to wire up the tests to run here? |
- Fix bug that caused exceptions not getting thrown - Fix loadDocumentByString tests baseuri parameter
- Refactor example tests
Yeah, I was going to copy over the workflow from #1 I just didn't get around to doing it yet 😸 |
Codecov Report
@@ Coverage Diff @@
## main #2 +/- ##
=======================================
Coverage ? 33.54%
=======================================
Files ? 126
Lines ? 6371
Branches ? 1569
=======================================
Hits ? 2137
Misses ? 3939
Partials ? 295
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
- Change file naming convention to all lower case - Introduce enum types for enum fields (instead of runtime checked strings) - Add default parameter value for "class" fields
Heh, there isn't really a convention on this in ts besides "keep it consistent". I would personally prefer |
Why not keep the case as-is? If people want another case convention than the one used in their source schema salad documents, they can apply a post-codegen transformation, yes? |
That would break consistency with the filenames in the util folder. Other than that, I agree. That aside, this is just the file names, the types and classes itself will keep their original name and will also be imported with the original name. The library consumer will never be concerned with the file names. import { CommandLineTool } from 'cwl-ts-auto' Do you think it would still be better to have the file names as is? I am not attached to the 'all lower case' standard 😄 Edit: I overread the post-codegen transformation part, that could be a good solution! |
- Fix 'undefined' typeguard - Fix comparison in saveRelativeUri - Add missing docRoot parameter to loader functions
@ZimmerA shall we merge this and cut a 0.1 release? |
Can do, I will prepare the release and then we can merge 👍🏻 |
@mr-c I would say this is ready, what do you think? |
Go for it! |
Maybe mention that this is only for CWL v1.2 syntax, and other documents will need upgrading using https://pypi.org/project/cwl-upgrader/ first? |
Done! |
This is the first version of cwl-ts-auto generated by the codegen currently under development in common-workflow-language/schema_salad#479 using the cwl-v1.2.1_proposed schema
Any bug reports or improvement suggestions are highly appreciated!
Keep in mind that this code currently only has been tested with node.js v17 and probably does not work in the browser yet.
If there are any questions, feel free to ask in here or contact me privately. I will try to upload examples on how to use this library shortly!
TODO to merge this: