snapred.meta package

Subpackages

Submodules

snapred.meta.Callback module

snapred.meta.Callback.callback(clazz)
snapred.meta.Callback.delegate(cls, attr_name, method_name)

snapred.meta.Config module

class snapred.meta.Config.DeployEnvEnum(value)

Bases: StrEnum

NEXT = 'snapred_next'
PROD = 'snapred_prod'
QA = 'snapred_qa'
snapred.meta.Config.datasearch_directories(instrumentHome: Path) List[str]
snapred.meta.Config.deep_update(mapping: Dict[KeyType, Any], *updating_mappings: Dict[KeyType, Any]) Dict[KeyType, Any]
snapred.meta.Config.fromMantidLoggingLevel(level: str) int
snapred.meta.Config.fromPythonLoggingLevel(level: int | str) str
snapred.meta.Config.isTestEnv() bool

Check if the current environment is a test environment. This is determined by the presence of the “env” environment variable and whether it contains the string “test”.

snapred.meta.Config.merge_dicts(d1, d2)

d2 overwrites values in d1

snapred.meta.redantic module

snapred.meta.redantic.list_from_raw(type_: Any, src: str) List[BaseModel]
snapred.meta.redantic.list_to_raw(baseModelList: List[BaseModel])
snapred.meta.redantic.list_to_raw_pretty(baseModelList: List[BaseModel])
snapred.meta.redantic.parse_file_as(type_: Type[T], path: str | Path) T
snapred.meta.redantic.parse_obj_as(type_: Type[T], obj: Any) T
snapred.meta.redantic.parse_raw_as(type_: Type[T], b: str | bytes) T
snapred.meta.redantic.validate_call(func: callable)
snapred.meta.redantic.write_model(baseModel: BaseModel, path)
snapred.meta.redantic.write_model_list(baseModelList: List[BaseModel], path)
snapred.meta.redantic.write_model_list_pretty(baseModelList: List[BaseModel], path)
snapred.meta.redantic.write_model_pretty(baseModel: BaseModel, path)

Module contents