qref.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
Bases: list[T]
Source code in src/qref/schema_v1.py
__get_pydantic_core_schema__
classmethod
PortV1
Bases: BaseModel
Description of Port in V1 schema
Source code in src/qref/schema_v1.py
ConnectionV1
Bases: BaseModel
Description of Connection in V1 schema
Source code in src/qref/schema_v1.py
ResourceV1
Bases: BaseModel
Description of Resource in V1 schema
Source code in src/qref/schema_v1.py
ParamLinkV1
Bases: BaseModel
Description of Parameter link in V1 schema
Source code in src/qref/schema_v1.py
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.
Source code in src/qref/schema_v1.py
children
class-attribute
instance-attribute
ports
class-attribute
instance-attribute
resources
class-attribute
instance-attribute
connections
class-attribute
instance-attribute
connections: Annotated[
list[Annotated[ConnectionV1, _connection_parser]],
_source_sorter,
] = Field(default_factory=list)
input_params
class-attribute
instance-attribute
local_variables
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".