Best Python code snippet using yandex-tank
config_service.py
Source:config_service.py
...73 plugin.use_profile(plugin_ref.current_profile_name)74 return plugin75 except StopIteration as stop:76 raise PluginMissingError(plugin_ref.name) from stop77 def get_plugins_of_type(self, plugin_type):78 return self.project.meltano.plugins[plugin_type]79 def get_extractors(self):80 return self.get_plugins_of_type(PluginType.EXTRACTORS)81 def get_loaders(self):82 return self.get_plugins_of_type(PluginType.LOADERS)83 def get_transforms(self):84 return self.get_plugins_of_type(PluginType.TRANSFORMS)85 def get_models(self):86 return self.get_plugins_of_type(PluginType.MODELS)87 def get_dashboards(self):88 return self.get_plugins_of_type(PluginType.DASHBOARDS)89 def get_transformers(self):90 return self.get_plugins_of_type(PluginType.TRANSFORMERS)91 def get_files(self):92 return self.get_plugins_of_type(PluginType.FILES)93 def update_plugin(self, plugin: PluginInstall):94 with self.project.meltano_update() as meltano:95 # find the proper plugin to update96 idx, outdated = next(97 (i, it)98 for i, it in enumerate(meltano.plugins[plugin.type])99 if it == plugin100 )101 meltano.plugins[plugin.type][idx] = plugin102 return outdated103 def plugins(self) -> Iterable[PluginInstall]:104 yield from (105 plugin106 for plugin_type in PluginType...
management.py
Source:management.py
...13 spec = spec_from_file_location(module_name, module_path)14 mod = module_from_spec(spec)15 sys.modules[module_name] = mod16 spec.loader.exec_module(mod) # Plugins are registered when class definitions are executed17def get_plugins_of_type(cls):18 """ Returns all plugins of a given class """19 return [x for x in get_plugins() if issubclass(x, cls)]20def get_plugins():21 """ A list of all loaded plugins """22 return PluginBase._plugins_by_name.values()23def get_visualization_plugins():24 """ A list of all visualization plugins """25 return get_plugins_of_type(VisualizationPlugin)26def get_3d_visualization_plugins():27 """ A list of all 3D visualization plugins """28 return get_plugins_of_type(VisualizationPlugin3D)29def get_2d_visualization_plugins():30 """ A list of all 2D visualization plugins """31 return get_plugins_of_type(VisualizationPlugin2D)32def get_data_plugins():33 """ A list of all data plugins """34 return get_plugins_of_type(DataPlugin)35def get_array_data_plugins():36 """ A list of all array data plugins """37 return get_plugins_of_type(ArrayDataPlugin)38def get_raster_data_plugins():39 """ A list of all raster data plugins """40 return get_plugins_of_type(RasterDataPlugin)41def get_feature_data_plugins():42 """ A list of all feature data plugins """...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!