config¶
This submodule defines constant values and definitions from the OPTIMADE specification for use by the validator.
The VALIDATOR_CONFIG
object can be imported and modified before calling the valiator inside a Python script to customise the hardcoded values.
ValidatorConfig (BaseSettings)
pydantic-model
¶
This class stores validator config parameters in a way that can be easily modified for testing niche implementations. Many of these fields are determined by the specification directly, but it may be desirable to modify them in certain cases.
entry_properties: Dict[str, Dict[str, Set[str]]]
pydantic-field
¶
Nested dictionary of endpoints -> support level -> list of field names. This field will be deprecated once the machinery to read the support levels of fields from their models directly is implemented.
exclusive_operators: Dict[optimade.models.optimade_json.DataType, Set[str]]
pydantic-field
¶
Dictionary mapping OPTIMADE DataType
s to a list of operators that are 'exclusive', i.e. those that should not return entries with the matching value from the filter.
inclusive_operators: Dict[optimade.models.optimade_json.DataType, Set[str]]
pydantic-field
¶
Dictionary mapping OPTIMADE DataType
s to a list of operators that are 'inclusive', i.e. those that should return entries with the matching value from the filter.
info_endpoint: str
pydantic-field
¶
The name of the info endpoint
links_endpoint: str
pydantic-field
¶
The name of the links endpoint
non_entry_endpoints: Set[str]
pydantic-field
¶
The list specification-mandated endpoint names that do not contain entries
response_classes: Dict[str, Any]
pydantic-field
¶
Dictionary containing the mapping between endpoints and response classes for the main database
response_classes_index: Dict[str, Any]
pydantic-field
¶
Dictionary containing the mapping between endpoints and response classes for the index meta-database
unique_properties: Set[str]
pydantic-field
¶
Fields that should be treated as unique indexes for all endpoints, i.e. fields on which filters should return at most one entry.
versions_endpoint: str
pydantic-field
¶
The name of the versions endpoint