MCPcopy Index your code
hub / github.com/pydata/xarray / build_engines

Function build_engines

xarray/backends/plugins.py:103–113  ·  view source on GitHub ↗
(entrypoints: EntryPoints)

Source from the content-addressed store, hash-verified

101
102
103def build_engines(entrypoints: EntryPoints) -> dict[str, BackendEntrypoint]:
104 backend_entrypoints: dict[str, type[BackendEntrypoint]] = {}
105 for backend_name, (module_name, backend) in BACKEND_ENTRYPOINTS.items():
106 if module_name is None or module_available(module_name):
107 backend_entrypoints[backend_name] = backend
108 entrypoints_unique = remove_duplicates(entrypoints)
109 external_backend_entrypoints = backends_dict_from_pkg(entrypoints_unique)
110 backend_entrypoints.update(external_backend_entrypoints)
111 backend_entrypoints = sort_backends(backend_entrypoints)
112 set_missing_parameters(backend_entrypoints)
113 return {name: backend() for name, backend in backend_entrypoints.items()}
114
115
116@functools.lru_cache(maxsize=1)

Callers 1

list_enginesFunction · 0.85

Calls 8

module_availableFunction · 0.90
remove_duplicatesFunction · 0.85
backends_dict_from_pkgFunction · 0.85
sort_backendsFunction · 0.85
set_missing_parametersFunction · 0.85
backendFunction · 0.85
itemsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…