perun.monitoring.application ============================ .. py:module:: perun.monitoring.application .. autoapi-nested-parse:: Application module. Attributes ---------- .. autoapisummary:: perun.monitoring.application.log Classes ------- .. autoapisummary:: perun.monitoring.application.Application Module Contents --------------- .. py:data:: log .. py:class:: Application(app: Union[pathlib.Path, Callable, str], config: configparser.ConfigParser, is_binary: bool = False, args: tuple = (), kwargs: Dict = {}) Represents an application to be executed. Parameters ---------- app : Union[Path, Callable] The application to be executed. It can be either a file path or a callable object. config : ConfigParser The configuration object containing application settings. args : tuple, optional Positional arguments to be passed to the application (default is an empty tuple). kwargs : Dict, optional Keyword arguments to be passed to the application (default is an empty dictionary). Attributes ---------- name : str The name of the application. args : tuple The positional arguments to be passed to the application. kwargs : Dict The keyword arguments to be passed to the application. Methods ------- run() Executes the application. .. py:attribute:: _app .. py:attribute:: _name .. py:attribute:: _args :value: () .. py:attribute:: _kwargs .. py:attribute:: _is_binary :value: False .. py:property:: name Return the application name. .. py:property:: args Return the application positional arguments. .. py:property:: kwargs Return the application keyword arguments. .. py:property:: is_binary Return the application keyword arguments. .. py:method:: _setName(config: configparser.ConfigParser) -> str Return the application name based on the configuration and application path. Parameters ---------- config : ConfigParser The configuration object containing application settings. Returns ------- str The application name. .. py:method:: _cleanup() .. py:method:: run() -> Any Execute the application. If callable, returns the function result. Raises ------ ValueError If the application is not found. .. py:method:: __str__() Return the application name. .. py:method:: __repr__() Return the application name.