common-workflow-language / schema_salad

Semantic Annotations for Linked Avro Data
https://www.commonwl.org/v1.2/SchemaSalad.html
Apache License 2.0
72 stars 62 forks source link

Weird type value in CWL specification documentation #235

Open bogdang989 opened 5 years ago

bogdang989 commented 5 years ago

Type is enum_d9cba076fca539106791a4f46d198c7fcfbdb779, and should be record in CWL specification documentation. https://www.commonwl.org/v1.1.0-dev1/CommandLineTool.html#CommandInputRecordSchema

mr-c commented 3 years ago

This has been fixed for the website, but the schema-salad-tool --codgen python still has things like

enum_d9cba076fca539106791a4f46d198c7fcfbdb779Loader = _EnumLoader(("record",))
enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader = _EnumLoader(("array",))
enum_d961d79c225752b9fadb617367615ab176b47d77Loader = _EnumLoader(("enum",))

But other places it is fine

PickValueMethodLoader = _EnumLoader(("first_non_null", "the_only_non_null", "all_non_null",))
stdinLoader = _EnumLoader(("stdin",))
tetron commented 3 years ago

FWIW the issue is that these enumerations are defined anonymously which is why they don't have an obvious name. We could assign a better name like classname_fieldname_Loader.

mr-c commented 3 years ago

@tetron I experimented with giving them names, but then the codegen complaine that record != sld:record. When I set the name to sld:record then I got other errors