diff --git a/cwl_utils/parser/cwl_v1_0.py b/cwl_utils/parser/cwl_v1_0.py index 2037fa7..10acf77 100644 --- a/cwl_utils/parser/cwl_v1_0.py +++ b/cwl_utils/parser/cwl_v1_0.py @@ -1162,6 +1162,7 @@ class RecordField(Documented): A field of a record. """ + name: str class_uri = "https://w3id.org/cwl/salad#RecordField" def __init__( @@ -1181,7 +1182,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -1636,6 +1637,7 @@ class EnumSchema(Saveable): """ + name: str class_uri = "https://w3id.org/cwl/salad#EnumSchema" def __init__( @@ -1654,7 +1656,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ @@ -2708,6 +2710,7 @@ def save( class CWLRecordField(RecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CWLRecordField" def __init__( @@ -2727,7 +2730,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -4404,6 +4407,7 @@ class OutputSchema(SchemaBase): class InputRecordField(CWLRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordField" def __init__( @@ -4425,7 +4429,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.inputBinding = inputBinding self.label = label @@ -4785,6 +4789,7 @@ def save( class InputRecordSchema(CWLRecordSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordSchema" def __init__( @@ -4807,7 +4812,7 @@ def __init__( self.fields = fields self.type_ = type_ self.label = label - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, InputRecordSchema): @@ -5108,6 +5113,7 @@ def save( class InputEnumSchema(EnumSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputEnumSchema" def __init__( @@ -5128,7 +5134,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -5808,6 +5814,7 @@ def save( class OutputRecordField(CWLRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputRecordField" def __init__( @@ -5828,7 +5835,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.outputBinding = outputBinding @@ -6393,6 +6400,7 @@ def save( class OutputEnumSchema(EnumSchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputEnumSchema" def __init__( @@ -6413,7 +6421,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -7093,6 +7101,7 @@ def save( class InputParameter(Parameter): + id: str class_uri = "https://w3id.org/cwl/cwl#InputParameter" def __init__( @@ -7121,7 +7130,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.inputBinding = inputBinding self.default = default @@ -7722,6 +7731,7 @@ def save( class OutputParameter(Parameter): + id: str class_uri = "https://w3id.org/cwl/cwl#OutputParameter" def __init__( @@ -7748,7 +7758,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.outputBinding = outputBinding self.format = format @@ -9656,6 +9666,7 @@ def save( class CommandInputRecordField(InputRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordField" def __init__( @@ -9677,7 +9688,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.inputBinding = inputBinding self.label = label @@ -10037,6 +10048,7 @@ def save( class CommandInputRecordSchema(InputRecordSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordSchema" def __init__( @@ -10059,7 +10071,7 @@ def __init__( self.fields = fields self.type_ = type_ self.label = label - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandInputRecordSchema): @@ -10360,6 +10372,7 @@ def save( class CommandInputEnumSchema(InputEnumSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputEnumSchema" def __init__( @@ -10380,7 +10393,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -11060,6 +11073,7 @@ def save( class CommandOutputRecordField(OutputRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordField" def __init__( @@ -11080,7 +11094,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.outputBinding = outputBinding @@ -11386,6 +11400,7 @@ def save( class CommandOutputRecordSchema(OutputRecordSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordSchema" def __init__( @@ -11408,7 +11423,7 @@ def __init__( self.fields = fields self.type_ = type_ self.label = label - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandOutputRecordSchema): @@ -11709,6 +11724,7 @@ def save( class CommandOutputEnumSchema(OutputEnumSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputEnumSchema" def __init__( @@ -11729,7 +11745,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -12413,6 +12429,7 @@ class CommandInputParameter(InputParameter): An input parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandInputParameter" def __init__( @@ -12441,7 +12458,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.inputBinding = inputBinding self.default = default @@ -13046,6 +13063,7 @@ class CommandOutputParameter(OutputParameter): An output parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputParameter" def __init__( @@ -13073,7 +13091,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.outputBinding = outputBinding self.format = format self.type_ = type_ @@ -13623,6 +13641,7 @@ class CommandLineTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandLineTool" def __init__( @@ -13654,7 +13673,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.inputs = inputs self.outputs = outputs self.requirements = requirements @@ -16974,6 +16993,7 @@ def save( class ExpressionToolOutputParameter(OutputParameter): + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionToolOutputParameter" def __init__( @@ -17001,7 +17021,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.outputBinding = outputBinding self.format = format self.type_ = type_ @@ -17551,6 +17571,7 @@ class ExpressionTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionTool" def __init__( @@ -17575,7 +17596,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.inputs = inputs self.outputs = outputs self.requirements = requirements @@ -18209,6 +18230,7 @@ class WorkflowOutputParameter(OutputParameter): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowOutputParameter" def __init__( @@ -18238,7 +18260,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.outputBinding = outputBinding self.format = format self.outputSource = outputSource @@ -18941,6 +18963,7 @@ class WorkflowStepInput(Sink): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepInput" def __init__( @@ -18963,7 +18986,7 @@ def __init__( self.loadingOptions = LoadingOptions() self.source = source self.linkMerge = linkMerge - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.default = default self.valueFrom = valueFrom @@ -19327,6 +19350,7 @@ class WorkflowStepOutput(Saveable): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepOutput" def __init__( @@ -19343,7 +19367,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, WorkflowStepOutput): @@ -19539,6 +19563,7 @@ class WorkflowStep(Saveable): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStep" def __init__( @@ -19564,7 +19589,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.in_ = in_ self.out = out self.requirements = requirements @@ -20270,6 +20295,7 @@ class Workflow(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#Workflow" def __init__( @@ -20294,7 +20320,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.inputs = inputs self.outputs = outputs self.requirements = requirements @@ -22440,6 +22466,7 @@ def save( class ProcessGenerator(Process): + id: str class_uri = "http://commonwl.org/cwltool#ProcessGenerator" def __init__( @@ -22464,7 +22491,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.inputs = inputs self.outputs = outputs self.requirements = requirements diff --git a/cwl_utils/parser/cwl_v1_1.py b/cwl_utils/parser/cwl_v1_1.py index 1fca4ee..d80ef70 100644 --- a/cwl_utils/parser/cwl_v1_1.py +++ b/cwl_utils/parser/cwl_v1_1.py @@ -1162,6 +1162,7 @@ class RecordField(Documented): A field of a record. """ + name: str class_uri = "https://w3id.org/cwl/salad#RecordField" def __init__( @@ -1181,7 +1182,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -1636,6 +1637,7 @@ class EnumSchema(Saveable): """ + name: str class_uri = "https://w3id.org/cwl/salad#EnumSchema" def __init__( @@ -1654,7 +1656,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ @@ -2708,6 +2710,7 @@ def save( class CWLRecordField(RecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CWLRecordField" def __init__( @@ -2727,7 +2730,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -4569,6 +4572,7 @@ class OutputSchema(IOSchema): class InputRecordField(CWLRecordField, FieldBase, InputFormat, LoadContents): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordField" def __init__( @@ -4594,7 +4598,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -5202,6 +5206,7 @@ def save( class InputRecordSchema(CWLRecordSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordSchema" def __init__( @@ -5226,7 +5231,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, InputRecordSchema): @@ -5580,6 +5585,7 @@ def save( class InputEnumSchema(EnumSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputEnumSchema" def __init__( @@ -5600,7 +5606,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -5958,6 +5964,7 @@ def save( class InputArraySchema(CWLArraySchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputArraySchema" def __init__( @@ -5982,7 +5989,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, InputArraySchema): @@ -6336,6 +6343,7 @@ def save( class OutputRecordField(CWLRecordField, FieldBase, OutputFormat): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputRecordField" def __init__( @@ -6359,7 +6367,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -6841,6 +6849,7 @@ def save( class OutputRecordSchema(CWLRecordSchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputRecordSchema" def __init__( @@ -6865,7 +6874,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, OutputRecordSchema): @@ -7219,6 +7228,7 @@ def save( class OutputEnumSchema(EnumSchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputEnumSchema" def __init__( @@ -7239,7 +7249,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -7597,6 +7607,7 @@ def save( class OutputArraySchema(CWLArraySchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputArraySchema" def __init__( @@ -7621,7 +7632,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, OutputArraySchema): @@ -9992,6 +10003,7 @@ def save( class CommandInputRecordField(InputRecordField, CommandLineBindable): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordField" def __init__( @@ -10018,7 +10030,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -10687,6 +10699,7 @@ def save( class CommandInputRecordSchema( InputRecordSchema, CommandInputSchema, CommandLineBindable ): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordSchema" def __init__( @@ -10712,7 +10725,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.inputBinding = inputBinding def __eq__(self, other: Any) -> bool: @@ -11132,6 +11145,7 @@ def save( class CommandInputEnumSchema(InputEnumSchema, CommandInputSchema, CommandLineBindable): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputEnumSchema" def __init__( @@ -11153,7 +11167,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -11579,6 +11593,7 @@ def save( class CommandInputArraySchema( InputArraySchema, CommandInputSchema, CommandLineBindable ): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputArraySchema" def __init__( @@ -11604,7 +11619,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.inputBinding = inputBinding def __eq__(self, other: Any) -> bool: @@ -12017,6 +12032,7 @@ def save( class CommandOutputRecordField(OutputRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordField" def __init__( @@ -12041,7 +12057,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -12590,6 +12606,7 @@ def save( class CommandOutputRecordSchema(OutputRecordSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordSchema" def __init__( @@ -12614,7 +12631,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandOutputRecordSchema): @@ -12968,6 +12985,7 @@ def save( class CommandOutputEnumSchema(OutputEnumSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputEnumSchema" def __init__( @@ -12988,7 +13006,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -13346,6 +13364,7 @@ def save( class CommandOutputArraySchema(OutputArraySchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputArraySchema" def __init__( @@ -13370,7 +13389,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandOutputArraySchema): @@ -13728,6 +13747,7 @@ class CommandInputParameter(InputParameter): An input parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandInputParameter" def __init__( @@ -13758,7 +13778,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.loadContents = loadContents self.loadListing = loadListing @@ -14482,6 +14502,7 @@ class CommandOutputParameter(OutputParameter): An output parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputParameter" def __init__( @@ -14509,7 +14530,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.type_ = type_ self.outputBinding = outputBinding @@ -15060,6 +15081,7 @@ class CommandLineTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandLineTool" def __init__( @@ -15091,7 +15113,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -19192,6 +19214,7 @@ def save( class ExpressionToolOutputParameter(OutputParameter): + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionToolOutputParameter" def __init__( @@ -19218,7 +19241,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.type_ = type_ @@ -19697,6 +19720,7 @@ def save( class WorkflowInputParameter(InputParameter): + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowInputParameter" def __init__( @@ -19727,7 +19751,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.loadContents = loadContents self.loadListing = loadListing @@ -20458,6 +20482,7 @@ class ExpressionTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionTool" def __init__( @@ -20482,7 +20507,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -21117,6 +21142,7 @@ class WorkflowOutputParameter(OutputParameter): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowOutputParameter" def __init__( @@ -21145,7 +21171,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.outputSource = outputSource self.linkMerge = linkMerge @@ -21794,6 +21820,7 @@ class WorkflowStepInput(Identified, Sink, LoadContents, Labeled): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepInput" def __init__( @@ -21817,7 +21844,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.source = source self.linkMerge = linkMerge self.loadContents = loadContents @@ -22375,6 +22402,7 @@ class WorkflowStepOutput(Identified): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepOutput" def __init__( @@ -22391,7 +22419,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, WorkflowStepOutput): @@ -22587,6 +22615,7 @@ class WorkflowStep(Identified, Labeled, Documented): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStep" def __init__( @@ -22612,7 +22641,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.in_ = in_ @@ -23320,6 +23349,7 @@ class Workflow(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#Workflow" def __init__( @@ -23344,7 +23374,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -24593,6 +24623,7 @@ def save( class ProcessGenerator(Process): + id: str class_uri = "http://commonwl.org/cwltool#ProcessGenerator" def __init__( @@ -24617,7 +24648,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs diff --git a/cwl_utils/parser/cwl_v1_2.py b/cwl_utils/parser/cwl_v1_2.py index 1a02d18..2273e75 100644 --- a/cwl_utils/parser/cwl_v1_2.py +++ b/cwl_utils/parser/cwl_v1_2.py @@ -1162,6 +1162,7 @@ class RecordField(Documented): A field of a record. """ + name: str class_uri = "https://w3id.org/cwl/salad#RecordField" def __init__( @@ -1181,7 +1182,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -1636,6 +1637,7 @@ class EnumSchema(Saveable): """ + name: str class_uri = "https://w3id.org/cwl/salad#EnumSchema" def __init__( @@ -1654,7 +1656,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ @@ -2708,6 +2710,7 @@ def save( class CWLRecordField(RecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CWLRecordField" def __init__( @@ -2727,7 +2730,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ def __eq__(self, other: Any) -> bool: @@ -4569,6 +4572,7 @@ class OutputSchema(IOSchema): class InputRecordField(CWLRecordField, FieldBase, InputFormat, LoadContents): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordField" def __init__( @@ -4594,7 +4598,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -5202,6 +5206,7 @@ def save( class InputRecordSchema(CWLRecordSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputRecordSchema" def __init__( @@ -5226,7 +5231,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, InputRecordSchema): @@ -5580,6 +5585,7 @@ def save( class InputEnumSchema(EnumSchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputEnumSchema" def __init__( @@ -5600,7 +5606,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -5958,6 +5964,7 @@ def save( class InputArraySchema(CWLArraySchema, InputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#InputArraySchema" def __init__( @@ -5982,7 +5989,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, InputArraySchema): @@ -6336,6 +6343,7 @@ def save( class OutputRecordField(CWLRecordField, FieldBase, OutputFormat): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputRecordField" def __init__( @@ -6359,7 +6367,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -6841,6 +6849,7 @@ def save( class OutputRecordSchema(CWLRecordSchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputRecordSchema" def __init__( @@ -6865,7 +6874,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, OutputRecordSchema): @@ -7219,6 +7228,7 @@ def save( class OutputEnumSchema(EnumSchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputEnumSchema" def __init__( @@ -7239,7 +7249,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -7597,6 +7607,7 @@ def save( class OutputArraySchema(CWLArraySchema, OutputSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#OutputArraySchema" def __init__( @@ -7621,7 +7632,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, OutputArraySchema): @@ -10014,6 +10025,7 @@ def save( class CommandInputRecordField(InputRecordField, CommandLineBindable): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordField" def __init__( @@ -10040,7 +10052,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -10709,6 +10721,7 @@ def save( class CommandInputRecordSchema( InputRecordSchema, CommandInputSchema, CommandLineBindable ): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputRecordSchema" def __init__( @@ -10734,7 +10747,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.inputBinding = inputBinding def __eq__(self, other: Any) -> bool: @@ -11154,6 +11167,7 @@ def save( class CommandInputEnumSchema(InputEnumSchema, CommandInputSchema, CommandLineBindable): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputEnumSchema" def __init__( @@ -11175,7 +11189,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -11601,6 +11615,7 @@ def save( class CommandInputArraySchema( InputArraySchema, CommandInputSchema, CommandLineBindable ): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandInputArraySchema" def __init__( @@ -11626,7 +11641,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.inputBinding = inputBinding def __eq__(self, other: Any) -> bool: @@ -12039,6 +12054,7 @@ def save( class CommandOutputRecordField(OutputRecordField): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordField" def __init__( @@ -12063,7 +12079,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.type_ = type_ self.label = label self.secondaryFiles = secondaryFiles @@ -12612,6 +12628,7 @@ def save( class CommandOutputRecordSchema(OutputRecordSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputRecordSchema" def __init__( @@ -12636,7 +12653,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandOutputRecordSchema): @@ -12990,6 +13007,7 @@ def save( class CommandOutputEnumSchema(OutputEnumSchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputEnumSchema" def __init__( @@ -13010,7 +13028,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) self.symbols = symbols self.type_ = type_ self.label = label @@ -13368,6 +13386,7 @@ def save( class CommandOutputArraySchema(OutputArraySchema): + name: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputArraySchema" def __init__( @@ -13392,7 +13411,7 @@ def __init__( self.type_ = type_ self.label = label self.doc = doc - self.name = name + self.name = name if name is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, CommandOutputArraySchema): @@ -13750,6 +13769,7 @@ class CommandInputParameter(InputParameter): An input parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandInputParameter" def __init__( @@ -13780,7 +13800,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.loadContents = loadContents self.loadListing = loadListing @@ -14504,6 +14524,7 @@ class CommandOutputParameter(OutputParameter): An output parameter for a CommandLineTool. """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandOutputParameter" def __init__( @@ -14531,7 +14552,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.type_ = type_ self.outputBinding = outputBinding @@ -15082,6 +15103,7 @@ class CommandLineTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#CommandLineTool" def __init__( @@ -15114,7 +15136,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -19280,6 +19302,7 @@ def save( class ExpressionToolOutputParameter(OutputParameter): + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionToolOutputParameter" def __init__( @@ -19306,7 +19329,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.type_ = type_ @@ -19785,6 +19808,7 @@ def save( class WorkflowInputParameter(InputParameter): + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowInputParameter" def __init__( @@ -19815,7 +19839,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.loadContents = loadContents self.loadListing = loadListing @@ -20546,6 +20570,7 @@ class ExpressionTool(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#ExpressionTool" def __init__( @@ -20571,7 +20596,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -21264,6 +21289,7 @@ class WorkflowOutputParameter(OutputParameter): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowOutputParameter" def __init__( @@ -21293,7 +21319,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.outputSource = outputSource self.linkMerge = linkMerge @@ -22063,6 +22089,7 @@ class WorkflowStepInput(Identified, Sink, LoadContents, Labeled): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepInput" def __init__( @@ -22087,7 +22114,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.source = source self.linkMerge = linkMerge self.pickValue = pickValue @@ -22701,6 +22728,7 @@ class WorkflowStepOutput(Identified): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStepOutput" def __init__( @@ -22717,7 +22745,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) def __eq__(self, other: Any) -> bool: if isinstance(other, WorkflowStepOutput): @@ -22937,6 +22965,7 @@ class WorkflowStep(Identified, Labeled, Documented): """ + id: str class_uri = "https://w3id.org/cwl/cwl#WorkflowStep" def __init__( @@ -22963,7 +22992,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.in_ = in_ @@ -23733,6 +23762,7 @@ class Workflow(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#Workflow" def __init__( @@ -23758,7 +23788,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -24902,6 +24932,7 @@ class OperationInputParameter(InputParameter): """ + id: str class_uri = "https://w3id.org/cwl/cwl#OperationInputParameter" def __init__( @@ -24931,7 +24962,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.loadContents = loadContents self.loadListing = loadListing @@ -25597,6 +25628,7 @@ class OperationOutputParameter(OutputParameter): """ + id: str class_uri = "https://w3id.org/cwl/cwl#OperationOutputParameter" def __init__( @@ -25623,7 +25655,7 @@ def __init__( self.secondaryFiles = secondaryFiles self.streamable = streamable self.doc = doc - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.format = format self.type_ = type_ @@ -26113,6 +26145,7 @@ class Operation(Process): """ + id: str class_uri = "https://w3id.org/cwl/cwl#Operation" def __init__( @@ -26137,7 +26170,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -26924,6 +26957,7 @@ def save( class ProcessGenerator(Process): + id: str class_uri = "http://commonwl.org/cwltool#ProcessGenerator" def __init__( @@ -26949,7 +26983,7 @@ def __init__( self.loadingOptions = loadingOptions else: self.loadingOptions = LoadingOptions() - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.label = label self.doc = doc self.inputs = inputs @@ -28173,6 +28207,7 @@ def save( class LoopInput(Saveable): + id: str class_uri = "http://commonwl.org/cwltool#LoopInput" def __init__( @@ -28195,7 +28230,7 @@ def __init__( else: self.loadingOptions = LoadingOptions() self.default = default - self.id = id + self.id = id if id is not None else "_:" + str(_uuid__.uuid4()) self.linkMerge = linkMerge self.loopSource = loopSource self.pickValue = pickValue