(spec: str)
| 12 | |
| 13 | |
| 14 | def get_environment_class(spec: str) -> type[Environment]: |
| 15 | full_path = _ENVIRONMENT_MAPPING.get(spec, spec) |
| 16 | module_name, class_name = full_path.rsplit(".", 1) |
| 17 | module = importlib.import_module(module_name) |
| 18 | return getattr(module, class_name) |
| 19 | |
| 20 | |
| 21 | def get_environment(config: dict, *, default_type: str = "local_workspace") -> Environment: |