project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sema4AI_actions | PluginManager | public | 0 | 1 | iter_existing_instances | def iter_existing_instances(self, ep: Union[Type, str]):if isinstance(ep, str):ep = self._name_to_ep[ep]return self._ep_to_context_to_instance[ep].values() | 2 | 4 | 2 | 41 | 0 | 189 | 193 | 189 | self,ep | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 2 | 5 | 2 | ["isinstance", "values"] | 0 | [] | The function (iter_existing_instances) defined within the public class called PluginManager, that inherit another class.The function start at line 189 and ends at 193. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [189.0], and this function return a value. It... |
Sema4AI_actions | PluginManager | public | 0 | 1 | has_instance | def has_instance(self, ep: Union[Type, str], context=None):if isinstance(ep, str):ep_cls = self._name_to_ep.get(ep)if ep_cls is None:return Falsetry:self.get_instance(ep, context)return Trueexcept NotRegisteredError:return False | 4 | 10 | 3 | 60 | 0 | 195 | 205 | 195 | self,ep,context | [] | Returns | {"Assign": 1, "Expr": 1, "If": 2, "Return": 3, "Try": 1} | 3 | 11 | 3 | ["isinstance", "self._name_to_ep.get", "self.get_instance"] | 0 | [] | The function (has_instance) defined within the public class called PluginManager, that inherit another class.The function start at line 195 and ends at 205. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [195.0], and this function return a value. It declares ... |
Sema4AI_actions | PluginManager | public | 0 | 1 | get_instance | def get_instance(self, ep: Union[Type, str], context: Optional[str] = None) -> Any:"""Creates an instance in this plugin manager: Meaning that whenever a new EP is asked inthe same context it'll receive the same instance created previously (and it'll bekept alive in the plugin manager)."""if self.exited:raise Assertion... | 10 | 30 | 3 | 192 | 0 | 210 | 249 | 210 | self,ep,context | [] | Any | {"Assign": 10, "Expr": 1, "If": 6, "Return": 2, "Try": 3} | 7 | 40 | 7 | ["AssertionError", "isinstance", "NotInstanceError", "NotRegisteredError", "len", "self._ep_to_context_to_instance.get", "class_"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tchannel.sync.singleton_py.TChannel.get_instance"] | The function (get_instance) defined within the public class called PluginManager, that inherit another class.The function start at line 210 and ends at 249. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [210.0] and does not return any value. It declares 7.0... |
Sema4AI_actions | PluginManager | public | 0 | 1 | exit | def exit(self):self.exited = Trueself._ep_to_context_to_instance.clear()self._ep_to_impls.clear() | 1 | 4 | 1 | 24 | 0 | 253 | 256 | 253 | self | [] | None | {"Assign": 1, "Expr": 2} | 2 | 4 | 2 | ["self._ep_to_context_to_instance.clear", "self._ep_to_impls.clear"] | 147 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.__main___py.pre_run_main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.utils_py.retreive_... | The function (exit) defined within the public class called PluginManager, that inherit another class.The function start at line 253 and ends at 256. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It... |
Sema4AI_actions | public | public | 0 | 0 | inject.inject.decorator.inject_dec | def inject_dec(*args, **kwargs):pm = kwargs.get("pm")if pm is None:raise AssertionError("pm argument with PluginManager not passed (required for @inject).")for key, val in inject_kwargs.items():if key not in kwargs:if val.__class__ is list:kwargs[key] = pm.get_implementations(val[0])else:kwargs[key] = pm.get_instance(v... | 5 | 13 | 2 | 87 | 0 | 262 | 275 | 262 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (inject.inject.decorator.inject_dec) defined within the public class called public.The function start at line 262 and ends at 275. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [262.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | inject.decorator | def decorator(func):@functools.wraps(func)def inject_dec(*args, **kwargs):pm = kwargs.get("pm")if pm is None:raise AssertionError("pm argument with PluginManager not passed (required for @inject).")for key, val in inject_kwargs.items():if key not in kwargs:if val.__class__ is list:kwargs[key] = pm.get_implementations(v... | 1 | 4 | 1 | 16 | 0 | 260 | 277 | 260 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (inject.decorator) defined within the public class called public.The function start at line 260 and ends at 277. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | inject | def inject(**inject_kwargs):def decorator(func):@functools.wraps(func)def inject_dec(*args, **kwargs):pm = kwargs.get("pm")if pm is None:raise AssertionError("pm argument with PluginManager not passed (required for @inject).")for key, val in inject_kwargs.items():if key not in kwargs:if val.__class__ is list:kwargs[key... | 1 | 3 | 1 | 10 | 1 | 259 | 279 | 259 | **inject_kwargs | ['pm'] | Returns | {"Assign": 3, "For": 1, "If": 3, "Return": 3} | 7 | 21 | 7 | ["kwargs.get", "AssertionError", "inject_kwargs.items", "pm.get_implementations", "pm.get_instance", "func", "functools.wraps"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660789_mahmoud_clastic.clastic.meta_py.MetaApplication.get_main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660789_mahmoud_clastic.clastic.meta_py.MetaApplication.render_main_page_html", "_.content.gdrive.MyDr... | The function (inject) defined within the public class called public.The function start at line 259 and ends at 279. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 7.0 functions, It has 7.0 functions called ins... |
Sema4AI_actions | public | public | 0 | 0 | is_secret_subclass | def is_secret_subclass(cls: type) -> bool:try:return issubclass(cls, Secret)except TypeError:# This can happen if the first param is not a class# -- this is the case when using `Oauth2Secret[...]`return False | 2 | 5 | 1 | 23 | 0 | 8 | 14 | 8 | cls | [] | bool | {"Return": 2, "Try": 1} | 1 | 7 | 1 | ["issubclass"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._managed_parameters_py.ManagedParameterHeuristicSecret.create_managed_param", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.s... | The function (is_secret_subclass) defined within the public class called public.The function start at line 8 and ends at 14. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
Sema4AI_actions | public | public | 0 | 0 | is_oauth2_secret_subclass | def is_oauth2_secret_subclass(cls: type) -> bool:from typing import get_origintry:# Case where we have the parametrized version of the class# i.e.: OAuth2Secret[Literal['google'], ...]origin = get_origin(cls)if origin is not None:if issubclass(origin, OAuth2Secret):return Trueexcept TypeError:passtry:return issubclass(... | 5 | 13 | 1 | 55 | 1 | 17 | 35 | 17 | cls | ['origin'] | bool | {"Assign": 1, "If": 2, "Return": 3, "Try": 2} | 3 | 19 | 3 | ["get_origin", "issubclass", "issubclass"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._managed_parameters_py.ManagedParameterHeuristicOAuth2Secret.create_managed_param", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions... | The function (is_oauth2_secret_subclass) defined within the public class called public.The function start at line 17 and ends at 35. It contains 13 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functi... |
Sema4AI_actions | Secret | public | 0 | 0 | model_validate | def model_validate(cls, value: str) -> "Secret":"""Creates a secret given a string (expected when the useris passing the arguments using a json input).Args:value: The raw-text value to be used in the secret.Return: A Secret instance with the given value.Note: the model_validate method is used for compatibility withthe ... | 1 | 3 | 2 | 27 | 0 | 61 | 76 | 61 | cls,value | [] | 'Secret' | {"Expr": 1, "Return": 1} | 1 | 16 | 1 | ["_RawSecret"] | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manifest.models_py.Manifest.validate_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._comman... | The function (model_validate) defined within the public class called Secret.The function start at line 61 and ends at 76. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [61.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
Sema4AI_actions | Secret | public | 0 | 0 | from_action_context | def from_action_context(cls, action_context: "ActionContext | None", secret_name: str) -> "Secret":"""Creates a secret given the action context (which may be encryptedin memory until the actual secret value is requested).Args:action_context: The action context which has the secret.secret_name: The name of the secret to... | 1 | 5 | 3 | 33 | 0 | 79 | 95 | 79 | cls,action_context,secret_name | [] | 'Secret' | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["_SecretInActionContext"] | 0 | [] | The function (from_action_context) defined within the public class called Secret.The function start at line 79 and ends at 95. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [79.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
Sema4AI_actions | Secret | public | 0 | 0 | value | def value(self) -> str:raise NotImplementedError("The Secret class is abstract and should not be directly used.") | 1 | 4 | 1 | 12 | 0 | 98 | 101 | 98 | self | [] | str | {} | 1 | 4 | 1 | ["NotImplementedError"] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_config_py.setup_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.hooks_py.RequestViewerHook.after", "_.content.gdrive.... | The function (value) defined within the public class called Secret.The function start at line 98 and ends at 101. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which... |
Sema4AI_actions | Secret | public | 0 | 0 | model_validate | def model_validate(cls, value: dict) -> "OAuth2Secret":"""Creates an OAuth2 Secret given a dict with the information(expected when the user is passing the arguments using a json input).Args:value: The dict containing the information to build the OAuth2 Secret.Return: An OAuth2Secret instance with the given value.Note: ... | 2 | 9 | 2 | 44 | 0 | 144 | 166 | 144 | cls,value | [] | 'Secret' | {"Expr": 1, "Return": 1} | 1 | 16 | 1 | ["_RawSecret"] | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manifest.models_py.Manifest.validate_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._comman... | The function (model_validate) defined within the public class called Secret.The function start at line 144 and ends at 166. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [144.0] and does not return any value. It declare 1.0 function, It has 1.0 function calle... |
Sema4AI_actions | Secret | public | 0 | 0 | from_action_context | def from_action_context(cls, action_context: "ActionContext | None", secret_name: str) -> "Secret":"""Creates a secret given the action context (which may be encryptedin memory until the actual secret value is requested).Args:action_context: The action context which has the secret.secret_name: The name of the secret to... | 1 | 5 | 3 | 33 | 0 | 169 | 186 | 79 | cls,action_context,secret_name | [] | 'Secret' | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["_SecretInActionContext"] | 0 | [] | The function (from_action_context) defined within the public class called Secret.The function start at line 169 and ends at 186. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [79.0] and does not return any value. It declare 1.0 function, and It has 1.0 funct... |
Sema4AI_actions | OAuth2Secret | public | 0 | 1 | provider | def provider(self) -> str:raise NotImplementedError("The OAuth2Secret class is abstract and should not be directly used.") | 1 | 4 | 1 | 12 | 0 | 189 | 192 | 189 | self | [] | str | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (provider) defined within the public class called OAuth2Secret, that inherit another class.The function start at line 189 and ends at 192. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, a... |
Sema4AI_actions | OAuth2Secret | public | 0 | 1 | scopes | def scopes(self) -> ScopesT:raise NotImplementedError("The OAuth2Secret class is abstract and should not be directly used.") | 1 | 4 | 1 | 12 | 0 | 195 | 198 | 195 | self | [] | ScopesT | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (scopes) defined within the public class called OAuth2Secret, that inherit another class.The function start at line 195 and ends at 198. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and... |
Sema4AI_actions | OAuth2Secret | public | 0 | 1 | access_token | def access_token(self) -> str:raise NotImplementedError("The OAuth2Secret class is abstract and should not be directly used.") | 1 | 4 | 1 | 12 | 0 | 201 | 204 | 201 | self | [] | str | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (access_token) defined within the public class called OAuth2Secret, that inherit another class.The function start at line 201 and ends at 204. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functio... |
Sema4AI_actions | OAuth2Secret | public | 0 | 1 | metadata | def metadata(self) -> JSONValue:raise NotImplementedError("The OAuth2Secret class is abstract and should not be directly used.") | 1 | 4 | 1 | 12 | 0 | 207 | 210 | 207 | self | [] | JSONValue | {} | 1 | 4 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961680_n4s4_synology_api.docs_parser_py.gen_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.pmtiles_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (metadata) defined within the public class called OAuth2Secret, that inherit another class.The function start at line 207 and ends at 210. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, I... |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | __init__ | def __init__(self,provider: ProviderT,scopes: ScopesT,access_token: str,metadata: JSONValue = None,):self._provider = providerself._scopes = scopesself._access_token = access_tokenself._metadata = metadatafrom robocorp import loglog.hide_from_output(access_token)log.hide_from_output(repr(access_token)) | 1 | 14 | 5 | 63 | 0 | 8 | 23 | 8 | self,provider,scopes,access_token,metadata | [] | None | {"Assign": 4, "Expr": 2} | 3 | 16 | 3 | ["log.hide_from_output", "log.hide_from_output", "repr"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 8 and ends at 23. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8.0] and does not return any value. It declare... |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | provider | def provider(self) -> str:return self._provider | 1 | 2 | 1 | 11 | 0 | 26 | 27 | 26 | self | [] | str | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (provider) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 26 and ends at 27. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | scopes | def scopes(self) -> list[str]:return self._scopes | 1 | 2 | 1 | 14 | 0 | 30 | 31 | 30 | self | [] | list[str] | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (scopes) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 30 and ends at 31. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | access_token | def access_token(self) -> str:return self._access_token | 1 | 2 | 1 | 11 | 0 | 34 | 35 | 34 | self | [] | str | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (access_token) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | metadata | def metadata(self) -> JSONValue:return self._metadata | 1 | 2 | 1 | 11 | 0 | 38 | 39 | 38 | self | [] | JSONValue | {"Return": 1} | 0 | 2 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961680_n4s4_synology_api.docs_parser_py.gen_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.pmtiles_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (metadata) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 38 and ends at 39. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0 f... |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | __init__ | def __init__(self, action_context: "ActionContext", path: str):"""Args:action_context: The action context.path: the path of the data required inside of the action context(a '/' splitted path, for instance: 'secrets/my_passwd')"""if not path:raise RuntimeError("A valid path must be passed.")self._action_context = action... | 2 | 5 | 3 | 38 | 0 | 47 | 58 | 47 | self,provider,scopes,access_token,metadata | [] | None | {"Assign": 4, "Expr": 2} | 3 | 16 | 3 | ["log.hide_from_output", "log.hide_from_output", "repr"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 47 and ends at 58. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [47.0] and does not return any value. It declar... |
Sema4AI_actions | _OAuth2SecretInActionContext | protected | 0 | 1 | _get_dict_in_action_context | def _get_dict_in_action_context(self) -> dict:from robocorp import logwith log.suppress():dct = self._action_context.valuev = Nonefor path in self._paths:if not isinstance(dct, dict):dct = None# Remove from contextraise RuntimeError(f"Unable to get path: {self._paths} in action context (expected dict to get {path!r} fr... | 6 | 29 | 1 | 108 | 0 | 60 | 93 | 60 | self | [] | dict | {"Assign": 6, "For": 1, "If": 3, "Return": 1, "Try": 1, "With": 1} | 7 | 34 | 7 | ["log.suppress", "isinstance", "RuntimeError", "RuntimeError", "RuntimeError", "isinstance", "RuntimeError"] | 0 | [] | The function (_get_dict_in_action_context) defined within the protected class called _OAuth2SecretInActionContext, that inherit another class.The function start at line 60 and ends at 93. It contains 29 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return ... |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | access_token | def access_token(self) -> str:"""Provides the actual access_token wrapped in this class."""from robocorp import logwith log.suppress():dct = self._get_dict_in_action_context()ret = dct["access_token"]log.hide_from_output(ret)log.hide_from_output(repr(ret))return ret | 1 | 8 | 1 | 49 | 0 | 96 | 107 | 96 | self | [] | str | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (access_token) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 96 and ends at 107. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | provider | def provider(self) -> str:"""Provides the actual provider wrapped in this class."""from robocorp import logwith log.suppress():dct = self._get_dict_in_action_context()return dct["provider"] | 1 | 5 | 1 | 31 | 0 | 110 | 118 | 110 | self | [] | str | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (provider) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 110 and ends at 118. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | scopes | def scopes(self) -> list[str]:"""Provides the actual scopes wrapped in this class."""from robocorp import logwith log.suppress():dct = self._get_dict_in_action_context()return dct["scopes"] | 1 | 5 | 1 | 34 | 0 | 121 | 129 | 121 | self | [] | list[str] | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (scopes) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 121 and ends at 129. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | metadata | def metadata(self) -> Optional[Any]:"""Provides the actual metadata wrapped in this class."""from robocorp import logwith log.suppress():dct = self._get_dict_in_action_context()return dct.get("metadata") | 1 | 5 | 1 | 36 | 0 | 132 | 140 | 132 | self | [] | JSONValue | {"Return": 1} | 0 | 2 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961680_n4s4_synology_api.docs_parser_py.gen_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.pmtiles_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (metadata) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 132 and ends at 140. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0... |
Sema4AI_actions | _BaseInternalOAuth2Secret | protected | 0 | 1 | __init__ | def __init__(self, value: dict):"""Args:value: A dict with the values meant to be wrapped in this class."""from sema4ai.actions._action import get_provider_and_scope_from_annotation_argsfrom sema4ai.actions._variables_scope import (get_validate_and_convert_kwargs_scope,)access_token = value.get("access_token")if not ac... | 9 | 31 | 2 | 148 | 0 | 148 | 190 | 148 | self,provider,scopes,access_token,metadata | [] | None | {"Assign": 4, "Expr": 2} | 3 | 16 | 3 | ["log.hide_from_output", "log.hide_from_output", "repr"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _BaseInternalOAuth2Secret, that inherit another class.The function start at line 148 and ends at 190. It contains 31 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [148.0] and does not return any value. It de... |
Sema4AI_actions | _RawSecret | protected | 0 | 1 | __init__ | def __init__(self, value: str):"""Args:value: The secret value to be wrapped in this class (note thatit's automatically hidden in the logs)."""from robocorp import loglog.hide_from_output(value)log.hide_from_output(repr(value))self.__value = value | 1 | 5 | 2 | 34 | 0 | 14 | 24 | 14 | self,value | [] | None | {"Assign": 1, "Expr": 3} | 3 | 11 | 3 | ["log.hide_from_output", "log.hide_from_output", "repr"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _RawSecret, that inherit another class.The function start at line 14 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [14.0] and does not return any value. It declares 3.0 function... |
Sema4AI_actions | _RawSecret | protected | 0 | 1 | value | def value(self) -> str:"""Provides the actual secret wrapped in this class."""return self.__value | 1 | 2 | 1 | 12 | 0 | 27 | 31 | 27 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 5 | 0 | [] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_config_py.setup_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.hooks_py.RequestViewerHook.after", "_.content.gdrive.... | The function (value) defined within the protected class called _RawSecret, that inherit another class.The function start at line 27 and ends at 31. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 27.0 functions calling ... |
Sema4AI_actions | public | public | 0 | 0 | _decrypt_secret_or_return_plain | def _decrypt_secret_or_return_plain(var_name: str, data: str) -> str:import base64import jsonfrom sema4ai.actions._action_context import _decrypt_from_data_envelopetry:loaded_data = json.loads(base64.b64decode(data.encode("ascii")).decode("utf-8"))if isinstance(loaded_data, dict):if ("cipher" in loaded_dataand "algorit... | 9 | 21 | 2 | 114 | 2 | 40 | 64 | 40 | var_name,data | ['loaded_data', 'found'] | str | {"Assign": 2, "If": 4, "Return": 3, "Try": 1} | 8 | 25 | 8 | ["json.loads", "decode", "base64.b64decode", "data.encode", "isinstance", "_decrypt_from_data_envelope", "isinstance", "json.dumps"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._secret._secret_py._SecretInActionContext.__secret_from_env_or_request"] | The function (_decrypt_secret_or_return_plain) defined within the public class called public.The function start at line 40 and ends at 64. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 8.0 functions, It has 8... |
Sema4AI_actions | _RawSecret | protected | 0 | 1 | __init__ | def __init__(self, action_context: "ActionContext | None", secret_name: str):"""Args:action_context: The action context.path: the path of the data required inside of the action context(a '/' splitted path, for instance: 'secrets/my_passwd')"""if not secret_name:raise RuntimeError("A valid secret name must be passed.")s... | 2 | 8 | 3 | 57 | 0 | 72 | 87 | 72 | self,value | [] | None | {"Assign": 1, "Expr": 3} | 3 | 11 | 3 | ["log.hide_from_output", "log.hide_from_output", "repr"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _RawSecret, that inherit another class.The function start at line 72 and ends at 87. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [72.0] and does not return any value. It declares 3.0 function... |
Sema4AI_actions | _SecretInActionContext | protected | 0 | 1 | __secret_from_env_or_request | def __secret_from_env_or_request(self, error_if_not_found: str) -> str:"""If this method is called, it means that the secret is not available in theaction context.This method will try to get the secret from the request headers or from theenvironment variables."""import osfrom sema4ai.actions._action import get_current_... | 7 | 23 | 2 | 143 | 0 | 89 | 126 | 89 | self,error_if_not_found | [] | str | {"Assign": 7, "Expr": 3, "If": 6, "Return": 2} | 10 | 38 | 10 | ["get_current_requests_contexts", "request.headers.get", "_decrypt_secret_or_return_plain", "os.getenv", "_decrypt_secret_or_return_plain", "_is_robocorp_log_available", "log.hide_from_output", "log.hide_from_output", "repr", "NoSecretInActionContextError"] | 0 | [] | The function (__secret_from_env_or_request) defined within the protected class called _SecretInActionContext, that inherit another class.The function start at line 89 and ends at 126. It contains 23 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [89.0] and does not return a... |
Sema4AI_actions | _RawSecret | protected | 0 | 1 | value | def value(self) -> str:"""Provides the actual secret wrapped in this class."""from robocorp import logwith log.suppress():if self._action_context is None:return self.__secret_from_env_or_request("Unable to get the secret in the action context because it's not available")dct = self._action_context.valuev = Nonefor path ... | 7 | 33 | 1 | 131 | 0 | 129 | 170 | 129 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 5 | 0 | [] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_config_py.setup_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.hooks_py.RequestViewerHook.after", "_.content.gdrive.... | The function (value) defined within the protected class called _RawSecret, that inherit another class.The function start at line 129 and ends at 170. It contains 33 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It has 27.0 functions calli... |
Sema4AI_actions | public | public | 0 | 0 | _get_id_from_action_context | def _get_id_from_action_context(action_context, id_key: str) -> str:value = action_context.valueif not isinstance(value, dict):raise ActionError("Internal Error: Unable to get the Action Context because it's not a dictionary")invocation_context = value.get("invocation_context")if not invocation_context:raise ActionErro... | 6 | 25 | 2 | 96 | 3 | 48 | 74 | 48 | action_context,id_key | ['id_value', 'value', 'invocation_context'] | str | {"Assign": 3, "If": 5, "Return": 1} | 11 | 27 | 11 | ["isinstance", "ActionError", "value.get", "ActionError", "isinstance", "ActionError", "invocation_context.get", "ActionError", "isinstance", "ActionError", "type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent.__init___py._get_id_generic"] | The function (_get_id_from_action_context) defined within the public class called public.The function start at line 48 and ends at 74. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [48.0] and does not return any value. It declares 11.0 functions, It has 11.0... |
Sema4AI_actions | public | public | 0 | 0 | _get_id_from_invocation_context | def _get_id_from_invocation_context(invocation_context_object, id_key: str) -> str | None:invocation_context = invocation_context_object.valueif not invocation_context:return Noneif not isinstance(invocation_context, dict):raise ActionError("Internal Error: Unable to get the invocation context because it's not a dictio... | 5 | 20 | 2 | 73 | 2 | 77 | 100 | 77 | invocation_context_object,id_key | ['id_value', 'invocation_context'] | str | None | {"Assign": 2, "If": 4, "Return": 2} | 7 | 24 | 7 | ["isinstance", "ActionError", "invocation_context.get", "ActionError", "isinstance", "ActionError", "type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent.__init___py._get_id_generic"] | The function (_get_id_from_invocation_context) defined within the public class called public.The function start at line 77 and ends at 100. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [77.0] and does not return any value. It declares 7.0 functions, It has ... |
Sema4AI_actions | public | public | 0 | 0 | _get_id_generic | def _get_id_generic(id_key: str, header_key: str) -> str:from sema4ai.actions._action import get_current_requests_contextsid_value = Nonerequest_contexts = get_current_requests_contexts()if request_contexts is None:raise ActionError(f"Internal Error: Unable to get the {id_key} (no context available)")# Prefer invocatio... | 8 | 25 | 2 | 112 | 4 | 103 | 140 | 103 | id_key,header_key | ['action_context', 'id_value', 'request', 'request_contexts'] | str | {"Assign": 7, "If": 7, "Return": 1} | 6 | 38 | 6 | ["get_current_requests_contexts", "ActionError", "_get_id_from_invocation_context", "request.headers.get", "_get_id_from_action_context", "ActionError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent.__init___py.get_agent_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent.__init___py.get_thread_i... | The function (_get_id_generic) defined within the public class called public.The function start at line 103 and ends at 140. It contains 25 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [103.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | get_thread_id | def get_thread_id() -> str:"""Get the thread ID from the action context or the request headers.Note:This will raise an ActionError if the thread ID cannot be found. This is expected when calling thisfunction directly from VSCode unless the `x-invoked_for_thread_id` header is set in the request in configuredinputs."""re... | 1 | 2 | 0 | 14 | 0 | 143 | 151 | 143 | [] | str | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["_get_id_generic"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent.__init___py.prompt_generate"] | The function (get_thread_id) defined within the public class called public.The function start at line 143 and ends at 151. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called ins... | |
Sema4AI_actions | public | public | 0 | 0 | get_agent_id | def get_agent_id() -> str:"""Get the agent ID from the action context or the request headers.Note:This will raise an ActionError if the agent ID cannot be found. This is expected when calling thisfunction directly from VSCode unless the `x-invoked_by_assistant_id` header is set in the request in configuredinputs."""ret... | 1 | 2 | 0 | 14 | 0 | 154 | 162 | 154 | [] | str | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["_get_id_generic"] | 0 | [] | The function (get_agent_id) defined within the public class called public.The function start at line 154 and ends at 162. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called... | |
Sema4AI_actions | public | public | 0 | 0 | prompt_generate | def prompt_generate(prompt: Prompt | dict,platform_config: AnyPlatformParameters | dict | None = None,thread_id: str | None = None,agent_id: str | None = None,model_name: str | None = None,) -> ResponseMessage:"""Gives a prompt to an agent.Args:prompt: The prompt to generate.platform_config: The platform configuration ... | 9 | 29 | 5 | 166 | 7 | 165 | 217 | 165 | prompt,platform_config,thread_id,agent_id,model_name | ['client', 'platform_config', 'query_params', 'prompt', 'payload', 'response', 'thread_id'] | ResponseMessage | {"Assign": 10, "Expr": 1, "If": 6, "Return": 1} | 8 | 53 | 8 | ["get_thread_id", "_AgentAPIClient", "isinstance", "prompt.model_dump", "isinstance", "platform_config.model_dump", "client.request", "response.json"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_tests.test_agent_functions_py.test_prompt_generate_complex_prompt", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_tests.t... | The function (prompt_generate) defined within the public class called public.The function start at line 165 and ends at 217. It contains 29 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [165.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | __init__ | def __init__(self):"""Initialize the AgentServerClient."""self.api_url = self._get_api_url()log.info(f"API URL: {self.api_url}") | 1 | 3 | 1 | 22 | 0 | 23 | 27 | 23 | self | [] | None | {"Assign": 1, "Expr": 2} | 2 | 5 | 2 | ["self._get_api_url", "log.info"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _AgentAPIClient.The function start at line 23 and ends at 27. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions ca... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | _get_api_url | def _get_api_url(self) -> str:"""Determine the correct API URL by checking environment variable or agent-server.pid fileand testing API availability.Returns:str: The working API URLRaises:AgentApiClientException: If no API server is responding"""# Try to get URL from environment variable firstapi_url = self._try_get_ur... | 3 | 8 | 1 | 37 | 0 | 29 | 50 | 29 | self | [] | str | {"Assign": 2, "Expr": 1, "If": 2, "Return": 2} | 3 | 22 | 3 | ["self._try_get_url_from_environment", "self._try_get_url_from_pid_file", "AgentApiClientException"] | 0 | [] | The function (_get_api_url) defined within the protected class called _AgentAPIClient.The function start at line 29 and ends at 50. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 fun... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | _try_get_url_from_environment | def _try_get_url_from_environment(self) -> str | None:env_url = os.getenv("SEMA4AI_AGENTS_SERVICE_URL")if not env_url:return Noneif self._is_url_accessible(f"{env_url}/api/v2/ok"):return f"{env_url}/api/v2/"return None | 3 | 7 | 1 | 37 | 0 | 52 | 59 | 52 | self | [] | str | None | {"Assign": 1, "If": 2, "Return": 3} | 2 | 8 | 2 | ["os.getenv", "self._is_url_accessible"] | 0 | [] | The function (_try_get_url_from_environment) defined within the protected class called _AgentAPIClient.The function start at line 52 and ends at 59. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, an... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | _try_get_url_from_pid_file | def _try_get_url_from_pid_file(self) -> str | None:pid_file_path = self._get_pid_file_path()log.debug(f"Looking for agent server in PID file: {pid_file_path}")try:if not os.path.exists(pid_file_path):return Nonewith open(pid_file_path, "r") as f:server_info = json.loads(f.read())base_url = server_info.get("base_url")if... | 5 | 19 | 1 | 110 | 0 | 61 | 81 | 61 | self | [] | str | None | {"Assign": 4, "Expr": 2, "If": 3, "Return": 5, "Try": 1, "With": 1} | 10 | 21 | 10 | ["self._get_pid_file_path", "log.debug", "os.path.exists", "open", "json.loads", "f.read", "server_info.get", "self._is_url_accessible", "urljoin", "log.debug"] | 0 | [] | The function (_try_get_url_from_pid_file) defined within the protected class called _AgentAPIClient.The function start at line 61 and ends at 81. It contains 19 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 10.0 functions, and... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | _is_url_accessible | def _is_url_accessible(self, url: str) -> bool:try:parsed_url = urlparse(url)if parsed_url.scheme not in ("http", "https"):return Falserequest_headers = {"x-action-invocation-context": get_x_action_invocation_context()}sema4ai_http.get(url, timeout=1, headers=request_headers).raise_for_status()return Trueexcept Excepti... | 3 | 12 | 2 | 67 | 0 | 83 | 95 | 83 | self,url | [] | bool | {"Assign": 2, "Expr": 1, "If": 1, "Return": 3, "Try": 1} | 4 | 13 | 4 | ["urlparse", "get_x_action_invocation_context", "raise_for_status", "sema4ai_http.get"] | 0 | [] | The function (_is_url_accessible) defined within the protected class called _AgentAPIClient.The function start at line 83 and ends at 95. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [83.0] and does not return any value. It declares 4.0 functions, and It h... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | _get_pid_file_path | def _get_pid_file_path(self) -> str:"""Get the path to the agent-server.pid file based on the operating system.Returns:str: Path to the PID file"""# Determine OS-specific pathif sys.platform == "win32":# Windows path: C:\Users\<username>\AppData\Local\sema4ai\sema4ai-studio\agent-server.pidlocal_app_data = os.environ.g... | 3 | 20 | 1 | 95 | 0 | 97 | 126 | 97 | self | [] | str | {"Assign": 2, "Expr": 1, "If": 2, "Return": 2} | 6 | 30 | 6 | ["os.environ.get", "os.path.join", "os.path.expanduser", "os.path.join", "os.path.join", "os.path.expanduser"] | 0 | [] | The function (_get_pid_file_path) defined within the protected class called _AgentAPIClient.The function start at line 97 and ends at 126. It contains 20 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has... |
Sema4AI_actions | _AgentAPIClient | protected | 0 | 0 | request | def request(self,path: str,method="GET",json_data: dict | None = None,headers: dict | None = None,query_params: dict | None = None,) -> sema4ai_http.ResponseWrapper:"""Make an API request with common error handling.Args:path: API endpoint pathmethod: HTTP method (GET, POST, or DELETE)json_data: Optional JSON payload fo... | 8 | 35 | 6 | 204 | 0 | 128 | 185 | 128 | self,path,method,json_data,headers,query_params | [] | sema4ai_http.ResponseWrapper | {"Assign": 8, "AugAssign": 2, "Expr": 2, "If": 6, "Return": 1} | 10 | 58 | 10 | ["urljoin", "copy", "get_x_action_invocation_context", "urlencode", "log.debug", "sema4ai_http.get", "sema4ai_http.post", "sema4ai_http.delete", "ValueError", "AgentApiClientException"] | 58 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.examples.benchmark_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527220_mitar_django_mongo_auth.mongo_auth.models_py.User.get_image_url", "_.content.gdrive.MyDrive.Phd_Thesis.... | The function (request) defined within the protected class called _AgentAPIClient.The function start at line 128 and ends at 185. It contains 35 lines of code and it has a cyclomatic complexity of 8. It takes 6 parameters, represented as [128.0] and does not return any value. It declares 10.0 functions, It has 10.0 func... |
Sema4AI_actions | public | public | 0 | 0 | _check_that_name_is_valid_in_filesystem | def _check_that_name_is_valid_in_filesystem(name: str):invalid_characters = r'<>:"/\|?*'if any(char in name for char in invalid_characters):raise ValueError(f"Name {name} contains invalid characters: {invalid_characters}")# Reserved names:# CON, PRN, AUX, NUL# COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9# LPT1,... | 6 | 34 | 1 | 119 | 2 | 16 | 56 | 16 | name | ['invalid_characters', 'name_without_extension'] | None | {"Assign": 2, "If": 3} | 7 | 41 | 7 | ["any", "ValueError", "os.path.splitext", "ValueError", "name.endswith", "name.endswith", "ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.attach_file_content"] | The function (_check_that_name_is_valid_in_filesystem) defined within the public class called public.The function start at line 16 and ends at 56. It contains 34 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 7.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | _get_thread_id_from_action_context | def _get_thread_id_from_action_context(action_context) -> str:value = action_context.valueif not isinstance(value, dict):raise RuntimeError("Action context value is not a dictionary, as such it's not possible to upload files!")invocation_context = value.get("invocation_context")if not invocation_context:raise RuntimeEr... | 6 | 25 | 1 | 91 | 3 | 59 | 85 | 59 | action_context | ['value', 'thread_id', 'invocation_context'] | str | {"Assign": 3, "If": 5, "Return": 1} | 11 | 27 | 11 | ["isinstance", "RuntimeError", "value.get", "RuntimeError", "isinstance", "RuntimeError", "invocation_context.get", "RuntimeError", "isinstance", "RuntimeError", "type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py._get_client_and_thread_id"] | The function (_get_thread_id_from_action_context) defined within the public class called public.The function start at line 59 and ends at 85. It contains 25 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 11.0 functions, It has ... |
Sema4AI_actions | public | public | 0 | 0 | _get_thread_id_from_invocation_context | def _get_thread_id_from_invocation_context(invocation_context_object) -> Optional[str]:invocation_context = invocation_context_object.valueif not invocation_context:return Noneif not isinstance(invocation_context, dict):raise RuntimeError("invocation_context is not a dictionary, as such it's not possible to upload file... | 5 | 18 | 1 | 69 | 2 | 88 | 108 | 88 | invocation_context_object | ['thread_id', 'invocation_context'] | Optional[str] | {"Assign": 2, "If": 4, "Return": 2} | 7 | 21 | 7 | ["isinstance", "RuntimeError", "invocation_context.get", "RuntimeError", "isinstance", "RuntimeError", "type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py._get_client_and_thread_id"] | The function (_get_thread_id_from_invocation_context) defined within the public class called public.The function start at line 88 and ends at 108. It contains 18 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 7.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | _get_client_and_thread_id | def _get_client_and_thread_id() -> tuple["_Client", str]:from sema4ai.actions._action import get_current_requests_contextsfrom ._client import _Clientclient = _Client()if client.is_local_mode():# Ok, we're in local mode, so we don't need the thread_id!return client, "local"thread_id = Nonerequest_contexts = get_current... | 9 | 29 | 0 | 127 | 5 | 111 | 155 | 111 | ['client', 'request', 'request_contexts', 'action_context', 'thread_id'] | tuple['_Client', str] | {"Assign": 8, "If": 8, "Return": 2} | 8 | 45 | 8 | ["_Client", "client.is_local_mode", "get_current_requests_contexts", "RuntimeError", "_get_thread_id_from_invocation_context", "request.headers.get", "_get_thread_id_from_action_context", "RuntimeError"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.attach_file_content", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.get_fil... | The function (_get_client_and_thread_id) defined within the public class called public.The function start at line 111 and ends at 155. It contains 29 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 func... | |
Sema4AI_actions | public | public | 0 | 0 | _get_mimetype_module | def _get_mimetype_module():KNOWN_MIMETYPES = [("text/x-yaml", ".yml"),("text/x-yaml", ".yaml"),]import mimetypesfor type_, ext in KNOWN_MIMETYPES:mimetypes.add_type(type_, ext)return mimetypes | 2 | 9 | 0 | 39 | 1 | 159 | 169 | 159 | ['KNOWN_MIMETYPES'] | Returns | {"Assign": 1, "Expr": 1, "For": 1, "Return": 1} | 1 | 11 | 1 | ["mimetypes.add_type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.attach_file"] | The function (_get_mimetype_module) defined within the public class called public.The function start at line 159 and ends at 169. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function... | |
Sema4AI_actions | public | public | 0 | 0 | attach_file_content | def attach_file_content(name: str,data: bytes,content_type="application/octet-stream",) -> None:"""Set the content of a file to be used in the current chat.Arguments:name: Name of the file (must be a valid name to be used to save files in the filesystem).data: Raw content of the file.content_type: Content type (or mime... | 2 | 10 | 3 | 57 | 0 | 172 | 199 | 172 | name,data,content_type | [] | None | {"Assign": 1, "Expr": 3, "If": 1} | 6 | 28 | 6 | ["isinstance", "ValueError", "type", "_check_that_name_is_valid_in_filesystem", "_get_client_and_thread_id", "client.set_bytes"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.attach_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.chat.__init___py.attach_json", "... | The function (attach_file_content) defined within the public class called public.The function start at line 172 and ends at 199. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [172.0] and does not return any value. It declares 6.0 functions, It has 6.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | get_file_content | def get_file_content(name: str) -> bytes:"""Get the content of a file in the current action chat.Arguments:name: Name of file.Returns:Raw content of the fileRaises:Exception: If the file does not exist (or if it was not possible to retrieve it)."""client, thread_id = _get_client_and_thread_id()return client.get_bytes(n... | 1 | 3 | 1 | 26 | 0 | 202 | 215 | 202 | name | [] | bytes | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 14 | 2 | ["_get_client_and_thread_id", "client.get_bytes"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689214_zowe_zowe_client_python_sdk.tests.unit.files.uss.test_uss_py.TestFilesClass.test_get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.docs.docs_env.Lib.site_packages.pip_... | The function (get_file_content) defined within the public class called public.The function start at line 202 and ends at 215. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
Sema4AI_actions | public | public | 0 | 0 | attach_file | def attach_file(path: Union[os.PathLike, str],content_type: str | None = None,name: str | None = None,) -> None:"""Attaches a file to the current chat.Arguments:path: Path to the file which should be attached.content_type: Content type (or mimetype) of the file.name: Name of file (if not given the original name of the ... | 5 | 19 | 3 | 123 | 4 | 218 | 255 | 218 | path,content_type,name | ['name', 'p', 'mimetypes', 'content_type'] | None | {"Assign": 5, "Expr": 4, "If": 4} | 9 | 38 | 9 | ["_get_mimetype_module", "mimetypes.guess_type", "log.info", "log.info", "Path", "p.exists", "IOError", "attach_file_content", "p.read_bytes"] | 0 | [] | The function (attach_file) defined within the public class called public.The function start at line 218 and ends at 255. It contains 19 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [218.0] and does not return any value. It declares 9.0 functions, and It has 9.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | get_file | def get_file(name: str) -> Path:"""Get the content of a file in the current action chat, saves it to a temporary fileand returns the path to it.Arguments:name: Name of the file to retrieve.Returns:Raw content of the fileRaises:Exception: If the file does not exist."""import tempfilefile_content = get_file_content(name)... | 1 | 7 | 1 | 46 | 2 | 258 | 278 | 258 | name | ['file_content', 'temp_file_path'] | Path | {"Assign": 2, "Expr": 2, "Return": 1, "With": 1} | 4 | 21 | 4 | ["get_file_content", "tempfile.NamedTemporaryFile", "temp_file.write", "Path"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3950225_cfn_sphere_cfn_sphere.src.main.python.cfn_sphere.file_generator_py.FileGenerator.render_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69709075_opennmt_nmt_wizard.server.nmtwizard.task_py.get_log"] | The function (get_file) defined within the public class called public.The function start at line 258 and ends at 278. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called insid... |
Sema4AI_actions | public | public | 0 | 0 | attach_json | def attach_json(name: str, contents: JSONValue) -> None:"""Attach a file with JSON content to the current chat.Arguments:name: Name of the JSON file.contents: JSON-serializable content.Note:The way that the contents are stored may depend on how the action is being run.If the action is being run locally it could be save... | 1 | 4 | 2 | 37 | 1 | 281 | 298 | 281 | name,contents | ['json_data'] | None | {"Assign": 1, "Expr": 2} | 3 | 18 | 3 | ["encode", "json.dumps", "attach_file_content"] | 0 | [] | The function (attach_json) defined within the public class called public.The function start at line 281 and ends at 298. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [281.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | get_json | def get_json(name: str) -> JSONValue:"""Get the JSON content of a file in the current action chat.Arguments:name: Name of the file with the JSON content to retrieve.Returns:Deserialized JSON content.Note:The way that the contents are stored may depend on how the action is being run.If the action is being run locally it... | 1 | 4 | 1 | 30 | 1 | 301 | 324 | 301 | name | ['content'] | JSONValue | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 24 | 3 | ["get_file_content", "json.loads", "content.decode"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3599349_djc_couchdb_python.couchdb.client_py.Database.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3599349_djc_couchdb_python.couchdb.client_py.Database.get", "_.content.gdrive.MyDrive.Phd_Thesis.Data... | The function (get_json) defined within the public class called public.The function start at line 301 and ends at 324. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called insid... |
Sema4AI_actions | public | public | 0 | 0 | attach_text | def attach_text(name: str, contents: str) -> None:"""Attach a file with text content to the current chat.Arguments:name: Name of the text file.contents: Text content.Note:The way that the contents are stored may depend on how the action is being run.If the action is being run locally it could be saved in the local file... | 1 | 2 | 2 | 27 | 0 | 327 | 341 | 327 | name,contents | [] | None | {"Expr": 2} | 2 | 15 | 2 | ["attach_file_content", "contents.encode"] | 0 | [] | The function (attach_text) defined within the public class called public.The function start at line 327 and ends at 341. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [327.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | get_text | def get_text(name: str) -> str:"""Get the text content of a file in the current action chat.Arguments:name: Name of the file with the text content to retrieve.Returns:Text content of the file.Raises:Exception: If the file does not exist (or if it was not possible to retrieve itor if the content is not valid UTF-8)."""c... | 1 | 3 | 1 | 23 | 1 | 344 | 358 | 344 | name | ['content'] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 15 | 2 | ["get_file_content", "content.decode"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.tweakview_py.Window._on_list_changed", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.tweakview_py.Window._on_select_row", "_.content.gdrive... | The function (get_text) defined within the public class called public.The function start at line 344 and ends at 358. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called insid... |
Sema4AI_actions | _Client | protected | 0 | 0 | __init__ | def __init__(self, file_management_url_value: str = ""):""":param file_management_url_value: If given uses this value for the url, otherwiseit will use the value of the SEMA4AI_FILE_MANAGEMENT_URL environment variable, if set."""import osimport urllibfrom sema4ai.actions import _urisif not file_management_url_value:fil... | 5 | 26 | 2 | 122 | 0 | 9 | 44 | 9 | self,file_management_url_value | [] | None | {"AnnAssign": 1, "Assign": 7, "Expr": 1, "If": 4} | 5 | 36 | 5 | ["os.environ.get", "os.environ.get", "ValueError", "urllib.parse.urlparse", "_uris.to_fs_path"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _Client.The function start at line 9 and ends at 44. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [9.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions called i... |
Sema4AI_actions | _Client | protected | 0 | 0 | is_local_mode | def is_local_mode(self) -> bool:return self._is_local_mode | 1 | 2 | 1 | 11 | 0 | 46 | 47 | 46 | self | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_local_mode) defined within the protected class called _Client.The function start at line 46 and ends at 47. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | _Client | protected | 0 | 0 | get_bytes | def get_bytes(self, filename: str, thread_id: str) -> bytes:import os.pathfrom pathlib import Pathfrom sema4ai.actions import _urisif self.is_local_mode():# Join the filename to the uriassert (self._local_path is not None), "Expected local_path to be set when in local mode."path = os.path.join(self._local_path, filenam... | 4 | 44 | 3 | 221 | 0 | 49 | 112 | 49 | self,filename,thread_id | [] | bytes | {"Assign": 10, "Expr": 2, "If": 3, "Return": 3} | 16 | 64 | 16 | ["self.is_local_mode", "os.path.join", "Path", "p.read_bytes", "get_x_action_invocation_context", "sema4ai_http.get", "self._raise_for_status", "response.json", "response_data.get", "ValueError", "urllib.parse.urlparse", "Path", "_uris.to_fs_path", "p.read_bytes", "sema4ai_http.get", "self._raise_for_status"] | 0 | [] | The function (get_bytes) defined within the protected class called _Client.The function start at line 49 and ends at 112. It contains 44 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [49.0] and does not return any value. It declares 16.0 functions, and It has 16.0 functio... |
Sema4AI_actions | _Client | protected | 0 | 0 | _raise_for_status | def _raise_for_status(self, message: str, response, valid_statuses: tuple[int, ...]):if response.status not in valid_statuses:raise ValueError(f"{message}\nStatus: {response.status}\nBody: {response.data!r}") | 2 | 7 | 4 | 34 | 0 | 114 | 120 | 114 | self,message,response,valid_statuses | [] | None | {"If": 1} | 1 | 7 | 1 | ["ValueError"] | 0 | [] | The function (_raise_for_status) defined within the protected class called _Client.The function start at line 114 and ends at 120. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [114.0] and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
Sema4AI_actions | _Client | protected | 0 | 0 | set_bytes | def set_bytes(self,filename: str,content: bytes,thread_id: str,content_type: str = "application/octet-stream",) -> FileId:"""Returns the file id (which uniquely identifies the file in the file managementservice -- usually it's the same as the filename, but it's possible that it getschanged by the file management servic... | 4 | 74 | 5 | 409 | 0 | 122 | 237 | 122 | self,filename,content,thread_id,content_type | [] | FileId | {"Assign": 19, "Expr": 10, "For": 1, "If": 2, "Return": 1} | 27 | 116 | 27 | ["self.is_local_mode", "Path", "path.parent.mkdir", "path.write_bytes", "get_x_action_invocation_context", "encode", "json.dumps", "len", "sema4ai_http.post", "self._raise_for_status", "response.json", "urllib.parse.urlparse", "Path", "_uris.to_fs_path", "p.parent.mkdir", "p.write_bytes", "items", "fields.append", "fie... | 0 | [] | The function (set_bytes) defined within the protected class called _Client.The function start at line 122 and ends at 237. It contains 74 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [122.0] and does not return any value. It declares 27.0 functions, and It has 27.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | resources_dir | def resources_dir():resources = Path(__file__).parent / "resources"assert resources.exists()return resources | 1 | 4 | 0 | 22 | 1 | 8 | 11 | 8 | ['resources'] | Returns | {"Assign": 1, "Return": 1} | 3 | 4 | 3 | ["Path", "resources.exists", "pytest.fixture"] | 0 | [] | The function (resources_dir) defined within the public class called public.The function start at line 8 and ends at 11. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions c... | |
Sema4AI_actions | public | public | 0 | 0 | _fix_pythonpath | def _fix_pythonpath() -> Iterator[None]:import sysif "actions" in sys.modules:# We have actions.py and actions/__init__.py in different tests, so, proactively# remove it.del sys.modules["actions"]from sema4ai.actions._collect_actions import clear_previously_collected_actionsclear_previously_collected_actions()yieldclea... | 3 | 10 | 0 | 54 | 0 | 15 | 33 | 15 | [] | Iterator[None] | {"Expr": 3, "If": 2} | 3 | 19 | 3 | ["clear_previously_collected_actions", "clear_previously_collected_actions", "pytest.fixture"] | 0 | [] | The function (_fix_pythonpath) defined within the public class called public.The function start at line 15 and ends at 33. It contains 10 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions c... | |
Sema4AI_actions | public | public | 0 | 0 | test_colect_tasks | def test_colect_tasks(datadir) -> None:from sema4ai.actions._collect_actions import collect_actionsfrom sema4ai.actions._customization._plugin_manager import PluginManagertasks = tuple(collect_actions(PluginManager(), datadir, "main", glob="*action*.py"))assert len(tasks) == 1, f"Found: {tasks}"tasks = tuple(collect_ac... | 3 | 19 | 1 | 167 | 2 | 7 | 28 | 7 | datadir | ['tasks', 'name_to_action'] | None | {"Assign": 4} | 13 | 22 | 13 | ["tuple", "collect_actions", "PluginManager", "len", "tuple", "collect_actions", "PluginManager", "len", "dict", "tuple", "collect_actions", "PluginManager", "len"] | 0 | [] | The function (test_colect_tasks) defined within the public class called public.The function start at line 7 and ends at 28. It contains 19 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 13.0 functions, and It has 13.0 function... |
Sema4AI_actions | public | public | 0 | 0 | test_colect_tasks_from_package | def test_colect_tasks_from_package(datadir) -> None:from sema4ai.actions._collect_actions import collect_actionsfrom sema4ai.actions._customization._plugin_manager import PluginManagertasks = tuple(collect_actions(PluginManager(), datadir / "in_init", glob="*action*.py"))assert len(tasks) == 1, f"Found: {tasks}" | 1 | 7 | 1 | 54 | 1 | 31 | 38 | 31 | datadir | ['tasks'] | None | {"Assign": 1} | 4 | 8 | 4 | ["tuple", "collect_actions", "PluginManager", "len"] | 0 | [] | The function (test_colect_tasks_from_package) defined within the public class called public.The function start at line 31 and ends at 38. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4... |
Sema4AI_actions | public | public | 0 | 0 | test_collect_tasks_integrated_error | def test_collect_tasks_integrated_error(tmpdir) -> None:result = sema4ai_actions_run(["run", "dir_not_there", "-a=main"], returncode=1, cwd=str(tmpdir))decoded = result.stdout.decode("utf-8", "replace")if "dir_not_there does not exist" not in decoded:raise AssertionError(f"Unexpected stdout: {decoded}") | 2 | 7 | 1 | 54 | 2 | 41 | 48 | 41 | tmpdir | ['result', 'decoded'] | None | {"Assign": 2, "If": 1} | 4 | 8 | 4 | ["sema4ai_actions_run", "str", "result.stdout.decode", "AssertionError"] | 0 | [] | The function (test_collect_tasks_integrated_error) defined within the public class called public.The function start at line 41 and ends at 48. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It ... |
Sema4AI_actions | public | public | 0 | 0 | test_collect_tasks_integrated | def test_collect_tasks_integrated(datadir) -> None:from robocorp.log import verify_log_messages_from_log_htmlresult = sema4ai_actions_run(["run", str(datadir), "-a", "main", "--glob", "*action*.py"],returncode=0,cwd=datadir,)assert not result.stderr, f"Error with command line: {result.args}: {result.stderr.decode('utf-... | 1 | 21 | 1 | 124 | 2 | 51 | 75 | 51 | datadir | ['result', 'log_html'] | None | {"Assign": 2, "Expr": 1} | 11 | 25 | 11 | ["sema4ai_actions_run", "str", "result.stderr.decode", "result.stdout.decode", "log_html.exists", "verify_log_messages_from_log_html", "dict", "dict", "dict", "dict", "dict"] | 0 | [] | The function (test_collect_tasks_integrated) defined within the public class called public.The function start at line 51 and ends at 75. It contains 21 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has ... |
Sema4AI_actions | public | public | 0 | 0 | test_list_tasks_api.check | def check(result):output = result.stdout.decode("utf-8")loaded = json.loads(output)assert len(loaded) == 4for entry in loaded:entry["file"] = os.path.basename(entry["file"])data_regression.check(loaded) | 2 | 7 | 1 | 57 | 0 | 79 | 85 | 79 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_list_tasks_api.check) defined within the public class called public.The function start at line 79 and ends at 85. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | test_list_tasks_api | def test_list_tasks_api(datadir, tmpdir, data_regression) -> None:def check(result):output = result.stdout.decode("utf-8")loaded = json.loads(output)assert len(loaded) == 4for entry in loaded:entry["file"] = os.path.basename(entry["file"])data_regression.check(loaded)# List with the dir as a targetresult = sema4ai_acti... | 1 | 12 | 3 | 74 | 3 | 78 | 99 | 78 | datadir,tmpdir,data_regression | ['result', 'output', 'loaded'] | None | {"Assign": 5, "Expr": 3, "For": 1} | 11 | 22 | 11 | ["result.stdout.decode", "json.loads", "len", "os.path.basename", "data_regression.check", "sema4ai_actions_run", "str", "str", "check", "sema4ai_actions_run", "check"] | 0 | [] | The function (test_list_tasks_api) defined within the public class called public.The function start at line 78 and ends at 99. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [78.0] and does not return any value. It declares 11.0 functions, and It has 11.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | test_provide_output_in_stdout | def test_provide_output_in_stdout(datadir, tmpdir) -> None:from robocorp.log import verify_log_messages_from_decoded_strresult = sema4ai_actions_run(["run","-a=main",str(datadir),"--output",str(tmpdir),"--glob","*action*.py",],returncode=0,additional_env={"RC_LOG_OUTPUT_STDOUT": "1"},)verify_log_messages_from_decoded_s... | 1 | 25 | 2 | 109 | 1 | 102 | 128 | 102 | datadir,tmpdir | ['result'] | None | {"Assign": 1, "Expr": 1} | 10 | 27 | 10 | ["sema4ai_actions_run", "str", "str", "verify_log_messages_from_decoded_str", "result.stdout.decode", "dict", "dict", "dict", "dict", "dict"] | 0 | [] | The function (test_provide_output_in_stdout) defined within the public class called public.The function start at line 102 and ends at 128. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [102.0] and does not return any value. It declares 10.0 functions, and I... |
Sema4AI_actions | public | public | 0 | 0 | test_error_in_stdout | def test_error_in_stdout(datadir, tmpdir) -> None:from robocorp.log import verify_log_messages_from_decoded_strresult = sema4ai_actions_run(["run","-a=main_errors",str(datadir),"--output",str(tmpdir),"--glob","*action*.py",],returncode=1,additional_env={"RC_LOG_OUTPUT_STDOUT": "1"},)msgs = verify_log_messages_from_deco... | 3 | 31 | 2 | 143 | 3 | 131 | 164 | 131 | datadir,tmpdir | ['count', 'result', 'msgs'] | None | {"Assign": 3, "AugAssign": 1, "For": 1, "If": 1} | 11 | 34 | 11 | ["sema4ai_actions_run", "str", "str", "verify_log_messages_from_decoded_str", "result.stdout.decode", "dict", "dict", "dict", "dict", "dict", "dict"] | 0 | [] | The function (test_error_in_stdout) defined within the public class called public.The function start at line 131 and ends at 164. It contains 31 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 11.0 functions, and It has 11.... |
Sema4AI_actions | public | public | 0 | 0 | test_collect_duplicated_tasks | def test_collect_duplicated_tasks(datadir, tmpdir) -> None:result = sema4ai_actions_run(["run", str(datadir / "dupe" / "dupe.py")],returncode=1,additional_env={"RC_LOG_OUTPUT_STDOUT": "1"},)assert "an action with the name 'main' was already found" in str(result.stdout.decode("utf-8")) | 1 | 9 | 2 | 53 | 1 | 167 | 175 | 167 | datadir,tmpdir | ['result'] | None | {"Assign": 1} | 4 | 9 | 4 | ["sema4ai_actions_run", "str", "str", "result.stdout.decode"] | 0 | [] | The function (test_collect_duplicated_tasks) defined within the public class called public.The function start at line 167 and ends at 175. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [167.0] and does not return any value. It declares 4.0 functions, and It ... |
Sema4AI_actions | public | public | 0 | 0 | _fix_pythonpath | def _fix_pythonpath(datadir):import sysp = str(datadir / "different_root")sys.path.append(p)yieldsys.path.remove(p) | 1 | 6 | 1 | 32 | 1 | 5 | 12 | 5 | datadir | ['p'] | None | {"Assign": 1, "Expr": 3} | 3 | 8 | 3 | ["str", "sys.path.append", "sys.path.remove"] | 0 | [] | The function (_fix_pythonpath) defined within the public class called public.The function start at line 5 and ends at 12. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions cal... |
Sema4AI_actions | public | public | 0 | 0 | test_colect_tasks_resolves_with_pythonpath | def test_colect_tasks_resolves_with_pythonpath(datadir, _fix_pythonpath):from sema4ai.actions._collect_actions import collect_actionsfrom sema4ai.actions._customization._plugin_manager import PluginManageractions = tuple(collect_actions(PluginManager(), datadir / "different_root" / "root"))assert len(actions) == 1, f"F... | 1 | 7 | 2 | 52 | 1 | 15 | 22 | 15 | datadir,_fix_pythonpath | ['actions'] | None | {"Assign": 1} | 4 | 8 | 4 | ["tuple", "collect_actions", "PluginManager", "len"] | 0 | [] | The function (test_colect_tasks_resolves_with_pythonpath) defined within the public class called public.The function start at line 15 and ends at 22. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [15.0] and does not return any value. It declares 4.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | _fix_file | def _fix_file(entry):entry["file"] = os.path.basename(entry["file"]) | 1 | 2 | 1 | 21 | 0 | 7 | 8 | 7 | entry | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["os.path.basename"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956520_asottile_reorder_python_imports.reorder_python_imports_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655760_MarcoGorelli_polars_upgrade.polars_upgrade._main_py.main", "_.content.gdrive.MyDrive.Ph... | The function (_fix_file) defined within the public class called public.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whic... |
Sema4AI_actions | public | public | 0 | 0 | test_collect_tasks_glob | def test_collect_tasks_glob(datadir, data_regression, glob_pattern):from devutils.fixtures import sema4ai_actions_runcmdline = ["list", str(datadir), "--skip-lint"]if glob_pattern:cmdline.extend(("--glob", glob_pattern))result = sema4ai_actions_run(cmdline, returncode=0, cwd=datadir)found = json.loads(result.stdout)for... | 3 | 11 | 3 | 95 | 3 | 21 | 33 | 21 | datadir,data_regression,glob_pattern | ['result', 'found', 'cmdline'] | None | {"Assign": 4, "Expr": 3, "For": 1, "If": 1} | 8 | 13 | 8 | ["str", "cmdline.extend", "sema4ai_actions_run", "json.loads", "_fix_file", "sorted", "data_regression.check", "pytest.mark.parametrize"] | 0 | [] | The function (test_collect_tasks_glob) defined within the public class called public.The function start at line 21 and ends at 33. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [21.0] and does not return any value. It declares 8.0 functions, and It has 8.0 ... |
Sema4AI_actions | public | public | 0 | 0 | test_run_tasks_glob | def test_run_tasks_glob(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runcmdline = ["run",str(datadir),"--glob","my_action.py|another_module.py","--console-colors=plain",]result = sema4ai_actions_run(cmdline, returncode=1, cwd=datadir)output = result.stdout.decode("utf-8")assert "Expected a si... | 1 | 12 | 2 | 58 | 3 | 36 | 49 | 36 | datadir,data_regression | ['result', 'cmdline', 'output'] | None | {"Assign": 3} | 3 | 14 | 3 | ["str", "sema4ai_actions_run", "result.stdout.decode"] | 0 | [] | The function (test_run_tasks_glob) defined within the public class called public.The function start at line 36 and ends at 49. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [36.0] and does not return any value. It declares 3.0 functions, and It has 3.0 func... |
Sema4AI_actions | public | public | 0 | 0 | test_run_tasks_glob_multiple_matches | def test_run_tasks_glob_multiple_matches(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runcmdline = ["run",str(datadir),"--glob","*.py|**/*.py","--console-colors=plain",]result = sema4ai_actions_run(cmdline, returncode=1, cwd=datadir)output = result.stdout.decode("utf-8")assert "Expected a sin... | 1 | 12 | 2 | 58 | 3 | 52 | 65 | 52 | datadir,data_regression | ['result', 'cmdline', 'output'] | None | {"Assign": 3} | 3 | 14 | 3 | ["str", "sema4ai_actions_run", "result.stdout.decode"] | 0 | [] | The function (test_run_tasks_glob_multiple_matches) defined within the public class called public.The function start at line 52 and ends at 65. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [52.0] and does not return any value. It declares 3.0 functions, and... |
Sema4AI_actions | public | public | 0 | 0 | test_core_log_integration_error_in_import | def test_core_log_integration_error_in_import(datadir, str_regression):import refrom robocorp.log._log_formatting import pretty_format_logs_from_log_htmlresult = sema4ai_actions_run(["run", "main_with_error_in_import.py"], returncode=1, cwd=str(datadir))decoded = result.stderr.decode("utf-8", "replace")if ("ModuleNotFo... | 3 | 26 | 2 | 148 | 4 | 9 | 41 | 9 | datadir,str_regression | ['s', 'result', 'log_target', 'decoded'] | None | {"Assign": 7, "Expr": 2, "If": 2} | 12 | 33 | 12 | ["sema4ai_actions_run", "str", "result.stderr.decode", "AssertionError", "result.stdout.decode", "log_target.exists", "pretty_format_logs_from_log_html", "re.sub", "re.sub", "str_regression.check", "webbrowser.open", "log_target.as_uri"] | 0 | [] | The function (test_core_log_integration_error_in_import) defined within the public class called public.The function start at line 9 and ends at 41. It contains 26 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [9.0] and does not return any value. It declares 12.0 functions,... |
Sema4AI_actions | public | public | 0 | 0 | test_core_log_integration_config_log | def test_core_log_integration_config_log(datadir, str_regression):from robocorp.log import verify_log_messages_from_log_htmlfrom robocorp.log._log_formatting import pretty_format_logs_from_log_htmlresult = sema4ai_actions_run(["run", "simple.py"], returncode=0, cwd=str(datadir))decoded = result.stderr.decode("utf-8", "... | 3 | 21 | 2 | 150 | 4 | 44 | 71 | 44 | datadir,str_regression | ['result', 'msgs', 'log_target', 'decoded'] | None | {"Assign": 5, "Expr": 3, "For": 1, "If": 1} | 13 | 28 | 13 | ["sema4ai_actions_run", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "log_target.exists", "str_regression.check", "pretty_format_logs_from_log_html", "verify_log_messages_from_log_html", "str", "print", "webbrowser.open", "log_target.as_uri"] | 0 | [] | The function (test_core_log_integration_config_log) defined within the public class called public.The function start at line 44 and ends at 71. It contains 21 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 13.0 functions, an... |
Sema4AI_actions | public | public | 0 | 0 | test_core_log_integration_empty_pyproject | def test_core_log_integration_empty_pyproject(datadir) -> None:pyproject: Path = datadir / "pyproject.toml"pyproject.write_text("""[tool.robocorp.log]default_library_filter_kind = "exclude"""")from robocorp.log import verify_log_messages_from_log_htmlresult = sema4ai_actions_run(["run", "simple.py"], returncode=0, cwd=... | 1 | 21 | 1 | 124 | 3 | 74 | 98 | 74 | datadir | ['result', 'log_target', 'decoded'] | None | {"AnnAssign": 1, "Assign": 4, "Expr": 2} | 8 | 25 | 8 | ["pyproject.write_text", "sema4ai_actions_run", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "log_target.exists", "verify_log_messages_from_log_html"] | 0 | [] | The function (test_core_log_integration_empty_pyproject) defined within the public class called public.The function start at line 74 and ends at 98. It contains 21 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, a... |
Sema4AI_actions | public | public | 0 | 0 | test_core_log_integration_lines | def test_core_log_integration_lines(datadir, str_regression) -> None:from robocorp.log._log_formatting import pretty_format_logs_from_log_htmlresult = sema4ai_actions_run(["run", "main_check_lines.py"], returncode=0, cwd=str(datadir))decoded = result.stdout.decode("utf-8", "replace")assert "Log (html)" in decodedlog_ta... | 1 | 14 | 2 | 84 | 3 | 101 | 118 | 101 | datadir,str_regression | ['result', 'log_target', 'decoded'] | None | {"Assign": 3, "Expr": 1} | 6 | 18 | 6 | ["sema4ai_actions_run", "str", "result.stdout.decode", "log_target.exists", "str_regression.check", "pretty_format_logs_from_log_html"] | 0 | [] | The function (test_core_log_integration_lines) defined within the public class called public.The function start at line 101 and ends at 118. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [101.0] and does not return any value. It declares 6.0 functions, and ... |
Sema4AI_actions | public | public | 0 | 0 | test_core_log_integration_console_messages | def test_core_log_integration_console_messages(datadir, str_regression, mode) -> None:pyproject: Path = datadir / "pyproject.toml"pyproject.write_text("")from robocorp.log import verify_log_messages_from_log_htmlresult = sema4ai_actions_run(["run", f"--console-colors={mode}", "simple.py"], returncode=0, cwd=str(datadir... | 1 | 28 | 3 | 142 | 3 | 128 | 159 | 128 | datadir,str_regression,mode | ['result', 'log_target', 'decoded'] | None | {"AnnAssign": 1, "Assign": 4, "Expr": 3} | 10 | 32 | 10 | ["pyproject.write_text", "sema4ai_actions_run", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "str_regression.check_until_header", "log_target.exists", "verify_log_messages_from_log_html", "pytest.mark.parametrize"] | 0 | [] | The function (test_core_log_integration_console_messages) defined within the public class called public.The function start at line 128 and ends at 159. It contains 28 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [128.0] and does not return any value. It declares 10.0 func... |
Sema4AI_actions | public | public | 0 | 0 | test_no_status_rc | def test_no_status_rc(datadir, no_error_rc) -> None:pyproject: Path = datadir / "pyproject.toml"pyproject.write_text("")from robocorp.log import verify_log_messages_from_log_htmlresult = sema4ai_actions_run(["run"]+ (["--no-status-rc"] if no_error_rc else [])+ ["--console-color=plain", "expected_error_in_action.py"],re... | 3 | 21 | 2 | 134 | 3 | 165 | 189 | 165 | datadir,no_error_rc | ['result', 'log_target', 'decoded'] | None | {"AnnAssign": 1, "Assign": 4, "Expr": 2} | 9 | 25 | 9 | ["pyproject.write_text", "sema4ai_actions_run", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "log_target.exists", "verify_log_messages_from_log_html", "pytest.mark.parametrize"] | 0 | [] | The function (test_no_status_rc) defined within the public class called public.The function start at line 165 and ends at 189. It contains 21 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [165.0] and does not return any value. It declares 9.0 functions, and It has 9.0 fun... |
Sema4AI_actions | public | public | 0 | 0 | server_socket.__init__ | def __init__(self):self.sockname = server_socket.getsockname()self.received_data = [] | 1 | 3 | 1 | 20 | 0 | 205 | 207 | 205 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (server_socket.__init__) defined within the public class called public.The function start at line 205 and ends at 207. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | server_socket.port | def port(self) -> int:return self.sockname[1] | 1 | 2 | 1 | 14 | 0 | 210 | 211 | 210 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (server_socket.port) defined within the public class called public.The function start at line 210 and ends at 211. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | server_socket.server_on_thread | def server_on_thread():client_socket, _client_address = server_socket.accept()while True:# Receive data from the clientdata = client_socket.recv(1024)# Receive up to 1024 bytes of dataif not data:breakfacade.received_data.append(data.decode("utf-8")) | 3 | 7 | 0 | 42 | 0 | 215 | 223 | 215 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (server_socket.server_on_thread) defined within the public class called public.The function start at line 215 and ends at 223. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | server_socket | def server_socket():import socketserver_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)server_address = ("localhost",0,)server_socket.bind(server_address)server_socket.listen(1)class _ServerSocketFacade:def __init__(self):self.sockname = server_socket.getsockname()self.received_data = []@propertydef port(sel... | 1 | 19 | 0 | 75 | 5 | 193 | 230 | 193 | ['t', 'server_socket', 'facade', 'server_address', 'data'] | Returns | {"Assign": 8, "Expr": 5, "If": 1, "Return": 1, "While": 1} | 11 | 38 | 11 | ["socket.socket", "server_socket.bind", "server_socket.listen", "server_socket.getsockname", "_ServerSocketFacade", "server_socket.accept", "client_socket.recv", "facade.received_data.append", "data.decode", "threading.Thread", "t.start"] | 0 | [] | The function (server_socket) defined within the public class called public.The function start at line 193 and ends at 230. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 11.0 functions, and It has 11.0 funct... | |
Sema4AI_actions | public | public | 0 | 0 | test_receive_at_socket | def test_receive_at_socket(datadir, server_socket, env_name) -> None:from robocorp.log import verify_log_messages_from_streampyproject: Path = datadir / "pyproject.toml"pyproject.write_text("")port = server_socket.portadditional_env: Dict[str, str] = {env_name: str(port)}sema4ai_actions_run(["run", "--console-color=pla... | 1 | 29 | 3 | 134 | 3 | 236 | 269 | 236 | datadir,server_socket,env_name | ['s', 'port', 'data'] | None | {"AnnAssign": 2, "Assign": 3, "Expr": 3} | 8 | 34 | 8 | ["pyproject.write_text", "str", "sema4ai_actions_run", "str", "join", "io.StringIO", "verify_log_messages_from_stream", "pytest.mark.parametrize"] | 0 | [] | The function (test_receive_at_socket) defined within the public class called public.The function start at line 236 and ends at 269. It contains 29 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [236.0] and does not return any value. It declares 8.0 functions, and It has 8.... |
Sema4AI_actions | public | public | 0 | 0 | test_output_on_change_cwd | def test_output_on_change_cwd(datadir) -> None:pyproject: Path = datadir / "pyproject.toml"pyproject.write_text("")result = sema4ai_actions_run(["run", "--console-color=plain", "change_cwd.py"],returncode=0,cwd=str(datadir),)decoded = result.stderr.decode("utf-8", "replace")assert not decoded.strip(), f"Found stderr: {... | 1 | 13 | 1 | 94 | 2 | 272 | 287 | 272 | datadir | ['result', 'decoded'] | None | {"AnnAssign": 1, "Assign": 3, "Expr": 1} | 7 | 16 | 7 | ["pyproject.write_text", "sema4ai_actions_run", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "exists"] | 0 | [] | The function (test_output_on_change_cwd) defined within the public class called public.The function start at line 272 and ends at 287. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0... |
Sema4AI_actions | public | public | 0 | 0 | test_use_robot_artifacts_env_var_for_output | def test_use_robot_artifacts_env_var_for_output(datadir, tmpdir) -> None:pyproject: Path = datadir / "pyproject.toml"pyproject.write_text("")result = sema4ai_actions_run(["run", "--console-color=plain", "simple.py"],returncode=0,cwd=str(datadir),additional_env={"ROBOT_ARTIFACTS": str(tmpdir / "output_check")},)decoded ... | 1 | 14 | 2 | 109 | 2 | 290 | 306 | 290 | datadir,tmpdir | ['result', 'decoded'] | None | {"AnnAssign": 1, "Assign": 3, "Expr": 1} | 8 | 17 | 8 | ["pyproject.write_text", "sema4ai_actions_run", "str", "str", "result.stderr.decode", "decoded.strip", "result.stdout.decode", "exists"] | 0 | [] | The function (test_use_robot_artifacts_env_var_for_output) defined within the public class called public.The function start at line 290 and ends at 306. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [290.0] and does not return any value. It declares 8.0 func... |
Sema4AI_actions | public | public | 0 | 0 | test_argparse | def test_argparse():from sema4ai.actions._args_dispatcher import _ActionsArgDispatcherarg_dispatch = _ActionsArgDispatcher()parser = arg_dispatch._create_argparser()s = io.StringIO()with redirect_stdout(s):with pytest.raises(SystemExit) as e:parser.parse_args(["--help"])assert e.value.code == 0assert "show this help me... | 1 | 44 | 0 | 259 | 4 | 7 | 56 | 7 | ['s', 'parser', 'parsed', 'arg_dispatch'] | None | {"Assign": 7, "Expr": 2, "With": 4} | 15 | 50 | 15 | ["_ActionsArgDispatcher", "arg_dispatch._create_argparser", "io.StringIO", "redirect_stdout", "pytest.raises", "parser.parse_args", "s.getvalue", "io.StringIO", "redirect_stdout", "pytest.raises", "parser.parse_args", "s.getvalue", "parser.parse_args", "parser.parse_args", "arg_dispatch.parse_args"] | 0 | [] | The function (test_argparse) defined within the public class called public.The function start at line 7 and ends at 56. It contains 44 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15.0 functions ca... | |
Sema4AI_actions | public | public | 0 | 0 | test_argparse_command_invalid | def test_argparse_command_invalid():from sema4ai.actions.cli import mains = io.StringIO()with redirect_stdout(s):assert main([], exit=False) == 1# No argumentsassert "show this help message and exit" in s.getvalue()s = io.StringIO()with redirect_stdout(s):assert main(["-h"], exit=False) == 0# Helpassert "show this help... | 1 | 14 | 0 | 113 | 1 | 59 | 75 | 59 | ['s'] | None | {"Assign": 3, "With": 3} | 12 | 17 | 12 | ["io.StringIO", "redirect_stdout", "main", "s.getvalue", "io.StringIO", "redirect_stdout", "main", "s.getvalue", "io.StringIO", "redirect_stderr", "main", "s.getvalue"] | 0 | [] | The function (test_argparse_command_invalid) defined within the public class called public.The function start at line 59 and ends at 75. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 12.0 functions, and It has ... | |
Sema4AI_actions | public | public | 0 | 0 | create_test_structure | def create_test_structure(tmpdir):"""Create a test directory structure."""temp_dir = Path(tmpdir)# Create some Python files(temp_dir / "test1.py").write_text("# test file 1")(temp_dir / "test2.py").write_text("# test file 2")# Create a subdirectory with Python filessubdir = temp_dir / "subdir"subdir.mkdir()(subdir / "t... | 2 | 23 | 1 | 127 | 4 | 8 | 40 | 8 | tmpdir | ['skip_path', 'nested', 'subdir', 'temp_dir'] | Returns | {"Assign": 4, "Expr": 9, "For": 1, "Return": 1} | 9 | 33 | 9 | ["Path", "write_text", "write_text", "subdir.mkdir", "write_text", "skip_path.mkdir", "write_text", "nested.mkdir", "write_text"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_find_action_paths_py.test_finds_all_python_files_with_default_pattern", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.t... | The function (create_test_structure) defined within the public class called public.The function start at line 8 and ends at 40. It contains 23 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 9.0 functions, It has 9.0 functio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.