Import a module on the cache directory for modules and extract a class from it.
(class_name, module_path)
| 157 | |
| 158 | |
| 159 | def get_class_in_module(class_name, module_path): |
| 160 | """ |
| 161 | Import a module on the cache directory for modules and extract a class from it. |
| 162 | """ |
| 163 | module_path = module_path.replace(os.path.sep, ".") |
| 164 | module = importlib.import_module(module_path) |
| 165 | |
| 166 | if class_name is None: |
| 167 | return find_pipeline_class(module) |
| 168 | return getattr(module, class_name) |
| 169 | |
| 170 | |
| 171 | def find_pipeline_class(loaded_module): |
no test coverage detected