qref.schema_v1
schema_v1 ¶
Pydantic models used for defining V1 schema of Routine.
OPTIONALLY_NAMESPACED_NAME_PATTERN
module-attribute
¶
MULTINAMESPACED_NAME_PATTERN
module-attribute
¶
OPTIONALLY_MULTINAMESPACED_NAME_PATTERN
module-attribute
¶
CONNECTION_PATTERN
module-attribute
¶
CONNECTION_PATTERN = f'{OPTIONALLY_MULTINAMESPACED_NAME_PATTERN} -> {OPTIONALLY_MULTINAMESPACED_NAME_PATTERN}'
CONNECTION_SCHEMA
module-attribute
¶
CONNECTION_SCHEMA = {'type': 'array', 'items': {'anyOf': [{'$ref': '#/$defs/Connection'}, {'pattern': f'^{CONNECTION_PATTERN}$', 'type': 'string'}]}, 'title': 'Connections', 'type': 'array'}
NamedList ¶
PortV1 ¶
Bases: BaseModel
Description of Port in V1 schema
ConnectionV1 ¶
ResourceV1 ¶
Bases: BaseModel
Description of Resource in V1 schema
ParamLinkV1 ¶
ConstantSequenceV1 ¶
ArithmeticSequenceV1 ¶
Bases: BaseModel
Description of an arithmetic sequence in a V1 Schema.
In an arithmetic sequence we start from initial_term repetitions of an element,
and in each iteration we increase it by difference.
GeometricSequenceV1 ¶
ClosedFormSequenceV1 ¶
Bases: BaseModel
Description of a sequence with known closed-form for a sum or product in a V1 Schema.
If sum/prod are specified, they can be used to calculate these values for a given sequence.
Expressions for sum/prod should use num_terms_symbol to represent the total number of terms.
CustomSequenceV1 ¶
Bases: BaseModel
Description of a custom sequence in a V1 Schema.
For sequences which do not fall into categories defined in other classes, one can use a custom representation.
It is an explicit representation of a sequence where term_expression defines the expression for each term
in the sequence and iterator_symbol is used to represent number of the iteration.
RepetitionV1 ¶
RoutineV1 ¶
Bases: BaseModel
Description of Routine in V1 schema.
Note
This is NOT a top-level object in the schema. Instead, RoutineV1 is wrapped in SchemaV1.
children
class-attribute
instance-attribute
¶
ports
class-attribute
instance-attribute
¶
resources
class-attribute
instance-attribute
¶
connections
class-attribute
instance-attribute
¶
input_params
class-attribute
instance-attribute
¶
linked_params
class-attribute
instance-attribute
¶
model_config
class-attribute
instance-attribute
¶
generate_schema_v1 ¶
Generate Routine schema V1.
The schema is generated from DocumentRootV1 model, and then enriched with additional fields "title" and "$schema".