hydra.error.pg module
Error types for property graph validation.
- class hydra.error.pg.InvalidEdgeError
Bases:
objectInvalidEdgeErrorId | InvalidEdgeErrorInVertexLabel | InvalidEdgeErrorInVertexNotFound | InvalidEdgeErrorLabel | InvalidEdgeErrorOutVertexLabel | InvalidEdgeErrorOutVertexNotFound | InvalidEdgeErrorProperty
- ID = Name(value='id')
- IN_VERTEX_LABEL = Name(value='inVertexLabel')
- IN_VERTEX_NOT_FOUND = Name(value='inVertexNotFound')
- LABEL = Name(value='label')
- OUT_VERTEX_LABEL = Name(value='outVertexLabel')
- OUT_VERTEX_NOT_FOUND = Name(value='outVertexNotFound')
- PROPERTY = Name(value='property')
- TYPE_ = Name(value='hydra.error.pg.InvalidEdgeError')
- class hydra.error.pg.InvalidEdgeErrorId(value: T)
Bases:
Node[InvalidValueError]The edge id value is invalid
- class hydra.error.pg.InvalidEdgeErrorInVertexLabel(value: T)
Bases:
Node[WrongVertexLabelError]The in-vertex has the wrong label
- class hydra.error.pg.InvalidEdgeErrorInVertexNotFound
Bases:
objectThe in-vertex does not exist in the graph
- class hydra.error.pg.InvalidEdgeErrorLabel(value: T)
Bases:
Node[NoSuchEdgeLabelError]The edge label does not exist in the schema
- class hydra.error.pg.InvalidEdgeErrorOutVertexLabel(value: T)
Bases:
Node[WrongVertexLabelError]The out-vertex has the wrong label
- class hydra.error.pg.InvalidEdgeErrorOutVertexNotFound
Bases:
objectThe out-vertex does not exist in the graph
- class hydra.error.pg.InvalidEdgeErrorProperty(value: T)
Bases:
Node[InvalidElementPropertyError]A property of the edge is invalid
- class hydra.error.pg.InvalidElementPropertyError(key: Annotated[PropertyKey, 'The key of the invalid property'], error: Annotated[InvalidPropertyError, 'The specific error'])
Bases:
objectAn invalid property on a vertex or edge, identified by its key.
- class Builder(_key: 'hydra.pg.model.PropertyKey' = None, _error: 'InvalidPropertyError' = None)
Bases:
object- build()
- error(error)
- key(key)
- ERROR = Name(value='error')
- KEY = Name(value='key')
- TYPE_ = Name(value='hydra.error.pg.InvalidElementPropertyError')
- static builder()
- error: Annotated[InvalidPropertyError, 'The specific error']
- key: Annotated[PropertyKey, 'The key of the invalid property']
- with_error(error)
- with_key(key)
- class hydra.error.pg.InvalidGraphEdgeError(id: Annotated[V, 'The id of the invalid edge'], error: Annotated[InvalidEdgeError, 'The specific error'])
Bases:
Generic[V]An invalid edge within a graph, identified by its id.
- class Builder(_id: 'V' = None, _error: 'InvalidEdgeError' = None)
Bases:
Generic[V]- build()
- error(error)
- id(id)
- ERROR = Name(value='error')
- ID = Name(value='id')
- TYPE_ = Name(value='hydra.error.pg.InvalidGraphEdgeError')
- static builder()
- error: Annotated[InvalidEdgeError, 'The specific error']
- id: Annotated[V, 'The id of the invalid edge']
- with_error(error)
- with_id(id)
- class hydra.error.pg.InvalidGraphError
Bases:
objectInvalidGraphErrorEdge[V] | InvalidGraphErrorVertex[V]
- EDGE = Name(value='edge')
- TYPE_ = Name(value='hydra.error.pg.InvalidGraphError')
- VERTEX = Name(value='vertex')
- class hydra.error.pg.InvalidGraphErrorEdge(value: T)
Bases:
Node[InvalidGraphEdgeError[V]]An edge in the graph is invalid
- class hydra.error.pg.InvalidGraphErrorVertex(value: T)
Bases:
Node[InvalidGraphVertexError[V]]A vertex in the graph is invalid
- class hydra.error.pg.InvalidGraphVertexError(id: Annotated[V, 'The id of the invalid vertex'], error: Annotated[InvalidVertexError, 'The specific error'])
Bases:
Generic[V]An invalid vertex within a graph, identified by its id.
- class Builder(_id: 'V' = None, _error: 'InvalidVertexError' = None)
Bases:
Generic[V]- build()
- error(error)
- id(id)
- ERROR = Name(value='error')
- ID = Name(value='id')
- TYPE_ = Name(value='hydra.error.pg.InvalidGraphVertexError')
- static builder()
- error: Annotated[InvalidVertexError, 'The specific error']
- id: Annotated[V, 'The id of the invalid vertex']
- with_error(error)
- with_id(id)
- class hydra.error.pg.InvalidPropertyError
Bases:
objectInvalidPropertyErrorInvalidValue | InvalidPropertyErrorMissingRequired | InvalidPropertyErrorUnexpectedKey
- INVALID_VALUE = Name(value='invalidValue')
- MISSING_REQUIRED = Name(value='missingRequired')
- TYPE_ = Name(value='hydra.error.pg.InvalidPropertyError')
- UNEXPECTED_KEY = Name(value='unexpectedKey')
- class hydra.error.pg.InvalidPropertyErrorInvalidValue(value: T)
Bases:
Node[InvalidValueError]The property value failed type validation
- class hydra.error.pg.InvalidPropertyErrorMissingRequired(value: T)
Bases:
Node[hydra.pg.model.PropertyKey]A required property is missing
- class hydra.error.pg.InvalidPropertyErrorUnexpectedKey(value: T)
Bases:
Node[hydra.pg.model.PropertyKey]A property has an unexpected key not in the schema
- class hydra.error.pg.InvalidValueError(expected_type: Annotated[str, 'The expected type, as a string'], value: Annotated[str, 'The actual value, as a string'])
Bases:
objectAn error indicating that a value does not match the expected type.
- class Builder(_expected_type: 'str' = None, _value: 'str' = None)
Bases:
object- build()
- expected_type(expected_type)
- value(value)
- EXPECTED_TYPE = Name(value='expectedType')
- TYPE_ = Name(value='hydra.error.pg.InvalidValueError')
- VALUE = Name(value='value')
- static builder()
- expected_type: Annotated[str, 'The expected type, as a string']
- value: Annotated[str, 'The actual value, as a string']
- with_expected_type(expected_type)
- with_value(value)
- class hydra.error.pg.InvalidVertexError
Bases:
objectInvalidVertexErrorId | InvalidVertexErrorLabel | InvalidVertexErrorProperty
- ID = Name(value='id')
- LABEL = Name(value='label')
- PROPERTY = Name(value='property')
- TYPE_ = Name(value='hydra.error.pg.InvalidVertexError')
- class hydra.error.pg.InvalidVertexErrorId(value: T)
Bases:
Node[InvalidValueError]The vertex id value is invalid
- class hydra.error.pg.InvalidVertexErrorLabel(value: T)
Bases:
Node[NoSuchVertexLabelError]The vertex label does not exist in the schema
- class hydra.error.pg.InvalidVertexErrorProperty(value: T)
Bases:
Node[InvalidElementPropertyError]A property of the vertex is invalid
- class hydra.error.pg.NoSuchEdgeLabelError(label: Annotated[EdgeLabel, 'The edge label that was not found'])
Bases:
objectAn error indicating that an edge label does not exist in the schema.
- LABEL = Name(value='label')
- TYPE_ = Name(value='hydra.error.pg.NoSuchEdgeLabelError')
- static builder()
- with_label(label)
- class hydra.error.pg.NoSuchVertexLabelError(label: Annotated[VertexLabel, 'The vertex label that was not found'])
Bases:
objectAn error indicating that a vertex label does not exist in the schema.
- LABEL = Name(value='label')
- TYPE_ = Name(value='hydra.error.pg.NoSuchVertexLabelError')
- static builder()
- label: Annotated[VertexLabel, 'The vertex label that was not found']
- with_label(label)
- class hydra.error.pg.WrongVertexLabelError(expected: Annotated[VertexLabel, 'The expected vertex label'], actual: Annotated[VertexLabel, 'The actual vertex label'])
Bases:
objectAn error indicating that a vertex has the wrong label.
- ACTUAL = Name(value='actual')
- class Builder(_expected: 'hydra.pg.model.VertexLabel' = None, _actual: 'hydra.pg.model.VertexLabel' = None)
Bases:
object- actual(actual)
- build()
- expected(expected)
- EXPECTED = Name(value='expected')
- TYPE_ = Name(value='hydra.error.pg.WrongVertexLabelError')
- actual: Annotated[VertexLabel, 'The actual vertex label']
- static builder()
- expected: Annotated[VertexLabel, 'The expected vertex label']
- with_actual(actual)
- with_expected(expected)