This submodule implements the possible warnings that can be omitted by an OPTIMADE API.
Bases: OptimadeWarning
A field or value used in the request is not recognised by this implementation.
Source code in optimade/warnings.py52
53 | class FieldValueNotRecognized(OptimadeWarning):
"""A field or value used in the request is not recognised by this implementation."""
|
Bases: OptimadeWarning
A warning that is specific to a local implementation of the OPTIMADE API and should not appear in the server log or response.
Source code in optimade/warnings.py46
47
48
49 | class LocalOptimadeWarning(OptimadeWarning):
"""A warning that is specific to a local implementation of the OPTIMADE API
and should not appear in the server log or response.
"""
|
Bases: LocalOptimadeWarning
A field was provided with a null value when a related field was provided with a value.
Source code in optimade/warnings.py64
65
66 | class MissingExpectedField(LocalOptimadeWarning):
"""A field was provided with a null value when a related field was provided
with a value."""
|
Bases: Warning
Base Warning for the optimade package
Source code in optimade/warnings.py18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | class OptimadeWarning(Warning):
"""Base Warning for the `optimade` package"""
def __init__(
self, detail: str | None = None, title: str | None = None, *args
) -> None:
detail = detail if detail else self.__doc__
super().__init__(detail, *args)
self.detail = detail
self.title = title if title else self.__class__.__name__
def __repr__(self) -> str:
attrs = {"detail": self.detail, "title": self.title}
return "<{:s}({:s})>".format(
self.__class__.__name__,
" ".join(
[
f"{attr}={value!r}"
for attr, value in attrs.items()
if value is not None
]
),
)
def __str__(self) -> str:
return self.detail if self.detail is not None else ""
|
Bases: OptimadeWarning
A query parameter is not used in this request.
Source code in optimade/warnings.py60
61 | class QueryParamNotUsed(OptimadeWarning):
"""A query parameter is not used in this request."""
|
Bases: OptimadeWarning
A timestamp has been used in a filter that contains microseconds and is thus not RFC 3339 compliant. This may cause undefined behaviour in the query results.
Source code in optimade/warnings.py69
70
71
72
73 | class TimestampNotRFCCompliant(OptimadeWarning):
"""A timestamp has been used in a filter that contains microseconds and is thus not
RFC 3339 compliant. This may cause undefined behaviour in the query results.
"""
|
Bases: OptimadeWarning
A field or query parameter has too many values to be handled by this implementation.
Source code in optimade/warnings.py56
57 | class TooManyValues(OptimadeWarning):
"""A field or query parameter has too many values to be handled by this implementation."""
|
Bases: OptimadeWarning
A provider-specific property has been requested via response_fields or as in a filter that is not recognised by this implementation.
Source code in optimade/warnings.py76
77
78
79
80 | class UnknownProviderProperty(OptimadeWarning):
"""A provider-specific property has been requested via `response_fields` or as in a `filter` that is not
recognised by this implementation.
"""
|
Bases: OptimadeWarning
A provider-specific query parameter has been requested in the query with a prefix not recognised by this implementation.
Source code in optimade/warnings.py83
84
85
86
87 | class UnknownProviderQueryParameter(OptimadeWarning):
"""A provider-specific query parameter has been requested in the query with a prefix not
recognised by this implementation.
"""
|