88import sys
99import uuid as _uuid__
1010from collections.abc import Collection
11- from mypy_extensions import trait
1211from typing import ClassVar
1312
1413from schema_salad.runtime import (
2322 from typing import Self
2423else:
2524 from typing_extensions import Self
25+
2626import schema_salad.metaschema
2727
2828import copy
3838from schema_salad.exceptions import ValidationException, SchemaSaladException
3939from schema_salad.runtime import LoadingOptions, convert_typing, extract_type, Saveable
4040from schema_salad.sourceline import SourceLine, add_lc_filename
41- from schema_salad.utils import yaml_no_ts
41+ from schema_salad.utils import yaml_no_ts # requires schema-salad v8.2+
4242
4343S = TypeVar("S", bound=Saveable)
4444
@@ -1633,9 +1633,9 @@ def fromDoc(
16331633
16341634 vocab = _vocab | loadingOptions.vocab
16351635 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
1636- raise ValidationException(f"tried `{cls.__name__}` but")
1636+ raise ValidationException(f"tried `{cls.__name__}` but")
16371637 except ValidationException as e:
1638- raise e
1638+ raise e
16391639 location = None
16401640 if "location" in _doc:
16411641 try:
@@ -2377,9 +2377,9 @@ def fromDoc(
23772377
23782378 vocab = _vocab | loadingOptions.vocab
23792379 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
2380- raise ValidationException(f"tried `{cls.__name__}` but")
2380+ raise ValidationException(f"tried `{cls.__name__}` but")
23812381 except ValidationException as e:
2382- raise e
2382+ raise e
23832383 location = None
23842384 if "location" in _doc:
23852385 try:
@@ -2651,12 +2651,10 @@ def save(
26512651 )
26522652
26532653
2654- @trait
26552654class SchemaBase(Saveable):
26562655 pass
26572656
26582657
2659- @trait
26602658class Parameter(SchemaBase):
26612659 """
26622660 Define an input or output parameter to a process.
@@ -2666,22 +2664,18 @@ class Parameter(SchemaBase):
26662664 pass
26672665
26682666
2669- @trait
26702667class InputBinding(Saveable):
26712668 pass
26722669
26732670
2674- @trait
26752671class OutputBinding(Saveable):
26762672 pass
26772673
26782674
2679- @trait
26802675class InputSchema(SchemaBase):
26812676 pass
26822677
26832678
2684- @trait
26852679class OutputSchema(SchemaBase):
26862680 pass
26872681
@@ -6525,7 +6519,6 @@ def save(
65256519 )
65266520
65276521
6528- @trait
65296522class ProcessRequirement(Saveable):
65306523 """
65316524 A process requirement declares a prerequisite that may or must be fulfilled before executing a process. See ```Process.hints`` <#process>`__ and ```Process.requirements`` <#process>`__.
@@ -6537,7 +6530,6 @@ class ProcessRequirement(Saveable):
65376530 pass
65386531
65396532
6540- @trait
65416533class Process(Saveable):
65426534 """
65436535 The base executable type in CWL is the ``Process`` object defined by the document. Note that the ``Process`` object is abstract and cannot be directly executed.
@@ -6609,9 +6601,9 @@ def fromDoc(
66096601
66106602 vocab = _vocab | loadingOptions.vocab
66116603 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
6612- raise ValidationException(f"tried `{cls.__name__}` but")
6604+ raise ValidationException(f"tried `{cls.__name__}` but")
66136605 except ValidationException as e:
6614- raise e
6606+ raise e
66156607 expressionLib = None
66166608 if "expressionLib" in _doc:
66176609 try:
@@ -6789,9 +6781,9 @@ def fromDoc(
67896781
67906782 vocab = _vocab | loadingOptions.vocab
67916783 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
6792- raise ValidationException(f"tried `{cls.__name__}` but")
6784+ raise ValidationException(f"tried `{cls.__name__}` but")
67936785 except ValidationException as e:
6794- raise e
6786+ raise e
67956787 try:
67966788 if _doc.get("types") is None:
67976789 raise ValidationException("missing required field `types`", None, [])
@@ -12077,9 +12069,9 @@ def fromDoc(
1207712069
1207812070 vocab = _vocab | loadingOptions.vocab
1207912071 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
12080- raise ValidationException(f"tried `{cls.__name__}` but")
12072+ raise ValidationException(f"tried `{cls.__name__}` but")
1208112073 except ValidationException as e:
12082- raise e
12074+ raise e
1208312075 try:
1208412076 if _doc.get("inputs") is None:
1208512077 raise ValidationException("missing required field `inputs`", None, [])
@@ -13066,9 +13058,9 @@ def fromDoc(
1306613058
1306713059 vocab = _vocab | loadingOptions.vocab
1306813060 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
13069- raise ValidationException(f"tried `{cls.__name__}` but")
13061+ raise ValidationException(f"tried `{cls.__name__}` but")
1307013062 except ValidationException as e:
13071- raise e
13063+ raise e
1307213064 dockerPull = None
1307313065 if "dockerPull" in _doc:
1307413066 try:
@@ -13531,9 +13523,9 @@ def fromDoc(
1353113523
1353213524 vocab = _vocab | loadingOptions.vocab
1353313525 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
13534- raise ValidationException(f"tried `{cls.__name__}` but")
13526+ raise ValidationException(f"tried `{cls.__name__}` but")
1353513527 except ValidationException as e:
13536- raise e
13528+ raise e
1353713529 try:
1353813530 if _doc.get("packages") is None:
1353913531 raise ValidationException("missing required field `packages`", None, [])
@@ -14230,9 +14222,9 @@ def fromDoc(
1423014222
1423114223 vocab = _vocab | loadingOptions.vocab
1423214224 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
14233- raise ValidationException(f"tried `{cls.__name__}` but")
14225+ raise ValidationException(f"tried `{cls.__name__}` but")
1423414226 except ValidationException as e:
14235- raise e
14227+ raise e
1423614228 try:
1423714229 if _doc.get("listing") is None:
1423814230 raise ValidationException("missing required field `listing`", None, [])
@@ -14408,9 +14400,9 @@ def fromDoc(
1440814400
1440914401 vocab = _vocab | loadingOptions.vocab
1441014402 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
14411- raise ValidationException(f"tried `{cls.__name__}` but")
14403+ raise ValidationException(f"tried `{cls.__name__}` but")
1441214404 except ValidationException as e:
14413- raise e
14405+ raise e
1441414406 try:
1441514407 if _doc.get("envDef") is None:
1441614408 raise ValidationException("missing required field `envDef`", None, [])
@@ -14584,9 +14576,9 @@ def fromDoc(
1458414576
1458514577 vocab = _vocab | loadingOptions.vocab
1458614578 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
14587- raise ValidationException(f"tried `{cls.__name__}` but")
14579+ raise ValidationException(f"tried `{cls.__name__}` but")
1458814580 except ValidationException as e:
14589- raise e
14581+ raise e
1459014582 extension_fields: MutableMapping[str, Any] = {}
1459114583 for k in _doc.keys():
1459214584 if k not in cls.attrs:
@@ -14755,9 +14747,9 @@ def fromDoc(
1475514747
1475614748 vocab = _vocab | loadingOptions.vocab
1475714749 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
14758- raise ValidationException(f"tried `{cls.__name__}` but")
14750+ raise ValidationException(f"tried `{cls.__name__}` but")
1475914751 except ValidationException as e:
14760- raise e
14752+ raise e
1476114753 coresMin = None
1476214754 if "coresMin" in _doc:
1476314755 try:
@@ -15990,9 +15982,9 @@ def fromDoc(
1599015982
1599115983 vocab = _vocab | loadingOptions.vocab
1599215984 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
15993- raise ValidationException(f"tried `{cls.__name__}` but")
15985+ raise ValidationException(f"tried `{cls.__name__}` but")
1599415986 except ValidationException as e:
15995- raise e
15987+ raise e
1599615988 try:
1599715989 if _doc.get("inputs") is None:
1599815990 raise ValidationException("missing required field `inputs`", None, [])
@@ -17188,7 +17180,6 @@ def save(
1718817180 )
1718917181
1719017182
17191- @trait
1719217183class Sink(Saveable):
1719317184 pass
1719417185
@@ -18651,9 +18642,9 @@ def fromDoc(
1865118642
1865218643 vocab = _vocab | loadingOptions.vocab
1865318644 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
18654- raise ValidationException(f"tried `{cls.__name__}` but")
18645+ raise ValidationException(f"tried `{cls.__name__}` but")
1865518646 except ValidationException as e:
18656- raise e
18647+ raise e
1865718648 try:
1865818649 if _doc.get("inputs") is None:
1865918650 raise ValidationException("missing required field `inputs`", None, [])
@@ -19213,9 +19204,9 @@ def fromDoc(
1921319204
1921419205 vocab = _vocab | loadingOptions.vocab
1921519206 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
19216- raise ValidationException(f"tried `{cls.__name__}` but")
19207+ raise ValidationException(f"tried `{cls.__name__}` but")
1921719208 except ValidationException as e:
19218- raise e
19209+ raise e
1921919210 extension_fields: MutableMapping[str, Any] = {}
1922019211 for k in _doc.keys():
1922119212 if k not in cls.attrs:
@@ -19334,9 +19325,9 @@ def fromDoc(
1933419325
1933519326 vocab = _vocab | loadingOptions.vocab
1933619327 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
19337- raise ValidationException(f"tried `{cls.__name__}` but")
19328+ raise ValidationException(f"tried `{cls.__name__}` but")
1933819329 except ValidationException as e:
19339- raise e
19330+ raise e
1934019331 extension_fields: MutableMapping[str, Any] = {}
1934119332 for k in _doc.keys():
1934219333 if k not in cls.attrs:
@@ -19455,9 +19446,9 @@ def fromDoc(
1945519446
1945619447 vocab = _vocab | loadingOptions.vocab
1945719448 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
19458- raise ValidationException(f"tried `{cls.__name__}` but")
19449+ raise ValidationException(f"tried `{cls.__name__}` but")
1945919450 except ValidationException as e:
19460- raise e
19451+ raise e
1946119452 extension_fields: MutableMapping[str, Any] = {}
1946219453 for k in _doc.keys():
1946319454 if k not in cls.attrs:
@@ -19576,9 +19567,9 @@ def fromDoc(
1957619567
1957719568 vocab = _vocab | loadingOptions.vocab
1957819569 if class_ not in (cls.__name__, vocab.get(cls.__name__)):
19579- raise ValidationException(f"tried `{cls.__name__}` but")
19570+ raise ValidationException(f"tried `{cls.__name__}` but")
1958019571 except ValidationException as e:
19581- raise e
19572+ raise e
1958219573 extension_fields: MutableMapping[str, Any] = {}
1958319574 for k in _doc.keys():
1958419575 if k not in cls.attrs:
0 commit comments