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 | McpServerSetupHelper | public | 0 | 0 | _resource_template_matches | def _resource_template_matches(self, uri_template: str, uri: str) -> dict[str, Any] | None:"""Check if URI matches template and extract parameters."""# Same logic as https://github.com/modelcontextprotocol/python-sdk/blob/v1.9.4/src/mcp/server/fastmcp/resources/templates.py#L54# Convert template to regex patternpattern... | 2 | 8 | 3 | 62 | 0 | 226 | 238 | 226 | self,uri_template,uri | [] | dict[str, Any] | None | {"Assign": 2, "Expr": 1, "If": 1, "Return": 2} | 4 | 13 | 4 | ["replace", "uri_template.replace", "re.match", "match.groupdict"] | 0 | [] | The function (_resource_template_matches) defined within the public class called McpServerSetupHelper.The function start at line 226 and ends at 238. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [226.0] and does not return any value. It declares 4.0 function... |
Sema4AI_actions | McpServerSetupHelper | public | 0 | 0 | register_action | def register_action(self,func: Callable,action_package: "ActionPackage",action: "Action",display_name: str,doc_desc: str,) -> None:import jsonfrom mcp.types import ToolAnnotationsif not action.options:options = {}else:try:options = json.loads(action.options)except Exception:log.exception(f"Error parsing options for act... | 10 | 103 | 6 | 513 | 0 | 240 | 357 | 240 | self,func,action_package,action,display_name,doc_desc | [] | None | {"Assign": 17, "Expr": 5, "For": 1, "If": 6, "Try": 1} | 34 | 118 | 34 | ["json.loads", "log.exception", "options.get", "options.get", "ValueError", "self._resource_templates.append", "ResourceTemplate", "options.get", "ActionInfo", "AnyUrl", "Resource", "options.get", "options.get", "ActionInfo", "json.loads", "schema.get", "schema.get", "arguments.items", "prompt_arguments.append", "Promp... | 0 | [] | The function (register_action) defined within the public class called McpServerSetupHelper.The function start at line 240 and ends at 357. It contains 103 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [240.0] and does not return any value. It declares 34.0 functions, and ... |
Sema4AI_actions | McpServerSetupHelper | public | 0 | 0 | unregister_actions | def unregister_actions(self):self._init_state() | 1 | 2 | 1 | 10 | 0 | 359 | 360 | 359 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self._init_state"] | 0 | [] | The function (unregister_actions) defined within the public class called McpServerSetupHelper.The function start at line 359 and ends at 360. 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... |
Sema4AI_actions | McpServerSetupHelper | public | 0 | 0 | _init_state | def _init_state(self):self._tools = []self._tool_name_to_action_info = {}self._resources = {}self._resource_to_action_info = {}self._resource_templates = []self._resource_template_to_action_info = {}self._prompts = []self._prompt_name_to_action_info = {} | 1 | 9 | 1 | 53 | 0 | 362 | 373 | 362 | self | [] | None | {"Assign": 8} | 0 | 12 | 0 | [] | 0 | [] | The function (_init_state) defined within the public class called McpServerSetupHelper.The function start at line 362 and ends at 373. It contains 9 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 | _migrate_to | def _migrate_to(db: "Database", db_migration_version: int) -> None:from importlib import import_modulename = MIGRATION_ID_TO_NAME[db_migration_version]mod = import_module(f"sema4ai.action_server.migrations.migration_{name}")mod.migrate(db) | 1 | 5 | 2 | 36 | 2 | 51 | 56 | 51 | db,db_migration_version | ['mod', 'name'] | None | {"Assign": 2, "Expr": 1} | 2 | 6 | 2 | ["import_module", "mod.migrate"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.migrations.__init___py.migrate_db"] | The function (_migrate_to) defined within the public class called public.The function start at line 51 and ends at 56. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [51.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | migrate_db | def migrate_db(db_path: Union[Path, str],to_version=CURRENT_VERSION,database: Optional["Database"] = None,) -> bool:"""Returns true if the migration worked properly or if the migration was not neededand false if the migration could not be done for some reason.:param database: Expected to be passed when dealing with an ... | 6 | 43 | 3 | 230 | 8 | 59 | 124 | 59 | db_path,to_version,database | ['migration_status', 'db_migration_version', 'parent_dir', 'db', 'backup_file', 'path', 'name', 'migrations'] | bool | {"Assign": 8, "AugAssign": 1, "Expr": 7, "If": 3, "Return": 2, "While": 1, "With": 2} | 19 | 66 | 19 | ["os.path.exists", "db_migration_status", "Path", "log.info", "time.time", "log.info", "shutil.copyfile", "Database", "db.connect", "db.transaction", "db.initialize", "get_all_model_classes", "db.list_table_names", "RuntimeError", "db.all", "RuntimeError", "max", "log.info", "_migrate_to"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._command_requiring_datadir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_server_tes... | The function (migrate_db) defined within the public class called public.The function start at line 59 and ends at 124. It contains 43 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 19.0 functions, It has 19.0 functions calle... |
Sema4AI_actions | public | public | 0 | 0 | _db_migration_status | def _db_migration_status(db: "Database") -> MigrationStatus:if "migration" not in db.list_table_names():return MigrationStatus.NEEDS_MIGRATIONdb.initialize([Migration])migrations = db.all(Migration)if not migrations:# No migrations applied, do it now.return MigrationStatus.NEEDS_MIGRATIONlatest_migration_applied = max(... | 6 | 13 | 1 | 81 | 2 | 133 | 151 | 133 | db | ['latest_migration_applied', 'migrations'] | MigrationStatus | {"Assign": 2, "Expr": 1, "If": 4, "Return": 5} | 4 | 19 | 4 | ["db.list_table_names", "db.initialize", "db.all", "max"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.migrations.__init___py.db_migration_status"] | The function (_db_migration_status) defined within the public class called public.The function start at line 133 and ends at 151. It contains 13 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 4.0 functions, It has 4.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | db_migration_status | def db_migration_status(db_path: Union[Path, str]) -> MigrationStatus:from sema4ai.action_server._database import Databaseif db_path == ":memory:":raise RuntimeError("Migration support not available for in-memory database.")path = Path(db_path)if not path.exists():raise RuntimeError(f"Unable to check if migration is pe... | 3 | 14 | 1 | 83 | 2 | 154 | 171 | 154 | db_path | ['db', 'path'] | MigrationStatus | {"Assign": 2, "Expr": 2, "If": 2, "Return": 1, "With": 1} | 9 | 18 | 9 | ["RuntimeError", "Path", "path.exists", "RuntimeError", "Database", "db.connect", "log.info", "db.log_internal_info", "_db_migration_status"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._command_requiring_datadir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_serv... | The function (db_migration_status) defined within the public class called public.The function start at line 154 and ends at 171. It contains 14 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 9.0 functions, It has 9.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEdb.execute("""ALTER TABLE action ADD COLUMN enabled INTEGER CHECK(enabled IN (0, 1)) NOT NULL DEFAULT 1;""")db.insert(Migration(id=2, name=MIGRATION_ID_TO_NAME[2])) | 1 | 9 | 1 | 41 | 0 | 5 | 15 | 5 | db | [] | None | {"Expr": 2} | 3 | 11 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 15. It contains 9 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 called insi... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEdb.execute("""ALTER TABLE action ADD COLUMN managed_params_schema TEXT;""")db.insert(Migration(id=4, name=MIGRATION_ID_TO_NAME[4])) | 1 | 9 | 1 | 41 | 0 | 5 | 15 | 5 | db | [] | None | {"Expr": 2} | 3 | 11 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 15. It contains 9 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 called insi... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEdb.execute("""ALTER TABLE action ADD COLUMN options TEXT NOT NULL DEFAULT "";""")db.insert(Migration(id=5, name=MIGRATION_ID_TO_NAME[5])) | 1 | 9 | 1 | 41 | 0 | 5 | 15 | 5 | db | [] | None | {"Expr": 2} | 3 | 11 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 15. It contains 9 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 called insi... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEdb.execute("""ALTER TABLE o_auth2_user_data ADD COLUMN code_verifier TEXT NOT NULL DEFAULT "";""")db.insert(Migration(id=7, name=MIGRATION_ID_TO_NAME[7])) | 1 | 9 | 1 | 41 | 0 | 5 | 15 | 5 | db | [] | None | {"Expr": 2} | 3 | 11 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 15. It contains 9 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 called insi... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEdb.execute("""ALTER TABLE actionADD COLUMN is_consequential INTEGER;""")db.insert(Migration(id=3, name=MIGRATION_ID_TO_NAME[3])) | 1 | 9 | 1 | 41 | 0 | 5 | 15 | 5 | db | [] | None | {"Expr": 2} | 3 | 11 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 15. It contains 9 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 called insi... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEsqls = ["""ALTER TABLE run ADD COLUMN request_id TEXT NOT NULL DEFAULT '';""","""CREATE INDEX run_request_id_non_unique_index ON run(request_id);""",]for sql in sqls:db.execute(sql)db.insert(Migration(id=8, name=MIGRATION... | 2 | 13 | 1 | 54 | 1 | 5 | 19 | 5 | db | ['sqls'] | None | {"Assign": 1, "Expr": 2, "For": 1} | 3 | 15 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 19. It contains 13 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 3.0 functions, and It has 3.0 functions called ins... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:from sema4ai.action_server.migrations import MIGRATION_ID_TO_NAMEsqls = ["CREATE INDEX action_action_package_id_non_unique_index ON action(action_package_id);","CREATE INDEX run_status_non_unique_index ON run(status);","CREATE INDEX run_action_id_non_unique_index ON run(action_id);",""... | 2 | 51 | 1 | 70 | 1 | 5 | 57 | 5 | db | ['sqls'] | None | {"Assign": 1, "Expr": 2, "For": 1} | 3 | 53 | 3 | ["db.execute", "db.insert", "Migration"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 5 and ends at 57. It contains 51 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 3.0 functions, and It has 3.0 functions called ins... |
Sema4AI_actions | public | public | 0 | 0 | migrate | def migrate(db: Database) -> None:raise RuntimeError(f"""Error: It seems that this version of the database ({db.db_path}) is too old.Please erase it and recreate it from scratch.""") | 1 | 3 | 1 | 15 | 0 | 4 | 9 | 4 | db | [] | None | {} | 1 | 6 | 1 | ["RuntimeError"] | 0 | [] | The function (migrate) defined within the public class called public.The function start at line 4 and ends at 9. 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 declare 1.0 function, and It has 1.0 function called inside w... |
Sema4AI_actions | public | public | 0 | 0 | build_package | def build_package(input_dir: Path, output_dir: str, datadir: str, override: bool) -> BuildResult:"""Builds an action package.Note: The actions are imported in the datadir with :memory: databasefor validation (so it won't affect the real database but will stillbe able to use the environments from it).Args:input_dir: The... | 19 | 87 | 4 | 452 | 14 | 16 | 157 | 16 | input_dir,output_dir,datadir,override | ['args_metadata', 'metadata_file', 'exclude_handler', 'returncode', 'slugified_name', 'output_file', 'package_yaml', 'found', 'spec_version', 'package_yaml_contents', 'target_zip_name', 'name', 'packaging', 'exclude_list'] | BuildResult | {"AnnAssign": 1, "Assign": 14, "Expr": 6, "For": 1, "If": 13, "Return": 3, "Try": 2, "With": 2} | 38 | 142 | 38 | ["package_yaml.exists", "ActionServerValidationError", "open", "yaml.safe_load", "ActionServerValidationError", "package_yaml_contents.get", "ActionServerValidationError", "slugify", "Path", "output_file.exists", "ask_user_input_to_proceed", "BuildResult", "isinstance", "package_yaml_contents.get", "isinstance", "Actio... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (build_package) defined within the public class called public.The function start at line 16 and ends at 157. It contains 87 lines of code and it has a cyclomatic complexity of 19. It takes 4 parameters, represented as [16.0] and does not return any value. It declares 38.0 functions, It has 38.0 functions c... |
Sema4AI_actions | public | public | 0 | 0 | __wait_until_package_validated | def __wait_until_package_validated(organization_id: str,package_id: str,access_credentials: str,hostname: str,) -> None:from sema4ai.action_server._errors_action_server import ActionServerValidationErrorfrom sema4ai.action_server.package._package_publish import (ActionPackageEntity,get_package_status,)need_line_change ... | 7 | 47 | 4 | 197 | 3 | 30 | 85 | 30 | organization_id,package_id,access_credentials,hostname | ['need_line_change', 'package', 'last_status'] | None | {"Assign": 6, "Expr": 6, "If": 5, "While": 1} | 10 | 56 | 10 | ["ActionPackageEntity", "get_package_status", "log.info", "ActionServerValidationError", "sys.stdout.write", "sys.stdout.flush", "log.info", "log.info", "ActionServerValidationError", "time.sleep"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (__wait_until_package_validated) defined within the public class called public.The function start at line 30 and ends at 85. It contains 47 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [30.0] and does not return any value. It declares 10.0 functions, It has 1... |
Sema4AI_actions | public | public | 0 | 0 | add_package_command | def add_package_command(command_subparser, defaults):from sema4ai.action_server._cli_helpers import (add_data_args,add_json_output_args,add_login_args,add_organization_args,add_package_args,add_publish_args,add_push_package_args,add_verbose_args,)# Package handlingpackage_parser = command_subparser.add_parser("package"... | 1 | 144 | 2 | 505 | 9 | 88 | 250 | 88 | command_subparser,defaults | ['package_parser', 'build_parser', 'publish_status_parser', 'push_parser', 'extract_parser', 'changelog_parser', 'publish_parser', 'update_parser', 'package_subparsers'] | None | {"Assign": 10, "Expr": 38} | 48 | 163 | 48 | ["command_subparser.add_parser", "package_parser.add_subparsers", "package_subparsers.add_parser", "update_parser.add_argument", "update_parser.add_argument", "add_verbose_args", "package_subparsers.add_parser", "build_parser.add_argument", "build_parser.add_argument", "build_parser.add_argument", "add_data_args", "add... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._create_parser"] | The function (add_package_command) defined within the public class called public.The function start at line 88 and ends at 250. It contains 144 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [88.0] and does not return any value. It declares 48.0 functions, It has 48.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | handle_package_command | def handle_package_command(base_args: ArgumentsNamespace):from sema4ai.action_server._ask_user import ask_user_input_to_proceedfrom sema4ai.action_server._errors_action_server import ActionServerValidationErrorfrom sema4ai.action_server._storage import get_access_credentials, get_hostnamefrom sema4ai.action_server.vend... | 49 | 330 | 1 | 1,350 | 14 | 253 | 657 | 253 | base_args | ['target_dir', 'package_name', 'retcode', 'package_command', 'package', 'package_path', 'hostname', 'organizations', 'access_credentials', 'expected_org_name', 'organization_id', 'zip_filename', 'result', 'msg'] | Returns | {"AnnAssign": 10, "Assign": 30, "Expr": 34, "For": 1, "If": 29, "Return": 19, "Try": 6, "With": 2} | 107 | 405 | 107 | ["typing.cast", "log.critical", "typing.cast", "update_package", "absolute", "Path", "typing.cast", "build_package", "absolute", "Path", "sys.stdout.buffer.write", "encode", "json.dumps", "log.critical", "bold_red", "typing.cast", "os.path.exists", "log.critical", "os.path.exists", "len", "os.listdir", "os.path.realpat... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._main_retcode"] | The function (handle_package_command) defined within the public class called public.The function start at line 253 and ends at 657. It contains 330 lines of code and it has a cyclomatic complexity of 49. The function does not take any parameters, and this function return a value. It declares 107.0 functions, It has 107... |
Sema4AI_actions | DummyCondaCloud | public | 0 | 0 | is_information_cached | def is_information_cached(self) -> bool:return True | 1 | 2 | 1 | 9 | 0 | 20 | 21 | 20 | self | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_information_cached) defined within the public class called DummyCondaCloud.The function start at line 20 and ends at 21. 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 | DummyCondaCloud | public | 0 | 0 | sqlite_queries | def sqlite_queries(self) -> ISqliteQueries | None:return None | 1 | 2 | 1 | 11 | 0 | 23 | 24 | 23 | self | [] | ISqliteQueries | None | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (sqlite_queries) defined within the public class called DummyCondaCloud.The function start at line 23 and ends at 24. 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 | DummyCondaCloud | public | 0 | 0 | schedule_update | def schedule_update(self, on_finished: IOnFinished | None = None, wait=False, force=False) -> None:pass | 1 | 4 | 4 | 24 | 0 | 26 | 29 | 26 | self,on_finished,wait,force | [] | None | {} | 0 | 4 | 0 | [] | 0 | [] | The function (schedule_update) defined within the public class called DummyCondaCloud.The function start at line 26 and ends at 29. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [26.0] and does not return any value.. |
Sema4AI_actions | DummyPyPiCloud | public | 0 | 0 | get_package_data | def get_package_data(self, package_name: str) -> IPackageData | None:return None | 1 | 2 | 2 | 15 | 0 | 33 | 34 | 33 | self,package_name | [] | IPackageData | None | {"Return": 1} | 0 | 2 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.create_dejacode_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.fet... | The function (get_package_data) defined within the public class called DummyPyPiCloud.The function start at line 33 and ends at 34. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [33.0] and does not return any value. It has 4.0 functions calling this function ... |
Sema4AI_actions | DummyPyPiCloud | public | 0 | 0 | get_versions_newer_than | def get_versions_newer_than(self, package_name: str, version: Versions | VersionStr) -> list[VersionStr]:return [] | 1 | 4 | 3 | 23 | 0 | 36 | 39 | 36 | self,package_name,version | [] | list[VersionStr] | {"Return": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (get_versions_newer_than) defined within the public class called DummyPyPiCloud.The function start at line 36 and ends at 39. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [36.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | create_dummy_conda_cloud | def create_dummy_conda_cloud() -> ICondaCloud:return DummyCondaCloud() | 1 | 2 | 0 | 10 | 0 | 42 | 43 | 42 | [] | ICondaCloud | {"Return": 1} | 1 | 2 | 1 | ["DummyCondaCloud"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_metadata_py.collect_package_metadata"] | The function (create_dummy_conda_cloud) defined within the public class called public.The function start at line 42 and ends at 43. 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 c... | |
Sema4AI_actions | public | public | 0 | 0 | create_dummy_pypi_cloud | def create_dummy_pypi_cloud() -> IPyPiCloud:return DummyPyPiCloud() | 1 | 2 | 0 | 10 | 0 | 46 | 47 | 46 | [] | IPyPiCloud | {"Return": 1} | 1 | 2 | 1 | ["DummyPyPiCloud"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_metadata_py.collect_package_metadata"] | The function (create_dummy_pypi_cloud) defined within the public class called public.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. It declare 1.0 function, It has 1.0 function ca... | |
Sema4AI_actions | public | public | 0 | 0 | collect_package_metadata.on_actions_list | def on_actions_list(action_package: "ActionPackage",actions_list_result: list[ActionsListActionTypedDict],data_package_metadata: dict | None,):from sema4ai.action_server._api_action_routes import build_url_api_runfrom sema4ai.action_server.vendored_deps.ls_protocols import _DiagnosticSeverityfrom sema4ai.action_server.... | 17 | 87 | 3 | 427 | 0 | 74 | 178 | 74 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (collect_package_metadata.on_actions_list) defined within the public class called public.The function start at line 74 and ends at 178. It contains 87 lines of code and it has a cyclomatic complexity of 17. It takes 3 parameters, represented as [74.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | collect_package_metadata.collect_metadata_and_cancel_startup | def collect_metadata_and_cancel_startup(app: FastAPI) -> bool:nonlocal metadataopenapi = app.openapi()metadata["openapi.json"] = openapireturn False | 1 | 5 | 1 | 26 | 0 | 180 | 185 | 180 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (collect_package_metadata.collect_metadata_and_cancel_startup) defined within the public class called public.The function start at line 180 and ends at 185. 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 | public | public | 0 | 0 | collect_package_metadata | def collect_package_metadata(package_dir: Path, datadir: str) -> str | int:"""Args:package_dir: The directory with the action package for which thegenerated metadata is required.datadir: The datadir to be used.Returns: Either the package metadata to be printed or an error code."""from fastapi.applications import FastAP... | 5 | 28 | 2 | 189 | 15 | 50 | 202 | 50 | package_dir,datadir | ['before_start', 'args', 'analyzer', 'package_description', 'found_secrets', 'errors', 'openapi', 'returncode', 'external_endpoints', 'package_yaml', 'managed_params_schema', 'secrets', 'contents', 'package_yaml_path', 'action_package_version'] | str | int | {"AnnAssign": 3, "Assign": 24, "Expr": 6, "For": 3, "If": 14, "Return": 3, "Try": 1, "With": 1} | 37 | 153 | 37 | ["str", "args.extend", "action_info.get", "isinstance", "managed_params_schema.items", "isinstance", "v.get", "build_url_api_run", "Path", "package_yaml_path.exists", "log.info", "package_yaml_path.read_text", "yaml.safe_load", "isinstance", "ActionServerValidationError", "package_yaml.get", "str", "ActionServerValidat... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (collect_package_metadata) defined within the public class called public.The function start at line 50 and ends at 202. It contains 28 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [50.0] and does not return any value. It declares 37.0 functions, It has 37.0 f... |
Sema4AI_actions | public | public | 0 | 0 | list_organizations | def list_organizations(access_credentials: str, hostname: str) -> List[Organization]:from sema4ai.action_server._errors_action_server import ActionServerValidationErrorfrom sema4ai.action_server.package._package_publish_api import (LIST_ORGANIZATIONS_URL,request_organizations,)url = LIST_ORGANIZATIONS_URL.substitute(HO... | 5 | 24 | 2 | 119 | 5 | 35 | 64 | 35 | access_credentials,hostname | ['has_more', 'organizations_response', 'organizations', 'url', 'validated_organizations'] | List[Organization] | {"Assign": 7, "AugAssign": 1, "If": 2, "Return": 1, "While": 1} | 5 | 30 | 5 | ["LIST_ORGANIZATIONS_URL.substitute", "request_organizations", "Organization.model_validate", "org.model_dump", "ActionServerValidationError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_cloud_py.handle_list_organizations_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai... | The function (list_organizations) defined within the public class called public.The function start at line 35 and ends at 64. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [35.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | upload_package | def upload_package(organization_id: str,package_path: Path,package_name: str,access_credentials: str,hostname: str,) -> ActionPackageEntity:from sema4ai.action_server.package._package_publish_api import (create_package,get_upload_url,mark_upload_completed,upload_file,)package = create_package(organization_id, package_n... | 1 | 23 | 5 | 113 | 3 | 67 | 90 | 67 | organization_id,package_path,package_name,access_credentials,hostname | ['url', 'package', 's3_object_key'] | ActionPackageEntity | {"Assign": 3, "Expr": 2, "Return": 1} | 7 | 24 | 7 | ["create_package", "get_upload_url", "upload_file", "urlparse", "mark_upload_completed", "ActionPackageEntity.model_validate", "package.model_dump"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (upload_package) defined within the public class called public.The function start at line 67 and ends at 90. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [67.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions call... |
Sema4AI_actions | public | public | 0 | 0 | get_package_status | def get_package_status(organization_id: str, package_id: str, access_credentials: str, hostname: str) -> ActionPackageEntity:from sema4ai.action_server.package._package_publish_api import (request_package_status,)package = request_package_status(organization_id, package_id, access_credentials, hostname)return ActionPac... | 1 | 10 | 4 | 60 | 1 | 93 | 104 | 93 | organization_id,package_id,access_credentials,hostname | ['package'] | ActionPackageEntity | {"Assign": 1, "Return": 1} | 3 | 12 | 3 | ["request_package_status", "ActionPackageEntity.model_validate", "package.model_dump"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3921441_updatehub_uhu.tests.updatehub.test_updatehub_py.PackageStatusTestCase.test_raises_error_if_server_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3921441_updatehub_uhu.tests.updatehub.test_updatehub_py... | The function (get_package_status) defined within the public class called public.The function start at line 93 and ends at 104. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [93.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | update_package_changelog | def update_package_changelog(organization_id: str,package_id: str,access_credentials: str,hostname: str,changelog: str,) -> ActionPackageEntity:from sema4ai.action_server.package._package_publish_api import (request_package_changelog_update,)package = request_package_changelog_update(organization_id, package_id, access... | 1 | 14 | 5 | 67 | 1 | 107 | 122 | 107 | organization_id,package_id,access_credentials,hostname,changelog | ['package'] | ActionPackageEntity | {"Assign": 1, "Return": 1} | 3 | 16 | 3 | ["request_package_changelog_update", "ActionPackageEntity.model_validate", "package.model_dump"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (update_package_changelog) defined within the public class called public.The function start at line 107 and ends at 122. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [107.0] and does not return any value. It declares 3.0 functions, It has 3.0 f... |
Sema4AI_actions | public | public | 0 | 0 | parse_url | def parse_url(url: str) -> ParseResult:parts = urlsplit(url)normalized_path = "/".join(part for part in parts.path.split("/") if part)fixed = urlunsplit((parts.scheme, parts.netloc, normalized_path, parts.query, parts.fragment))return urlparse(fixed) | 3 | 7 | 1 | 65 | 3 | 103 | 109 | 103 | url | ['normalized_path', 'parts', 'fixed'] | ParseResult | {"Assign": 3, "Return": 1} | 5 | 7 | 5 | ["urlsplit", "join", "parts.path.split", "urlunsplit", "urlparse"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._app_py.WebSocketApp.run_forever", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._http_py._start_proxied_socket... | The function (parse_url) defined within the public class called public.The function start at line 103 and ends at 109. 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 5.0 functions, It has 5.0 functions called insi... |
Sema4AI_actions | public | public | 0 | 0 | split_access_credentials | def split_access_credentials(access_credentials: str) -> Tuple[str, str]:try:key_id, secret = access_credentials.split(":")return key_id, secretexcept ValueError as e:raise ActionServerValidationError(f"Invalid access credentials, should be in format: keyid:secret\n{e}") | 2 | 8 | 1 | 41 | 0 | 112 | 119 | 112 | access_credentials | [] | Tuple[str, str] | {"Assign": 1, "Return": 1, "Try": 1} | 2 | 8 | 2 | ["access_credentials.split", "ActionServerValidationError"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_api_py.create_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.acti... | The function (split_access_credentials) defined within the public class called public.The function start at line 112 and ends at 119. It contains 8 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 2.0 functions, It has 2.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | calculate_hmac | def calculate_hmac(payload: HMACPayload, secret: str) -> str:# Create SHA-256 hash of the bodybody = payload.body.encode("utf-8")body_hash = base64.b64encode(hashlib.sha256(body).digest()).decode("utf-8")# Prepare data stringdata = "\n".join([payload.http_method,payload.path,payload.content_type,payload.timestamp,body_... | 1 | 15 | 2 | 109 | 3 | 122 | 141 | 122 | payload,secret | ['body', 'data', 'body_hash'] | str | {"Assign": 3, "Return": 1} | 12 | 20 | 12 | ["payload.body.encode", "decode", "base64.b64encode", "digest", "hashlib.sha256", "join", "decode", "base64.b64encode", "digest", "hmac.new", "secret.encode", "data.encode"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_api_py.create_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.acti... | The function (calculate_hmac) defined within the public class called public.The function start at line 122 and ends at 141. It contains 15 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [122.0] and does not return any value. It declares 12.0 functions, It has 12.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | get_nonce | def get_nonce() -> str:return str(int(time.time() * 1000)) | 1 | 2 | 0 | 20 | 0 | 144 | 145 | 144 | [] | str | {"Return": 1} | 3 | 2 | 3 | ["str", "int", "time.time"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_api_py.create_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.acti... | The function (get_nonce) defined within the public class called public.The function start at line 144 and ends at 145. 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 declares 3.0 functions, It has 3.0 functions called insi... | |
Sema4AI_actions | public | public | 0 | 0 | create_package | def create_package(organization_id: str, name: str, access_credentials: str, hostname: str) -> ActionPackageEntityResponse:import sema4ai_httplog.debug(f"Creating action package entity: {name}")url = parse_url(CREATE_PACKAGE_URL.substitute(HOSTNAME=hostname, ORG_ID=organization_id))api_key_id, secret = split_access_cre... | 4 | 39 | 4 | 219 | 10 | 148 | 195 | 148 | organization_id,name,access_credentials,hostname | ['r', 'content', 'content_type', 'headers', 'url', 'validated_content', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | ActionPackageEntityResponse | {"Assign": 11, "Expr": 2, "If": 1, "Return": 1, "Try": 2} | 17 | 48 | 17 | ["log.debug", "parse_url", "CREATE_PACKAGE_URL.substitute", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.post", "url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError", "r.json", "ActionPackageEntityResponse.model_validate"... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.upload_package"] | The function (create_package) defined within the public class called public.The function start at line 148 and ends at 195. It contains 39 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [148.0] and does not return any value. It declares 17.0 functions, It has 17.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | get_upload_url | def get_upload_url(organization_id: str, package_id: str, access_credentials: str, hostname: str) -> str:import sema4ai_httplog.debug(f"Getting upload URL for: {package_id}")url = parse_url(UPLOAD_PACKAGE_URL.substitute(HOSTNAME=hostname, ORG_ID=organization_id, ACTION_PACKAGE_ID=package_id))api_key_id, secret = split_... | 4 | 41 | 4 | 225 | 10 | 198 | 247 | 198 | organization_id,package_id,access_credentials,hostname | ['r', 'content', 'content_type', 'headers', 'url', 'validated_content', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | str | {"Assign": 11, "Expr": 2, "If": 1, "Return": 1, "Try": 2} | 17 | 50 | 17 | ["log.debug", "parse_url", "UPLOAD_PACKAGE_URL.substitute", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.post", "url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError", "r.json", "PackageUploadResponse.model_validate", "Act... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.upload_package"] | The function (get_upload_url) defined within the public class called public.The function start at line 198 and ends at 247. It contains 41 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [198.0] and does not return any value. It declares 17.0 functions, It has 17.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | upload_file | def upload_file(url: str, pkg_path: Path) -> None:import sema4ai_httplog.debug(f"Uploading file: {pkg_path.resolve()}")with open(pkg_path, "rb") as f:r = sema4ai_http.put(url, fields=f)if r.ok():log.debug("File uploaded successfully")else:raise ActionServerValidationError(f"Failed to upload file: {r.status_code} - {r.t... | 2 | 11 | 2 | 65 | 1 | 250 | 263 | 250 | url,pkg_path | ['r'] | None | {"Assign": 1, "Expr": 2, "If": 1, "With": 1} | 7 | 14 | 7 | ["log.debug", "pkg_path.resolve", "open", "sema4ai_http.put", "r.ok", "log.debug", "ActionServerValidationError"] | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3607851_andsens_bootstrap_vz.bootstrapvz.providers.oracle.tasks.image_py.UploadImageTarball.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3650710_avinashreddy3108_paperplaneextended.userbot.modules.gdrive_py.D... | The function (upload_file) defined within the public class called public.The function start at line 250 and ends at 263. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [250.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions call... |
Sema4AI_actions | public | public | 0 | 0 | request_package_status | def request_package_status(organization_id: str, package_id: str, access_credentials: str, hostname: str) -> ActionPackageEntityResponse:import sema4ai_httplog.debug(f"Getting action package publish status: {package_id}")url = parse_url(GET_PACKAGE_URL.substitute(HOSTNAME=hostname, ORG_ID=organization_id, ACTION_PACKAG... | 4 | 41 | 4 | 216 | 10 | 266 | 315 | 266 | organization_id,package_id,access_credentials,hostname | ['r', 'content', 'content_type', 'headers', 'url', 'validated_content', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | ActionPackageEntityResponse | {"Assign": 11, "Expr": 2, "If": 1, "Return": 1, "Try": 2} | 17 | 50 | 17 | ["log.debug", "parse_url", "GET_PACKAGE_URL.substitute", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.get", "url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError", "r.json", "ActionPackageEntityResponse.model_validate", "A... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.get_package_status"] | The function (request_package_status) defined within the public class called public.The function start at line 266 and ends at 315. It contains 41 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [266.0] and does not return any value. It declares 17.0 functions, It has 17.0 f... |
Sema4AI_actions | public | public | 0 | 0 | request_organizations | def request_organizations(url: str, access_credentials: str) -> OrganizationsResponse:import sema4ai_httpparsed_url = parse_url(url)api_key_id, secret = split_access_credentials(access_credentials)nonce = get_nonce()data = json.dumps({}, separators=(",", ":"))content_type = "application/json"hmac_payload = HMACPayload(... | 4 | 34 | 2 | 186 | 10 | 318 | 360 | 318 | url,access_credentials | ['parsed_url', 'r', 'content', 'content_type', 'headers', 'validated_content', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | OrganizationsResponse | {"Assign": 11, "Expr": 1, "If": 1, "Return": 1, "Try": 2} | 15 | 43 | 15 | ["parse_url", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.get", "parsed_url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError", "r.json", "OrganizationsResponse.model_validate", "ActionServerValidationError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.list_organizations"] | The function (request_organizations) defined within the public class called public.The function start at line 318 and ends at 360. It contains 34 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [318.0] and does not return any value. It declares 15.0 functions, It has 15.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | mark_upload_completed | def mark_upload_completed(organization_id: str,package_id: str,access_credentials: str,hostname: str,s3_object_key: str,) -> None:import sema4ai_httpurl = parse_url(UPLOAD_COMPLETED_URL.substitute(HOSTNAME=hostname, ORG_ID=organization_id, ACTION_PACKAGE_ID=package_id))api_key_id, secret = split_access_credentials(acce... | 3 | 38 | 5 | 191 | 8 | 363 | 406 | 363 | organization_id,package_id,access_credentials,hostname,s3_object_key | ['r', 'content_type', 'headers', 'url', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | None | {"Assign": 9, "Expr": 1, "If": 1, "Try": 1} | 13 | 44 | 13 | ["parse_url", "UPLOAD_COMPLETED_URL.substitute", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.post", "url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.upload_package"] | The function (mark_upload_completed) defined within the public class called public.The function start at line 363 and ends at 406. It contains 38 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [363.0] and does not return any value. It declares 13.0 functions, It has 13.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | request_package_changelog_update | def request_package_changelog_update(organization_id: str,package_id: str,access_credentials: str,changelog: str,hostname: str,) -> ActionPackageEntityResponse:import sema4ai_httpurl = parse_url(UPDATE_CHANGELOG_URL.substitute(HOSTNAME=hostname, ORG_ID=organization_id, ACTION_PACKAGE_ID=package_id))api_key_id, secret =... | 4 | 44 | 5 | 221 | 10 | 409 | 461 | 409 | organization_id,package_id,access_credentials,changelog,hostname | ['r', 'content', 'content_type', 'headers', 'url', 'validated_content', 'hmac_payload', 'hmac_value', 'nonce', 'data'] | ActionPackageEntityResponse | {"Assign": 11, "Expr": 1, "If": 1, "Return": 1, "Try": 2} | 16 | 53 | 16 | ["parse_url", "UPDATE_CHANGELOG_URL.substitute", "split_access_credentials", "get_nonce", "json.dumps", "HMACPayload", "calculate_hmac", "sema4ai_http.post", "url.geturl", "ActionServerValidationError", "r.ok", "log.debug", "ActionServerValidationError", "r.json", "ActionPackageEntityResponse.model_validate", "ActionSe... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_publish_py.update_package_changelog"] | The function (request_package_changelog_update) defined within the public class called public.The function start at line 409 and ends at 461. It contains 44 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [409.0] and does not return any value. It declares 16.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | __extract_package | def __extract_package(tmpdirname: Path, package_path: Path) -> None:import zipfilelog.debug(f"Extracting {package_path} to {tmpdirname}")with zipfile.ZipFile(package_path, "r") as zip_ref:zip_ref.extractall(tmpdirname) | 1 | 5 | 2 | 40 | 0 | 8 | 14 | 8 | tmpdirname,package_path | [] | None | {"Expr": 2, "With": 1} | 3 | 7 | 3 | ["log.debug", "zipfile.ZipFile", "zip_ref.extractall"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_reader_py.read_package_name"] | The function (__extract_package) 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 1. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions call... |
Sema4AI_actions | public | public | 0 | 0 | read_package_name | def read_package_name(package_path: Path) -> str:"""Reading package content and extracting the name.Arguments:Verified path to built action package (.zip) fileReturns:Name of the package in the package.yaml"""import yamlfrom sema4ai.action_server._errors_action_server import ActionServerValidationErrorwith tempfile.Tem... | 5 | 24 | 1 | 120 | 3 | 17 | 54 | 17 | package_path | ['package_yaml_contents', 'package_yaml_path', 'name'] | str | {"Assign": 3, "Expr": 2, "If": 3, "Return": 1, "Try": 1, "With": 2} | 12 | 38 | 12 | ["tempfile.TemporaryDirectory", "__extract_package", "Path", "Path", "package_yaml_path.exists", "ActionServerValidationError", "open", "yaml.safe_load", "ActionServerValidationError", "isinstance", "package_yaml_contents.get", "ActionServerValidationError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package._package_build_cli_py.handle_package_command"] | The function (read_package_name) defined within the public class called public.The function start at line 17 and ends at 54. It contains 24 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 12.0 functions, It has 12.0 functions ca... |
Sema4AI_actions | PackageExcludeHandler | public | 0 | 0 | __init__ | def __init__(self) -> None:self.exclude_patterns: list[str] = [] | 1 | 2 | 1 | 18 | 0 | 13 | 14 | 13 | self | [] | None | {"AnnAssign": 1} | 0 | 2 | 0 | [] | 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 public class called PackageExcludeHandler.The function start at line 13 and ends at 14. 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 6243.0 functions calling this function w... |
Sema4AI_actions | PackageExcludeHandler | public | 0 | 0 | fill_exclude_patterns | def fill_exclude_patterns(self, exclude_list: Any) -> None:"""Args:exclude_list: List of strings with exclude patterns.Note that we accept "Any" because the validation is donein this function (as it usually comes from the package.yaml fileand thus is untrusted at this point)."""from sema4ai.action_server._errors_action... | 8 | 21 | 2 | 111 | 0 | 16 | 53 | 16 | self,exclude_list | [] | None | {"Assign": 3, "Expr": 2, "For": 1, "If": 6} | 9 | 38 | 9 | ["isinstance", "ActionServerValidationError", "isinstance", "ActionServerValidationError", "type", "pat.startswith", "pat.startswith", "pat.startswith", "self.exclude_patterns.append"] | 0 | [] | The function (fill_exclude_patterns) defined within the public class called PackageExcludeHandler.The function start at line 16 and ends at 53. It contains 21 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [16.0] and does not return any value. It declares 9.0 functions, and... |
Sema4AI_actions | PackageExcludeHandler | public | 0 | 0 | collect_files_excluding_patterns | def collect_files_excluding_patterns(self, root_dir: Path) -> Iterator[tuple[Path, str]]:"""Collects all files within a directory, excluding those that match any of thespecified exclusion patterns."""return _collect_files_excluding_patterns(root_dir, self.exclude_patterns) | 1 | 4 | 2 | 29 | 0 | 55 | 62 | 55 | self,root_dir | [] | Iterator[tuple[Path, str]] | {"Expr": 1, "Return": 1} | 1 | 8 | 1 | ["_collect_files_excluding_patterns"] | 0 | [] | The function (collect_files_excluding_patterns) defined within the public class called PackageExcludeHandler.The function start at line 55 and ends at 62. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [55.0] and does not return any value. It declare 1.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | _check_matches | def _check_matches(patterns, paths):if not patterns and not paths:# Matched to the end.return Trueif (not patterns and paths) or (patterns and not paths):return Falsepattern = patterns[0]path = paths[0]if not glob.has_magic(pattern):if pattern != path:return Falseelif pattern == "**":if len(patterns) == 1:return True# ... | 14 | 19 | 2 | 133 | 2 | 65 | 94 | 65 | patterns,paths | ['pattern', 'path'] | Returns | {"Assign": 2, "For": 1, "If": 8, "Return": 7} | 7 | 30 | 7 | ["glob.has_magic", "len", "range", "len", "_check_matches", "fnmatch.fnmatch", "_check_matches"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package.package_exclude_py._check_matches", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_se... | The function (_check_matches) defined within the public class called public.The function start at line 65 and ends at 94. It contains 19 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [65.0], and this function return a value. It declares 7.0 functions, It has 7.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | _glob_matches_path | def _glob_matches_path(path, pattern, sep=os.sep, altsep=os.altsep):if altsep:pattern = pattern.replace(altsep, sep)path = path.replace(altsep, sep)patterns = pattern.split(sep)paths = path.split(sep)if paths:if paths[0] == "":paths = paths[1:]if patterns:if patterns[0] == "":patterns = patterns[1:]return _check_matche... | 6 | 13 | 4 | 101 | 4 | 97 | 111 | 97 | path,pattern,sep,altsep | ['patterns', 'pattern', 'path', 'paths'] | Returns | {"Assign": 6, "If": 5, "Return": 1} | 5 | 15 | 5 | ["pattern.replace", "path.replace", "pattern.split", "path.split", "_check_matches"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package.package_exclude_py._collect_files_excluding_patterns", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema... | The function (_glob_matches_path) defined within the public class called public.The function start at line 97 and ends at 111. It contains 13 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [97.0], and this function return a value. It declares 5.0 functions, It has 5.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | _collect_files_excluding_patterns | def _collect_files_excluding_patterns(root_dir: Path, exclusion_patterns: list[str]) -> Iterator[tuple[Path, str]]:"""Collects all files within a directory, excluding those that match any of thespecified exclusion patterns.Args:root_dir (str): The root directory to traverse.exclusion_patterns (list): A list of fnmatch ... | 6 | 13 | 2 | 80 | 2 | 114 | 140 | 114 | root_dir,exclusion_patterns | ['add', 'relative_path_str'] | Iterator[tuple[Path, str]] | {"Assign": 3, "Expr": 2, "For": 2, "If": 3} | 5 | 27 | 5 | ["root_dir.rglob", "path.is_file", "str", "path.relative_to", "_glob_matches_path"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package.package_exclude_py.PackageExcludeHandler.collect_files_excluding_patterns"] | The function (_collect_files_excluding_patterns) defined within the public class called public.The function start at line 114 and ends at 140. It contains 13 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [114.0] and does not return any value. It declares 5.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | gen_self_signed_certificate | def gen_self_signed_certificate() -> tuple[bytes, bytes]:"""Provides a key-pair suitable to be used as a self-signed certificate (in PEMformat).Returns:Returns a tuple with the bytes for the public and private key generated."""import datetimeimport socketfrom cryptography import x509from cryptography.hazmat.primitives ... | 2 | 51 | 0 | 359 | 7 | 1 | 65 | 1 | ['certificate', 'cn_name', 'builder', 'hostname', 'one_day', 'private_key', 'public_key'] | tuple[bytes, bytes] | {"Assign": 16, "Expr": 1, "If": 1, "Return": 1} | 34 | 65 | 34 | ["datetime.timedelta", "rsa.generate_private_key", "private_key.public_key", "socket.gethostname", "len", "x509.CertificateBuilder", "builder.subject_name", "x509.Name", "x509.NameAttribute", "builder.issuer_name", "x509.Name", "x509.NameAttribute", "builder.not_valid_before", "datetime.datetime.today", "builder.not_va... | 0 | [] | The function (gen_self_signed_certificate) defined within the public class called public.The function start at line 1 and ends at 65. It contains 51 lines of code and it has a cyclomatic complexity of 2. It take 0 parameter, represented as [1.0] and does not return any value. It declares 34.0 functions, and It has 34.... | |
Sema4AI_actions | OAuth2ProviderSettings | public | 0 | 0 | model_dump | def model_dump(self) -> dict:import copyret = {}for field_name, field_info in self.__class__.__dataclass_fields__.items():value = getattr(self, field_name)field_type = field_info.typeif field_type == str:ret[field_name] = valueelse:ret[field_name] = copy.copy(value)return ret | 3 | 11 | 1 | 67 | 0 | 22 | 35 | 22 | self | [] | dict | {"Assign": 5, "For": 1, "If": 1, "Return": 1} | 3 | 14 | 3 | ["self.__class__.__dataclass_fields__.items", "getattr", "copy.copy"] | 28 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3690807_ethereum_eth_utils.tests.core.pydantic_utils.test_camel_model_py.test_camel_model_dump", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manifest.mo... | The function (model_dump) defined within the public class called OAuth2ProviderSettings.The function start at line 22 and ends at 35. It contains 11 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, It has 3.0 funct... |
Sema4AI_actions | OAuth2ProviderSettings | public | 0 | 0 | model_validate | def model_validate(cls, dct):try:settings = cls(**dct)except Exception as e:raise RuntimeError(f"Invalid OAuth2 settings. Original error: {str(e)}")for field_name, field_info in cls.__dataclass_fields__.items():field_type = field_info.typevalue = getattr(settings, field_name)if field_name in ("authParams", "additionalH... | 10 | 30 | 2 | 141 | 0 | 38 | 72 | 38 | cls,dct | [] | Returns | {"Assign": 3, "For": 2, "If": 6, "Return": 1, "Try": 1} | 16 | 35 | 16 | ["cls", "RuntimeError", "str", "cls.__dataclass_fields__.items", "getattr", "isinstance", "TypeError", "type", "value.items", "isinstance", "TypeError", "isinstance", "TypeError", "isinstance", "TypeError", "type"] | 16 | ["_.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.action_server.tests.action_server_t... | The function (model_validate) defined within the public class called OAuth2ProviderSettings.The function start at line 38 and ends at 72. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [38.0], and this function return a value. It declares 16.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | get_oauthlib2_user_settings | def get_oauthlib2_user_settings(oauth2_settings_file: str,) -> dict[str, Any]:"""Provides the global settings for doing an OAuth2 authentication(should be a mapping of provider->provider info)."""import yamlp = Path(oauth2_settings_file)if not p.exists():raise RuntimeError(f"Unable to make OAuth2 login because the oaut... | 4 | 21 | 1 | 86 | 2 | 127 | 155 | 127 | oauth2_settings_file | ['contents', 'p'] | dict[str, Any] | {"Assign": 2, "Expr": 1, "If": 2, "Return": 1, "Try": 1, "With": 1} | 8 | 29 | 8 | ["Path", "p.exists", "RuntimeError", "p.open", "yaml.safe_load", "RuntimeError", "isinstance", "RuntimeError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py.get_oauthlib2_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.s... | The function (get_oauthlib2_user_settings) defined within the public class called public.The function start at line 127 and ends at 155. It contains 21 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | _get_oauthlib2_sema4ai_settings | def _get_oauthlib2_sema4ai_settings(provider: str) -> dict:import yamlfrom .._oauth2 import get_sema4ai_provided_oauth2_configcontents = get_sema4ai_provided_oauth2_config()dct = yaml.safe_load(contents)if not isinstance(dct, dict):raise RuntimeError("Expected the Sema4.ai oauth2 config to be a yaml.")oauth2_config = _... | 4 | 17 | 1 | 95 | 5 | 158 | 180 | 158 | provider | ['providers', 'settings', 'contents', 'dct', 'oauth2_config'] | dict | {"Assign": 5, "If": 3, "Return": 1} | 10 | 23 | 10 | ["get_sema4ai_provided_oauth2_config", "yaml.safe_load", "isinstance", "RuntimeError", "_require", "_require", "providers.get", "RuntimeError", "isinstance", "RuntimeError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py.get_oauthlib2_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.s... | The function (_get_oauthlib2_sema4ai_settings) defined within the public class called public.The function start at line 158 and ends at 180. It contains 17 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 1... |
Sema4AI_actions | public | public | 0 | 0 | _require | def _require(key: str, dct: dict) -> Any:found = dct.get(key, None)if found is None:raise RuntimeError(f"Expected '{key}' to be in Oauth2 settings.")return found | 2 | 5 | 2 | 36 | 1 | 183 | 187 | 183 | key,dct | ['found'] | Any | {"Assign": 1, "If": 1, "Return": 1} | 2 | 5 | 2 | ["dct.get", "RuntimeError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py._get_oauthlib2_sema4ai_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_serve... | The function (_require) defined within the public class called public.The function start at line 183 and ends at 187. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [183.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | get_oauthlib2_provider_settings | def get_oauthlib2_provider_settings(provider: str, oauth2_settings_file: str) -> OAuth2ProviderSettingsResolved:"""Gets the OAuth2 settings to be used for a given provider."""contents = get_oauthlib2_user_settings(oauth2_settings_file)oauth2_config = _require("oauth2Config", contents)providers = _require("providers", o... | 14 | 54 | 2 | 253 | 10 | 190 | 269 | 190 | provider,oauth2_settings_file | ['default_settings', 'providers', 'use_server', 'mode', 'settings', 'as_dict', 'ret', 'value', 'contents', 'oauth2_config'] | OAuth2ProviderSettingsResolved | {"Assign": 14, "Expr": 2, "For": 1, "If": 12, "Return": 1} | 23 | 80 | 23 | ["get_oauthlib2_user_settings", "_require", "_require", "providers.get", "RuntimeError", "isinstance", "RuntimeError", "settings.get", "RuntimeError", "RuntimeError", "_get_oauthlib2_sema4ai_settings", "RuntimeError", "_DEFAULT_OAUTH2_SETTINGS.get", "OAuth2ProviderSettings", "_deep_update", "default_settings.model_dump... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._api_oauth2_py.get_resolved_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_serv... | The function (get_oauthlib2_provider_settings) defined within the public class called public.The function start at line 190 and ends at 269. It contains 54 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [190.0] and does not return any value. It declares 23.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | _deep_update | def _deep_update(dict1: dict, dict2: dict) -> dict:"""Merges two dictionaries recursively.Returns:A new dictionary with the merged content."""merged = dict1.copy()for key, value in dict2.items():if key in dict1:if isinstance(value, dict) and isinstance(dict1[key], dict):merged[key] = _deep_update(dict1[key], value)else... | 5 | 11 | 2 | 87 | 1 | 272 | 288 | 272 | dict1,dict2 | ['merged'] | dict | {"Assign": 4, "Expr": 1, "For": 1, "If": 2, "Return": 1} | 5 | 17 | 5 | ["dict1.copy", "dict2.items", "isinstance", "isinstance", "_deep_update"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py._deep_update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.actio... | The function (_deep_update) defined within the public class called public.The function start at line 272 and ends at 288. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [272.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions cal... |
Sema4AI_actions | _RedirectWSGIApp | protected | 0 | 0 | __init__ | def __init__(self, success_message: str):"""Args:success_message: The message to display in the web browserthe authorization flow is complete."""self.last_request_uri: str | None = Noneself.last_body: str | None = Noneself.last_headers: Optional[dict[str, str]] = Noneself._success_message = success_message | 1 | 5 | 2 | 48 | 0 | 27 | 36 | 27 | self,success_message | [] | None | {"AnnAssign": 3, "Assign": 1, "Expr": 1} | 0 | 10 | 0 | [] | 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 _RedirectWSGIApp.The function start at line 27 and ends at 36. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [27.0] and does not return any value. It has 6243.0 functions calling this function ... |
Sema4AI_actions | _RedirectWSGIApp | protected | 0 | 0 | __call__ | def __call__(self, environ: dict[str, Any], start_response: Callable[[str, list], Any]) -> list[bytes]:"""Store the requested uri and return a text message.Args:environ: The WSGI environment.start_response: Callable to provide response headers.Returns:The response body."""headers = {}for header, value in environ.items(... | 5 | 35 | 3 | 191 | 0 | 38 | 87 | 38 | self,environ,start_response | [] | list[bytes] | {"Assign": 8, "Expr": 3, "For": 1, "If": 2, "Return": 2, "Try": 1} | 12 | 50 | 12 | ["environ.items", "header.startswith", "lower", "replace", "int", "environ.get", "decode", "read", "start_response", "start_response", "wsgiref.util.request_uri", "self._success_message.encode"] | 50 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p... | The function (__call__) defined within the protected class called _RedirectWSGIApp.The function start at line 38 and ends at 87. It contains 35 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [38.0] and does not return any value. It declares 12.0 functions, It has 12.0 funct... |
Sema4AI_actions | _WSGIRequestHandler | protected | 0 | 1 | log_message | def log_message(self, fmt, *args):pass# No need to log anything. | 1 | 2 | 3 | 11 | 0 | 91 | 92 | 91 | self,fmt,*args | [] | None | {} | 0 | 2 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.sql_base_py.SQLInterface.upsert_table_helper"] | The function (log_message) defined within the protected class called _WSGIRequestHandler, that inherit another class.The function start at line 91 and ends at 92. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [91.0] and does not return any value. It has 1.0 f... |
Sema4AI_actions | public | public | 0 | 0 | _wrap_socket | def _wrap_socket(sock,keyfile=None,certfile=None,):"""Converts a regular socket into as SSL socket."""from ssl import SSLContextif keyfile and not certfile:raise ValueError("certfile must be specified")context = SSLContext(ssl.PROTOCOL_TLS_SERVER)context.verify_mode = ssl.VerifyMode.CERT_NONEif certfile:context.load_ce... | 4 | 18 | 3 | 80 | 1 | 95 | 116 | 95 | sock,keyfile,certfile | ['context'] | Returns | {"Assign": 2, "Expr": 2, "If": 2, "Return": 1} | 4 | 22 | 4 | ["ValueError", "SSLContext", "context.load_cert_chain", "context.wrap_socket"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.url_callback_server_py._start_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.... | The function (_wrap_socket) defined within the public class called public.The function start at line 95 and ends at 116. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [95.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions c... |
Sema4AI_actions | public | public | 0 | 0 | _get_action_server_user_sema4_path | def _get_action_server_user_sema4_path() -> Path:"""Note: use the same folder as the action server (to reuse the certificatethat was generated there if available)."""if sys.platform == "win32":localappdata = os.environ.get("LOCALAPPDATA")if not localappdata:raise RuntimeError("Error. LOCALAPPDATA not defined in environ... | 3 | 11 | 0 | 72 | 3 | 120 | 136 | 120 | ['user_sema4_path', 'home', 'localappdata'] | Path | {"Assign": 4, "Expr": 2, "If": 2, "Return": 1} | 6 | 17 | 6 | ["os.environ.get", "RuntimeError", "Path", "expanduser", "Path", "user_sema4_path.mkdir"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.url_callback_server_py._start_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.... | The function (_get_action_server_user_sema4_path) defined within the public class called public.The function start at line 120 and ends at 136. It contains 11 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, It has... | |
Sema4AI_actions | public | public | 0 | 0 | _start_server | def _start_server(host: str = "localhost",port: int = 4444,*,use_https: bool = False,ssl_self_signed: bool = False,ssl_keyfile: str | None = None,ssl_certfile: str | None = None,show_message: str = "Ok, it worked.",) -> tuple[WSGIServer, _RedirectWSGIApp, str]:"""Args:keyfile:Required if SSL is required.certfile:Requir... | 11 | 50 | 7 | 244 | 11 | 139 | 214 | 139 | host,port,use_https,ssl_self_signed,ssl_keyfile,ssl_certfile,show_message | ['protocol', 'address', 'public_path', 'ssl_certfile', 'sockname', 'user_path', 'wsgi_app', 'local_server', 'ssl_keyfile', 'KEY_FILE_PERMISSIONS', 'private_path'] | tuple[WSGIServer, _RedirectWSGIApp, str] | {"Assign": 14, "Expr": 4, "If": 6, "Return": 1} | 13 | 76 | 13 | ["_RedirectWSGIApp", "wsgiref.simple_server.make_server", "RuntimeError", "RuntimeError", "_get_action_server_user_sema4_path", "gen_certificate.gen_self_signed_certificate", "public_path.write_bytes", "private_path.write_bytes", "private_path.chmod", "str", "str", "_wrap_socket", "local_server.socket.getsockname"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.url_callback_server_py.start_server_in_thread", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4a... | The function (_start_server) defined within the public class called public.The function start at line 139 and ends at 214. It contains 50 lines of code and it has a cyclomatic complexity of 11. It takes 7 parameters, represented as [139.0] and does not return any value. It declares 13.0 functions, It has 13.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | start_server_in_thread.start_server_in_thread.method.on_done | def on_done(*args, **kwargs):# Close when done (either cancelled or in regular flow)local_server.server_close() | 1 | 2 | 2 | 14 | 0 | 243 | 245 | 243 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (start_server_in_thread.start_server_in_thread.method.on_done) defined within the public class called public.The function start at line 243 and ends at 245. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [243.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | start_server_in_thread.method | def method() -> None:try:# Start the serverlocal_server, app, address = _start_server(**kwargs)fut_provide_callback_address.set_result(address)def on_done(*args, **kwargs):# Close when done (either cancelled or in regular flow)local_server.server_close()fut_provide_uri.add_done_callback(on_done)local_server.handle_requ... | 9 | 27 | 0 | 132 | 0 | 237 | 271 | 237 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (start_server_in_thread.method) defined within the public class called public.The function start at line 237 and ends at 271. It contains 27 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | start_server_in_thread | def start_server_in_thread(**kwargs,) -> tuple[Future[LastRequestInfoTypedDict], Future[str]]:"""Calls `_start_server` with the passed args in a thread and returnsa future which returns the last uri accessed.If the returned `Future` is cancelled, the server is also closed."""import threadingfut_provide_uri: Future[Last... | 1 | 10 | 1 | 72 | 1 | 223 | 275 | 223 | **kwargs | ['t'] | tuple[Future[LastRequestInfoTypedDict], Future[str]] | {"AnnAssign": 3, "Assign": 2, "Expr": 10, "If": 3, "Return": 1, "Try": 2} | 16 | 53 | 16 | ["Future", "Future", "_start_server", "fut_provide_callback_address.set_result", "local_server.server_close", "fut_provide_uri.add_done_callback", "local_server.handle_request", "fut_provide_uri.cancelled", "fut_provide_uri.set_result", "fut_provide_uri.set_exception", "RuntimeError", "fut_provide_uri.cancelled", "fut_... | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_server_tests.test_oauth2_py.manual_test_oauth2_action_server_ui", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action... | The function (start_server_in_thread) defined within the public class called public.The function start at line 223 and ends at 275. It contains 10 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 16.0 functions, It has 16.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | create_range_from_location | def create_range_from_location(start_line: int,start_col: int,end_line: int | None = None,end_col: int | None = None,) -> _RangeTypedDict:"""If the end_line and end_col aren't passed we considerthat the location should go up until the end of the line."""if end_line is None:assert end_col is Noneend_line = start_line + ... | 2 | 22 | 4 | 87 | 2 | 6 | 31 | 6 | start_line,start_col,end_line,end_col | ['end_line', 'end_col'] | _RangeTypedDict | {"AnnAssign": 1, "Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 0 | 26 | 0 | [] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.BaseAnalyzer._load_yaml_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_se... | The function (create_range_from_location) defined within the public class called public.The function start at line 6 and ends at 31. It contains 22 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [6.0] and does not return any value. It has 14.0 functions calling this functio... |
Sema4AI_actions | str_with_location | public | 0 | 1 | scalar | def scalar(self):return self | 1 | 2 | 1 | 7 | 0 | 39 | 40 | 39 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3654448_hasgeek_lastuser.lastuser_ui.views.dashboard_py.dashboard", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695233_trigger_trigger.trigger.packages.peewee_py.SelectQuery.aggregate", "_.content.gdrive.MyDrive.... | The function (scalar) defined within the public class called str_with_location, that inherit another class.The function start at line 39 and ends at 40. It contains 2 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 has 43.0 functions... |
Sema4AI_actions | str_with_location | public | 0 | 1 | as_range | def as_range(self) -> _RangeTypedDict:assert self.locationstart_line, start_col, end_line, end_col = self.locationreturn create_range_from_location(start_line, start_col, end_line, end_col) | 1 | 4 | 1 | 33 | 0 | 42 | 45 | 42 | self | [] | _RangeTypedDict | {"Assign": 1, "Return": 1} | 1 | 4 | 1 | ["create_range_from_location"] | 0 | [] | The function (as_range) defined within the public class called str_with_location, that inherit another class.The function start at line 42 and ends at 45. 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... |
Sema4AI_actions | str_with_location_capture | public | 0 | 1 | __eq__ | def __eq__(self, value: object) -> bool:equals = str.__eq__(self, value)if equals and hasattr(value, "location"):self.location = value.locationreturn equals | 3 | 5 | 2 | 40 | 0 | 59 | 63 | 59 | self,value | [] | bool | {"Assign": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["str.__eq__", "hasattr"] | 48 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rdataset_py.Rdataset.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rrset_py.RRset.__eq__", "_.content.gdrive... | The function (__eq__) defined within the public class called str_with_location_capture, that inherit another class.The function start at line 59 and ends at 63. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [59.0] and does not return any value. It declares 2.... |
Sema4AI_actions | str_with_location_capture | public | 0 | 1 | __hash__ | def __hash__(self) -> int:return str.__hash__(self) | 1 | 2 | 1 | 14 | 0 | 65 | 66 | 65 | self | [] | int | {"Return": 1} | 1 | 2 | 1 | ["str.__hash__"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.json_schema_py.Cachable.__hash__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955243_msiemens_tinydb.tinydb.queries_py.Query.__hash__", "_.content.gdrive.MyDri... | The function (__hash__) defined within the public class called str_with_location_capture, that inherit another class.The function start at line 65 and ends at 66. 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 ... |
Sema4AI_actions | str_with_location | public | 0 | 1 | scalar | def scalar(self):return self | 1 | 2 | 1 | 7 | 0 | 74 | 75 | 39 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3654448_hasgeek_lastuser.lastuser_ui.views.dashboard_py.dashboard", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695233_trigger_trigger.trigger.packages.peewee_py.SelectQuery.aggregate", "_.content.gdrive.MyDrive.... | The function (scalar) defined within the public class called str_with_location, that inherit another class.The function start at line 74 and ends at 75. It contains 2 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 has 43.0 functions... |
Sema4AI_actions | str_with_location | public | 0 | 1 | as_range | def as_range(self) -> _RangeTypedDict:assert self.locationstart_line, start_col, end_line, end_col = self.locationreturn create_range_from_location(start_line, start_col, end_line, end_col) | 1 | 4 | 1 | 33 | 0 | 77 | 80 | 42 | self | [] | _RangeTypedDict | {"Assign": 1, "Return": 1} | 1 | 4 | 1 | ["create_range_from_location"] | 0 | [] | The function (as_range) defined within the public class called str_with_location, that inherit another class.The function start at line 77 and ends at 80. 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... |
Sema4AI_actions | str_with_location | public | 0 | 1 | as_range | def as_range(self) -> _RangeTypedDict:assert self.locationstart_line, start_col, end_line, end_col = self.locationreturn create_range_from_location(start_line, start_col, end_line, end_col) | 1 | 4 | 1 | 33 | 0 | 87 | 90 | 42 | self | [] | _RangeTypedDict | {"Assign": 1, "Return": 1} | 1 | 4 | 1 | ["create_range_from_location"] | 0 | [] | The function (as_range) defined within the public class called str_with_location, that inherit another class.The function start at line 87 and ends at 90. 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... |
Sema4AI_actions | str_with_location | public | 0 | 1 | as_range | def as_range(self) -> _RangeTypedDict:assert self.locationstart_line, start_col, end_line, end_col = self.locationreturn create_range_from_location(start_line, start_col, end_line, end_col) | 1 | 4 | 1 | 33 | 0 | 97 | 100 | 42 | self | [] | _RangeTypedDict | {"Assign": 1, "Return": 1} | 1 | 4 | 1 | ["create_range_from_location"] | 0 | [] | The function (as_range) defined within the public class called str_with_location, that inherit another class.The function start at line 97 and ends at 100. 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 | LoaderWithLines | public | 0 | 1 | __init__ | def __init__(self, stream):yaml.SafeLoader.__init__(self, stream)self.add_constructor("tag:yaml.org,2002:int", LoaderWithLines.construct_yaml_int)self.add_constructor("tag:yaml.org,2002:str", LoaderWithLines.construct_yaml_str)self.add_constructor("tag:yaml.org,2002:map", LoaderWithLines.construct_yaml_map)self.add_con... | 1 | 14 | 2 | 57 | 0 | 104 | 117 | 104 | self,stream | [] | None | {"Expr": 5} | 5 | 14 | 5 | ["yaml.SafeLoader.__init__", "self.add_constructor", "self.add_constructor", "self.add_constructor", "self.add_constructor"] | 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 public class called LoaderWithLines, that inherit another class.The function start at line 104 and ends at 117. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [104.0] and does not return any value. It declares 5.0 fu... |
Sema4AI_actions | LoaderWithLines | public | 0 | 1 | construct_yaml_float | def construct_yaml_float(self, node, *args, **kwargs):scalar = yaml.SafeLoader.construct_yaml_float(self, node, *args, **kwargs)ret = float_with_location(scalar)ret.location = (node.start_mark.line,node.start_mark.column,node.end_mark.line,node.end_mark.column,)return ret | 1 | 10 | 4 | 69 | 0 | 119 | 128 | 119 | self,node,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1} | 2 | 10 | 2 | ["yaml.SafeLoader.construct_yaml_float", "float_with_location"] | 0 | [] | The function (construct_yaml_float) defined within the public class called LoaderWithLines, that inherit another class.The function start at line 119 and ends at 128. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [119.0], and this function return a value. It... |
Sema4AI_actions | LoaderWithLines | public | 0 | 1 | construct_yaml_map | def construct_yaml_map(self, node, *args, **kwargs):(obj,) = yaml.SafeLoader.construct_yaml_map(self, node, *args, **kwargs)ret = dict_with_location(obj)ret.location = (node.start_mark.line,node.start_mark.column,node.end_mark.line,node.end_mark.column,)return ret | 1 | 10 | 4 | 72 | 0 | 130 | 139 | 130 | self,node,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1} | 2 | 10 | 2 | ["yaml.SafeLoader.construct_yaml_map", "dict_with_location"] | 0 | [] | The function (construct_yaml_map) defined within the public class called LoaderWithLines, that inherit another class.The function start at line 130 and ends at 139. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [130.0], and this function return a value. It d... |
Sema4AI_actions | LoaderWithLines | public | 0 | 1 | construct_yaml_int | def construct_yaml_int(self, node, *args, **kwargs):scalar = yaml.SafeLoader.construct_yaml_int(self, node, *args, **kwargs)ret = int_with_location(scalar)ret.location = (node.start_mark.line,node.start_mark.column,node.end_mark.line,node.end_mark.column,)return ret | 1 | 10 | 4 | 69 | 0 | 141 | 150 | 141 | self,node,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1} | 2 | 10 | 2 | ["yaml.SafeLoader.construct_yaml_int", "int_with_location"] | 0 | [] | The function (construct_yaml_int) defined within the public class called LoaderWithLines, that inherit another class.The function start at line 141 and ends at 150. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [141.0], and this function return a value. It d... |
Sema4AI_actions | LoaderWithLines | public | 0 | 1 | construct_yaml_str | def construct_yaml_str(self, node, *args, **kwargs):scalar = yaml.SafeLoader.construct_scalar(self, node, *args, **kwargs)ret = str_with_location(scalar)ret.location = (node.start_mark.line,node.start_mark.column,node.end_mark.line,node.end_mark.column,)return ret | 1 | 10 | 4 | 69 | 0 | 152 | 161 | 152 | self,node,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1} | 2 | 10 | 2 | ["yaml.SafeLoader.construct_scalar", "str_with_location"] | 0 | [] | The function (construct_yaml_str) defined within the public class called LoaderWithLines, that inherit another class.The function start at line 152 and ends at 161. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [152.0], and this function return a value. It d... |
Sema4AI_actions | LoaderWithLines | public | 0 | 1 | __init__ | def __init__(self, line: int = 0, character: int = 0):self.line: int = lineself.character: int = character | 1 | 3 | 3 | 31 | 0 | 165 | 167 | 165 | self,stream | [] | None | {"Expr": 5} | 5 | 14 | 5 | ["yaml.SafeLoader.__init__", "self.add_constructor", "self.add_constructor", "self.add_constructor", "self.add_constructor"] | 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 public class called LoaderWithLines, that inherit another class.The function start at line 165 and ends at 167. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [165.0] and does not return any value. It declares 5.0 fun... |
Sema4AI_actions | _Position | protected | 0 | 0 | to_dict | def to_dict(self):return {"line": self.line, "character": self.character} | 1 | 2 | 1 | 19 | 0 | 169 | 170 | 169 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 108 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.channel_py.CalendarChannel.create_event", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.channel_py.CalendarEvent.edit", "_.content.gdrive.MyDri... | The function (to_dict) defined within the protected class called _Position.The function start at line 169 and ends at 170. It contains 2 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 has 108.0 functions calling this function which ... |
Sema4AI_actions | _Position | protected | 0 | 0 | __repr__ | def __repr__(self):import jsonreturn json.dumps(self.to_dict(), indent=4) | 1 | 3 | 1 | 22 | 0 | 172 | 175 | 172 | self | [] | Returns | {"Return": 1} | 2 | 4 | 2 | ["json.dumps", "self.to_dict"] | 54 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (__repr__) defined within the protected class called _Position.The function start at line 172 and ends at 175. 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 2.0 functions, It has 2.0 functions ca... |
Sema4AI_actions | _Position | protected | 0 | 0 | __getitem__ | def __getitem__(self, name):# provide tuple-access, not just dict access.if name == 0:return self.lineif name == 1:return self.characterreturn getattr(self, name) | 3 | 6 | 2 | 32 | 0 | 177 | 183 | 177 | self,name | [] | Returns | {"If": 2, "Return": 3} | 1 | 7 | 1 | ["getattr"] | 33 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.devices_py.DeviceList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.g... | The function (__getitem__) defined within the protected class called _Position.The function start at line 177 and ends at 183. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [177.0], and this function return a value. It declare 1.0 function, It has 1.0 functio... |
Sema4AI_actions | str_with_location_capture | public | 0 | 1 | __eq__ | def __eq__(self, other):return (isinstance(other, _Position)and self.line == other.lineand self.character == other.character) | 3 | 6 | 2 | 32 | 0 | 185 | 190 | 185 | self,value | [] | bool | {"Assign": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["str.__eq__", "hasattr"] | 48 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rdataset_py.Rdataset.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rrset_py.RRset.__eq__", "_.content.gdrive... | The function (__eq__) defined within the public class called str_with_location_capture, that inherit another class.The function start at line 185 and ends at 190. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [185.0] and does not return any value. It declares... |
Sema4AI_actions | _Position | protected | 0 | 0 | __ge__ | def __ge__(self, other):line_gt = self.line > other.lineif line_gt:return line_gtif self.line == other.line:return self.character >= other.characterreturn False | 3 | 7 | 2 | 40 | 0 | 192 | 201 | 192 | self,other | [] | Returns | {"Assign": 1, "If": 2, "Return": 3} | 0 | 10 | 0 | [] | 0 | [] | The function (__ge__) defined within the protected class called _Position.The function start at line 192 and ends at 201. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [192.0], and this function return a value.. |
Sema4AI_actions | _Position | protected | 0 | 0 | __gt__ | def __gt__(self, other):line_gt = self.line > other.lineif line_gt:return line_gtif self.line == other.line:return self.character > other.characterreturn False | 3 | 7 | 2 | 40 | 0 | 203 | 212 | 203 | self,other | [] | Returns | {"Assign": 1, "If": 2, "Return": 3} | 0 | 10 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__gt__"] | The function (__gt__) defined within the protected class called _Position.The function start at line 203 and ends at 212. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [203.0], and this function return a value. It has 1.0 function calling this function which ... |
Sema4AI_actions | _Position | protected | 0 | 0 | __le__ | def __le__(self, other):line_lt = self.line < other.lineif line_lt:return line_ltif self.line == other.line:return self.character <= other.characterreturn False | 3 | 7 | 2 | 40 | 0 | 214 | 223 | 214 | self,other | [] | Returns | {"Assign": 1, "If": 2, "Return": 3} | 0 | 10 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__le__"] | The function (__le__) defined within the protected class called _Position.The function start at line 214 and ends at 223. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [214.0], and this function return a value. It has 1.0 function calling this function which ... |
Sema4AI_actions | _Position | protected | 0 | 0 | __lt__ | def __lt__(self, other):line_lt = self.line < other.lineif line_lt:return line_ltif self.line == other.line:return self.character < other.characterreturn False | 3 | 7 | 2 | 40 | 0 | 225 | 234 | 225 | self,other | [] | Returns | {"Assign": 1, "If": 2, "Return": 3} | 0 | 10 | 0 | [] | 0 | [] | The function (__lt__) defined within the protected class called _Position.The function start at line 225 and ends at 234. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [225.0], and this function return a value.. |
Sema4AI_actions | _Position | protected | 0 | 0 | __ne__ | def __ne__(self, other):return not self.__eq__(other) | 1 | 2 | 2 | 15 | 0 | 236 | 237 | 236 | self,other | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.__eq__"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561619_pymysql_tornado_mysql.tornado_mysql.__init___py.DBAPISet.__ne__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630821_adamlwgriffiths_pyrr.pyrr.objects.matrix33_py.Matrix33.__ne__", "_.content.gdrive.MyDri... | The function (__ne__) defined within the protected class called _Position.The function start at line 236 and ends at 237. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [236.0], and this function return a value. It declare 1.0 function, It has 1.0 function cal... |
Sema4AI_actions | public | public | 0 | 0 | is_inside | def is_inside(range_dct: _RangeTypedDict, line: int, col: int) -> bool:start = range_dct["start"]end = range_dct["end"]start_pos = _Position(start["line"], start["character"])end_pos = _Position(end["line"], end["character"])curr_pos = _Position(line, col)return start_pos <= curr_pos <= end_pos | 1 | 7 | 3 | 71 | 5 | 240 | 246 | 240 | range_dct,line,col | ['end', 'end_pos', 'start', 'curr_pos', 'start_pos'] | bool | {"Assign": 5, "Return": 1} | 3 | 7 | 3 | ["_Position", "_Position", "_Position"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.BaseAnalyzer.find_conda_dep_at", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_... | The function (is_inside) defined within the public class called public.The function start at line 240 and ends at 246. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [240.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called ... |
Sema4AI_actions | public | public | 0 | 0 | _verify_name | def _verify_name(package_yaml: Path | None, name: str) -> None:# Could be used to verify that something is not declared (no-op for now).pass | 1 | 2 | 2 | 16 | 0 | 12 | 14 | 12 | package_yaml,name | [] | None | {} | 0 | 3 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.action_package_handling.__init___py._interpret_entry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src... | The function (_verify_name) defined within the public class called public.The function start at line 12 and ends at 14. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [12.0] and does not return any value. It has 2.0 functions calling this function which are ["... |
Sema4AI_actions | public | public | 0 | 0 | _interpret_entry | def _interpret_entry(package_yaml: Path | None, entry: str) -> tuple[str, str, str]:# https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers# https://packaging.python.org/en/latest/specifications/version-specifiers/#compatible-releasefor c in _version_chars_without_eq:if c in entry... | 6 | 23 | 2 | 120 | 2 | 20 | 47 | 20 | package_yaml,entry | ['i', 'name'] | tuple[str, str, str] | {"Assign": 3, "Expr": 2, "For": 1, "If": 4, "Return": 2} | 6 | 28 | 6 | ["ActionPackageError", "ActionPackageError", "entry.find", "_verify_name", "ActionPackageError", "_verify_name"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.action_package_handling.__init___py.convert_conda_entry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_... | The function (_interpret_entry) defined within the public class called public.The function start at line 20 and ends at 47. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [20.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ca... |
Sema4AI_actions | public | public | 0 | 0 | convert_conda_entry | def convert_conda_entry(package_yaml: Path | None, entry: str) -> tuple[str, str, str, str]:name, op, version = _interpret_entry(package_yaml, entry)if op:if op == "=":return name, f"{name}={version}", "=", versionif package_yaml is None:raise ActionPackageError(f"Error in entry: {entry}. {op!r} not supported.")else:ra... | 4 | 15 | 2 | 83 | 0 | 50 | 66 | 50 | package_yaml,entry | [] | tuple[str, str, str, str] | {"Assign": 1, "If": 3, "Return": 2} | 3 | 17 | 3 | ["_interpret_entry", "ActionPackageError", "ActionPackageError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.action_package_handling.__init___py.create_conda_contents_from_package_yaml_contents", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.950... | The function (convert_conda_entry) defined within the public class called public.The function start at line 50 and ends at 66. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [50.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | convert_pip_entry | def convert_pip_entry(package_yaml: Path | None, entry: str) -> tuple[str, str, str, str]:name, op, version = _interpret_entry(package_yaml, entry)if op:if op == "=":return name, f"{name}=={version}", "==", versionif package_yaml is None:raise ActionPackageError(f"Error in entry: {entry}. {op!r} not supported.")else:ra... | 4 | 15 | 2 | 83 | 0 | 69 | 84 | 69 | package_yaml,entry | [] | tuple[str, str, str, str] | {"Assign": 1, "If": 3, "Return": 2} | 3 | 16 | 3 | ["_interpret_entry", "ActionPackageError", "ActionPackageError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.action_package_handling.__init___py.create_conda_contents_from_package_yaml_contents", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.950... | The function (convert_pip_entry) defined within the public class called public.The function start at line 69 and ends at 84. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [69.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions c... |
Sema4AI_actions | public | public | 0 | 0 | _create_package_from_conda_yaml | def _create_package_from_conda_yaml(conda_yaml: Path, dry_run: bool, backup: bool, *, stream: typing.IO | None = None):import yamlfrom ..package_deps.conda_impl import conda_match_specfrom ..package_deps.pip_impl.pip_distlib_util import parse_requirementfrom ..termcolors import bold_yellowwith conda_yaml.open("r", enco... | 31 | 119 | 4 | 666 | 19 | 87 | 248 | 87 | conda_yaml,dry_run,backup,stream | ['new_robot_yaml_path', 'spec', 'robot_yaml', 'new_conda_yaml_path', 'removed', 'target', 'op', 'new_pypi_deps', 'dependencies', 'all_version_chars', 'name', 'new_dependencies', 'parsed', 'output', 'post_install', 'new_conda_deps', 'version_spec', 'post_install_str', 'contents'] | None | {"AnnAssign": 2, "Assign": 22, "Expr": 21, "For": 6, "If": 20, "Try": 2, "While": 2, "With": 1} | 53 | 162 | 53 | ["conda_yaml.open", "yaml.safe_load", "contents.get", "isinstance", "isinstance", "tuple", "dep.keys", "ActionPackageError", "isinstance", "ActionPackageError", "type", "pip_deps.append", "isinstance", "ActionPackageError", "type", "conda_deps.append", "dep.startswith", "parse_requirement", "print", "bold_yellow", "new... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.action_package_handling.__init___py.update_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.s... | The function (_create_package_from_conda_yaml) defined within the public class called public.The function start at line 87 and ends at 248. It contains 119 lines of code and it has a cyclomatic complexity of 31. It takes 4 parameters, represented as [87.0] and does not return any value. It declares 53.0 functions, It h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.