def _get_absolute_path(self, path: str) -> str: """Returns the absolute path of 'path' in relation to the configured root_dir. Note: This version of `get_absolute_path` is used over the version in util/path.py because 'path' will have a leading `/` and therefore be considered absolute already when, within this handler, it should always be a path relative to root_dir. """ root_dir = get_expanded_path(self.settings["server_root_dir"]) if path[0] == "/": # if path starts with a slash, use the follow characters so join can be performed path = path[1:] absolute_path = os.path.normpath(os.path.join(root_dir, path)) return absolute_path
def __init__(self, **kwargs): super(PipelineProcessorManager, self).__init__() self.root_dir = get_expanded_path(kwargs.get('root_dir')) self._registry = PipelineProcessorRegistry.instance() # Register all known processors based on entrypoint configuration for processor in entrypoints.get_group_all('elyra.pipeline.processors'): try: # instantiate an actual instance of the processor processor_instance = processor.load()(self.root_dir, parent=self) # Load an instance self.log.info('Registering processor "{}" with type -> {}'.format(processor, processor_instance.type)) self._registry.add_processor(processor_instance) except Exception as err: # log and ignore initialization errors self.log.error('Error registering processor "{}" - {}'.format(processor, err))
def __init__(self, **kwargs): super().__init__(**kwargs) self.root_dir = get_expanded_path(kwargs.get("root_dir")) # Register all known processors based on entrypoint configuration for processor in entrypoints.get_group_all("elyra.pipeline.processors"): try: # instantiate an actual instance of the processor processor_instance = processor.load()(self.root_dir, parent=kwargs.get("parent")) # Load an instance self.log.info( f"Registering {processor.name} processor " f'"{processor.module_name}.{processor.object_name}"...' ) self.add_processor(processor_instance) except Exception as err: # log and ignore initialization errors self.log.error( f"Error registering {processor.name} processor " f'"{processor.module_name}.{processor.object_name}" - {err}' )
def __init__(self, **kwargs): super().__init__(**kwargs) self.root_dir = get_expanded_path(kwargs.get("root_dir"))
def __init__(self, **kwargs): super().__init__(**kwargs) self.root_dir = get_expanded_path(kwargs.get("root_dir")) self._registry = PipelineProcessorRegistry.instance()