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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_diff.process_output | def process_output(status: FileStatus, path: str, output_diff: ManifestDiff):if status == FileStatus.MODIFIED:output_diff.modified.append(path)elif status == FileStatus.NEW:output_diff.new.append(path)elif status == FileStatus.DELETED:output_diff.deleted.append(path) | 4 | 7 | 3 | 60 | 0 | 255 | 261 | 255 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_manifest_diff.process_output) defined within the public class called public.The function start at line 255 and ends at 261. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [255.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_diff | def _manifest_diff(manifest: str,root: str,include: Optional[List[str]] = None,exclude: Optional[List[str]] = None,include_exclude_config: Optional[str] = None,force_rehash=False,logger: ClickLogger = ClickLogger(False),) -> ManifestDiff:"""BETA API - This API is still evolving but will be made public in the near futur... | 5 | 38 | 7 | 263 | 7 | 216 | 287 | 216 | manifest,root,include,exclude,include_exclude_config,force_rehash,logger | ['input_files', 'manifest_data_str', 'local_manifest_object', 'input_paths', 'directory_manifest_object', 'cache_config', 'asset_manager'] | ManifestDiff | {"AnnAssign": 4, "Assign": 7, "Expr": 6, "For": 2, "If": 4, "Return": 1, "With": 2} | 18 | 72 | 18 | ["ClickLogger", "_glob_files", "Path", "S3AssetManager", "open", "input_file.read", "decode_manifest", "ManifestDiff", "output_diff.modified.append", "output_diff.new.append", "output_diff.deleted.append", "config_file.get_cache_directory", "HashCache", "asset_manager._create_manifest_file", "compare_manifest", "proces... | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.manifest_group_py.manifest_diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attach... | The function (_manifest_diff) defined within the public class called public.The function start at line 216 and ends at 287. It contains 38 lines of code and it has a cyclomatic complexity of 5. It takes 7 parameters, represented as [216.0] and does not return any value. It declares 18.0 functions, It has 18.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_upload | def _manifest_upload(manifest_file: str,s3_bucket_name: str,s3_cas_prefix: str,boto_session: boto3.Session,s3_key_prefix: Optional[str] = None,logger: ClickLogger = ClickLogger(False),):"""BETA API - This API is still evolving but will be made public in the near future.API to upload a job attachment manifest to the Con... | 2 | 25 | 6 | 167 | 2 | 290 | 334 | 290 | manifest_file,s3_bucket_name,s3_cas_prefix,boto_session,s3_key_prefix,logger | ['upload', 'manifest_file'] | None | {"AnnAssign": 2, "Assign": 3, "Expr": 2, "With": 1} | 12 | 45 | 12 | ["ClickLogger", "join", "Path", "Path", "S3AssetUploader", "str", "_get_long_path_compatible_path", "open", "upload.upload_bytes_to_s3", "BytesIO", "encode", "manifest.read"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.manifest_group_py.manifest_upload", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_atta... | The function (_manifest_upload) defined within the public class called public.The function start at line 290 and ends at 334. It contains 25 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [290.0] and does not return any value. It declares 12.0 functions, It has 12.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_download.add_manifest_by_root | def add_manifest_by_root(manifests_by_root: Dict[str, list], root: str, manifest: BaseAssetManifest):if root not in manifests_by_root:manifests_by_root[root] = []manifests_by_root[root].append(manifest) | 2 | 6 | 3 | 42 | 0 | 398 | 403 | 398 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_manifest_download.add_manifest_by_root) defined within the public class called public.The function start at line 398 and ends at 403. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [398.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_download | def _manifest_download(download_dir: str,farm_id: str,queue_id: str,job_id: str,boto3_session: boto3.Session,step_id: Optional[str] = None,asset_type: AssetType = AssetType.ALL,logger: ClickLogger = ClickLogger(False),) -> ManifestDownloadResponse:"""BETA API - This API is still evolving but will be made public in the ... | 22 | 131 | 8 | 828 | 10 | 337 | 535 | 337 | download_dir,farm_id,queue_id,job_id,boto3_session,step_id,asset_type,logger | ['timestamp', 'step_dep_response', 'output', 'queue_s3_settings', 'deadline', 'merged_manifest', 'output_manifests_by_root', 'manifest_name', 'local_manifest_file_path', 'next_token'] | ManifestDownloadResponse | {"AnnAssign": 15, "Assign": 16, "Expr": 16, "For": 8, "If": 7, "Return": 1, "While": 1, "With": 1} | 51 | 199 | 51 | ["ClickLogger", "boto3_session.client", "get_default_client_config", "deadline.get_queue", "_get_queue_user_boto3_session", "JobAttachmentS3Settings", "Path", "dict", "append", "deadline.get_job", "logger.echo", "job.get", "manifest.get", "attachments.get", "get_manifest_from_s3", "as_posix", "logger.echo", "add_manife... | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.manifest_group_py.manifest_download", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_at... | The function (_manifest_download) defined within the public class called public.The function start at line 337 and ends at 535. It contains 131 lines of code and it has a cyclomatic complexity of 22. It takes 8 parameters, represented as [337.0] and does not return any value. It declares 51.0 functions, It has 51.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _manifest_merge | def _manifest_merge(root: str,manifest_files: List[str],destination: str,name: Optional[str],logger: ClickLogger = ClickLogger(False),) -> Optional[ManifestMerge]:"""BETA API - API to merge multiple manifests into one.root: Root path for the manifest.manifest_files: List of manifest files to merge.destination: Destinat... | 2 | 18 | 5 | 111 | 2 | 538 | 569 | 538 | root,manifest_files,destination,name,logger | ['local_manifest_file', 'merged_manifest'] | Optional[ManifestMerge] | {"AnnAssign": 1, "Assign": 2, "Expr": 2, "If": 1, "Return": 2} | 8 | 32 | 8 | ["ClickLogger", "list", "values", "_read_manifests", "merge_asset_manifests", "_write_manifest", "logger.echo", "ManifestMerge"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.api.test_manifest_merge_py.TestMergeAPI.test_merge_different_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadli... | The function (_manifest_merge) defined within the public class called public.The function start at line 538 and ends at 569. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [538.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | canonical_path_comparator | def canonical_path_comparator(path: BaseManifestPath):"""Comparator for sorting paths."""# Sort by UTF-16 values as per the spec# https://www.rfc-editor.org/rfc/rfc8785.html#name-sorting-of-object-propertie# Use the "surrogatepass" error handler because filenames encountered in the wild# include surrogates.return path.... | 1 | 2 | 1 | 21 | 0 | 13 | 21 | 13 | path | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["path.path.encode"] | 0 | [] | The function (canonical_path_comparator) defined within the public class called public.The function start at line 13 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 this function return a value. It declare 1.0 function, and It has 1.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | manifest_to_canonical_json_string | def manifest_to_canonical_json_string(manifest: BaseAssetManifest) -> str:"""Return a canonicalized JSON string based on the following:* The JSON file *MUST* adhere to the JSON canonicalization guidelinesoutlined here (https://www.rfc-editor.org/rfc/rfc8785.html).* For now this is a simplification of this spec. Whitesp... | 1 | 4 | 1 | 38 | 0 | 24 | 38 | 24 | manifest | [] | str | {"Expr": 1, "Return": 1} | 2 | 15 | 2 | ["json.dumps", "dataclasses.asdict"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.v2023_03_03.asset_manifest_py.AssetManifest.encode"] | The function (manifest_to_canonical_json_string) defined within the public class called public.The function start at line 24 and ends at 38. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _create_manifest_for_single_root | def _create_manifest_for_single_root(files: List[str],root: str,logger: ClickLogger,) -> Optional[BaseAssetManifest]:"""Shared logic to create a manifest file from a single root.:param files: Input files to create a manifest with.:param root: Asset root of the files.:param logger: Click logger for stdout.:return"""# Pl... | 6 | 31 | 3 | 176 | 4 | 13 | 60 | 13 | files,root,logger | ['hash_callback_manager', 'upload_group', 'output_manifest', 'asset_manager'] | Optional[BaseAssetManifest] | {"Assign": 5, "Expr": 2, "If": 3, "Return": 2} | 10 | 48 | 10 | ["S3AssetManager", "_ProgressBarCallbackManager", "asset_manager.prepare_paths_for_upload", "len", "_hash_attachments", "logger.is_json", "len", "logger.echo", "len", "ManifestCreationException"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api.manifest_py._manifest_snapshot"] | The function (_create_manifest_for_single_root) defined within the public class called public.The function start at line 13 and ends at 60. It contains 31 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [13.0] and does not return any value. It declares 10.0 functions, It has... |
aws-deadline_deadline-cloud | BaseManifestPath | public | 1 | 1 | __init__ | def __init__(self, *, path: str, hash: str, size: int, mtime: int) -> None:self.path = pathself.hash = hashself.size = sizeself.mtime = mtime | 1 | 5 | 5 | 45 | 0 | 27 | 31 | 27 | self,path,hash,size,mtime | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called BaseManifestPath, implement an interface, and it inherit another class.The function start at line 27 and ends at 31. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [27.0] and does not return any va... |
aws-deadline_deadline-cloud | BaseManifestPath | public | 1 | 1 | __eq__ | def __eq__(self, other: object) -> bool:"""By default dataclasses still check ClassVars for equality.We only want to compare fields.:param other::return: True if all fields are equal, False otherwise."""if not isinstance(other, BaseManifestPath):return NotImplementedreturn fields(self) == fields(other) | 2 | 4 | 2 | 33 | 0 | 33 | 42 | 33 | self,other | [] | bool | {"Expr": 1, "If": 1, "Return": 2} | 3 | 10 | 3 | ["isinstance", "fields", "fields"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.ex.parser.tokens_base_py.TokenOfCommand.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.86980582_aws_neuron_transformers_neuronx.src.transformers_neuronx.constants_py.Layout.__e... | The function (__eq__) defined within the public class called BaseManifestPath, implement an interface, and it inherit another class.The function start at line 33 and ends at 42. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [33.0] and does not return any valu... |
aws-deadline_deadline-cloud | BaseManifestPath | public | 1 | 1 | __init__ | def __init__(self,*,paths: list[BaseManifestPath],hash_alg: HashAlgorithm,):self.paths = pathsself.hashAlg = hash_alg | 1 | 8 | 3 | 29 | 0 | 53 | 60 | 53 | self,path,hash,size,mtime | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called BaseManifestPath, implement an interface, and it inherit another class.The function start at line 53 and ends at 60. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [53.0] and does not return any va... |
aws-deadline_deadline-cloud | BaseAssetManifest | public | 1 | 1 | get_default_hash_alg | def get_default_hash_alg(cls) -> HashAlgorithm:# pragma: no cover"""Returns the default hashing algorithm for the Asset Manifest"""raise NotImplementedError("Asset Manifest base class does not implement get_default_hash_alg") | 1 | 4 | 1 | 13 | 0 | 64 | 68 | 64 | cls | [] | HashAlgorithm | {"Expr": 1} | 1 | 5 | 1 | ["NotImplementedError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api.manifest_py._manifest_download"] | The function (get_default_hash_alg) defined within the public class called BaseAssetManifest, implement an interface, and it inherit another class.The function start at line 64 and ends at 68. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ret... |
aws-deadline_deadline-cloud | BaseAssetManifest | public | 1 | 1 | decode | def decode(cls, *, manifest_data: dict[str, Any]) -> BaseAssetManifest:# pragma: no cover"""Turn a dictionary for a manifest into an AssetManifest object"""raise NotImplementedError("Asset Manifest base class does not implement decode") | 1 | 2 | 2 | 24 | 0 | 72 | 74 | 72 | cls,manifest_data | [] | BaseAssetManifest | {"Expr": 1} | 1 | 3 | 1 | ["NotImplementedError"] | 635 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.19906768_dragon_userbot_dragon_userbot.modules.squotes_py.render_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.webhooks.test_commands_py.FetchWebhookPayloadCommandTests.test_co... | The function (decode) defined within the public class called BaseAssetManifest, implement an interface, and it inherit another class.The function start at line 72 and ends at 74. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [72.0] and does not return any val... |
aws-deadline_deadline-cloud | BaseAssetManifest | public | 1 | 1 | encode | def encode(self) -> str:# pragma: no cover"""Recursively encode the Asset Manifest into a string according towhatever format the Asset Manifest was written for."""raise NotImplementedError("Asset Manifest base class does not implement encode") | 1 | 2 | 1 | 13 | 0 | 77 | 82 | 77 | self | [] | str | {"Expr": 1} | 1 | 6 | 1 | ["NotImplementedError"] | 354 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.bin.make_version_py.update_changelog", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.ex.plat.windows_py.filter_region", "_.content.gdrive.MyDrive.Phd_The... | The function (encode) defined within the public class called BaseAssetManifest, implement an interface, and it inherit another class.The function start at line 77 and ends at 82. 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.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | validate_manifest | def validate_manifest(manifest: dict[str, Any], version: ManifestVersion) -> Tuple[bool, Optional[str]]:"""Checks if the given manifest is valid for the given manifest version. Returns True if the manifestis valid for the given version. Returns False and a string explaining the error if the manifest is not valid."""if ... | 2 | 7 | 2 | 46 | 0 | 20 | 30 | 20 | manifest,version | [] | Tuple[bool, Optional[str]] | {"Expr": 1, "If": 1, "Return": 2} | 1 | 11 | 1 | ["validate_manifest_2023_03_03"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.decode_py.decode_manifest"] | The function (validate_manifest) defined within the public class called public.The function start at line 20 and ends at 30. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [20.0] and does not return any value. It declare 1.0 function, It has 1.0 function calle... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | decode_manifest | def decode_manifest(manifest: str) -> BaseAssetManifest:"""Takes in a manifest string and returns an Asset Manifest object.A ManifestDecodeValidationError will be raised if the manifest version is unknown orthe manifest is not valid."""document: dict[str, Any] = json.loads(manifest)try:version = ManifestVersion(documen... | 8 | 27 | 1 | 145 | 4 | 33 | 72 | 33 | manifest | ['decoded_manifest', 'version', 'manifest_model', 'supported_versions'] | BaseAssetManifest | {"AnnAssign": 1, "Assign": 5, "Expr": 1, "For": 1, "If": 2, "Return": 1, "Try": 1} | 11 | 40 | 11 | ["json.loads", "ManifestVersion", "join", "ManifestDecodeValidationError", "ManifestDecodeValidationError", "validate_manifest", "ManifestDecodeValidationError", "ManifestModelRegistry.get_manifest_model", "manifest_model.AssetManifest.decode", "alphanum_regex.fullmatch", "ManifestDecodeValidationError"] | 36 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api._utils_py._read_manifests", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api.m... | The function (decode_manifest) defined within the public class called public.The function start at line 33 and ends at 72. It contains 27 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 11.0 functions, It has 11.0 functions call... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | hash_file | def hash_file(file_path: str, hash_alg: HashAlgorithm) -> str:"""Hashes the given file using the given hashing algorithm."""if hash_alg == HashAlgorithm.XXH128:from xxhash import xxh3_128hasher = xxh3_128()else:raise UnsupportedHashingAlgorithmError(f"Unsupported hashing algorithm provided: {hash_alg}")with open(file_p... | 4 | 15 | 2 | 78 | 2 | 24 | 41 | 24 | file_path,hash_alg | ['chunk', 'hasher'] | str | {"Assign": 2, "Expr": 2, "If": 2, "Return": 1, "While": 1, "With": 1} | 6 | 18 | 6 | ["xxh3_128", "UnsupportedHashingAlgorithmError", "open", "file.read", "hasher.update", "hasher.hexdigest"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_sync_py.AssetSync._get_output_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attac... | The function (hash_file) defined within the public class called public.The function start at line 24 and ends at 41. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [24.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called in... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | hash_data | def hash_data(data: bytes, hash_alg: HashAlgorithm) -> str:"""Hashes the given data bytes using the given hashing algorithm."""if hash_alg == HashAlgorithm.XXH128:from xxhash import xxh3_128hasher = xxh3_128()else:raise UnsupportedHashingAlgorithmError(f"Unsupported hashing algorithm provided: {hash_alg}")hasher.update... | 2 | 10 | 2 | 50 | 1 | 44 | 56 | 44 | data,hash_alg | ['hasher'] | str | {"Assign": 1, "Expr": 2, "If": 1, "Return": 1} | 4 | 13 | 4 | ["xxh3_128", "UnsupportedHashingAlgorithmError", "hasher.update", "hasher.hexdigest"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api.manifest_py._manifest_download", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.... | The function (hash_data) defined within the public class called public.The function start at line 44 and ends at 56. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called in... |
aws-deadline_deadline-cloud | ManifestModelRegistry | public | 0 | 0 | register | def register(cls) -> None:"""Register the availble manifest models."""# Import here to avoid circular dependancies.from .v2023_03_03 import ManifestModel as _ManifestModel2023_03_03new_manifests = {ManifestVersion.v2023_03_03: _ManifestModel2023_03_03,}cls._asset_manifest_mapping = {**cls._asset_manifest_mapping, **new... | 1 | 6 | 1 | 38 | 0 | 28 | 38 | 28 | cls | [] | None | {"Assign": 2, "Expr": 1} | 0 | 11 | 0 | [] | 221 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3657361_openstack_archive_syntribos.syntribos.signal_py.SignalHolder.compare", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.kopf.reactor.registries_py.OperatorRegistry.register_resour... | The function (register) defined within the public class called ManifestModelRegistry.The function start at line 28 and ends at 38. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 221.0 functions calling this function wh... |
aws-deadline_deadline-cloud | ManifestModelRegistry | public | 0 | 0 | get_manifest_model | def get_manifest_model(cls, *, version: ManifestVersion) -> Type[BaseManifestModel]:"""Get the manifest model for the specified version."""manifest_model = cls._asset_manifest_mapping.get(version, None)if not manifest_model:raise RuntimeError(f"No model for asset manifest version: {version}")return manifest_model | 2 | 5 | 2 | 41 | 0 | 41 | 48 | 41 | cls,version | [] | Type[BaseManifestModel] | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 8 | 2 | ["cls._asset_manifest_mapping.get", "RuntimeError"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.decode_py.decode_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attac... | The function (get_manifest_model) defined within the public class called ManifestModelRegistry.The function start at line 41 and ends at 48. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [41.0] and does not return any value. It declares 2.0 functions, It has ... |
aws-deadline_deadline-cloud | ManifestPath | public | 0 | 1 | __init__ | def __init__(self, *, path: str, hash: str, size: int, mtime: int) -> None:super().__init__(path=path, hash=hash, size=size, mtime=mtime) | 1 | 2 | 5 | 47 | 0 | 30 | 31 | 30 | self,path,hash,size,mtime | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["__init__", "super"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called ManifestPath, that inherit another class.The function start at line 30 and ends at 31. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [30.0] and does not return any value. It declares 2.0 functions... |
aws-deadline_deadline-cloud | ManifestPath | public | 0 | 1 | __init__ | def __init__(self, *, hash_alg: HashAlgorithm, paths: list[BaseManifestPath], total_size: int) -> None:if hash_alg not in SUPPORTED_HASH_ALGS:raise ManifestDecodeValidationError(f"Unsupported hashing algorithm: {hash_alg}. Must be one of: {[e.value for e in SUPPORTED_HASH_ALGS]}")super().__init__(hash_alg=hash_alg, pat... | 2 | 10 | 4 | 62 | 0 | 40 | 50 | 40 | self,path,hash,size,mtime | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["__init__", "super"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called ManifestPath, that inherit another class.The function start at line 40 and ends at 50. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [40.0] and does not return any value. It declares 2.0 function... |
aws-deadline_deadline-cloud | AssetManifest | public | 0 | 1 | decode | def decode(cls, *, manifest_data: dict[str, Any]) -> AssetManifest:"""Return an instance of this class given a manifest dictionary.Assumes the manifest has been validated prior to calling."""try:hash_alg: HashAlgorithm = HashAlgorithm(manifest_data["hashAlg"])except ValueError:raise ManifestDecodeValidationError(f"Unsu... | 3 | 17 | 2 | 98 | 0 | 53 | 74 | 53 | cls,manifest_data | [] | AssetManifest | {"AnnAssign": 1, "Expr": 1, "Return": 1, "Try": 1} | 4 | 22 | 4 | ["HashAlgorithm", "ManifestDecodeValidationError", "cls", "ManifestPath"] | 636 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.19906768_dragon_userbot_dragon_userbot.modules.squotes_py.render_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.webhooks.test_commands_py.FetchWebhookPayloadCommandTests.test_co... | The function (decode) defined within the public class called AssetManifest, that inherit another class.The function start at line 53 and ends at 74. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [53.0] and does not return any value. It declares 4.0 functions... |
aws-deadline_deadline-cloud | AssetManifest | public | 0 | 1 | get_default_hash_alg | def get_default_hash_alg(cls) -> HashAlgorithm:# pragma: no cover"""Returns the default hashing algorithm for the Asset Manifest, represented as a string"""return DEFAULT_HASH_ALG | 1 | 2 | 1 | 10 | 0 | 77 | 79 | 77 | cls | [] | HashAlgorithm | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.api.manifest_py._manifest_download"] | The function (get_default_hash_alg) defined within the public class called AssetManifest, that inherit another class.The function start at line 77 and ends at 79. 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 1.0 func... |
aws-deadline_deadline-cloud | AssetManifest | public | 0 | 1 | encode | def encode(self) -> str:"""Return a canonicalized JSON string of the manifest"""self.paths.sort(key=canonical_path_comparator)return manifest_to_canonical_json_string(manifest=self) | 1 | 3 | 1 | 25 | 0 | 81 | 86 | 81 | self | [] | str | {"Expr": 2, "Return": 1} | 2 | 6 | 2 | ["self.paths.sort", "manifest_to_canonical_json_string"] | 354 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.bin.make_version_py.update_changelog", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.ex.plat.windows_py.filter_region", "_.content.gdrive.MyDrive.Phd_The... | The function (encode) defined within the public class called AssetManifest, that inherit another class.The function start at line 81 and ends at 86. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _get_missing_fields | def _get_missing_fields(obj: dict[str, Any], required: list[str]) -> list[str]:missing = []for field in required:if field not in obj:missing.append(field)return missing | 3 | 6 | 2 | 47 | 1 | 26 | 31 | 26 | obj,required | ['missing'] | list[str] | {"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 1 | 6 | 1 | ["missing.append"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.v2023_03_03.validate_py._validate_path_2023_03_03", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_clou... | The function (_get_missing_fields) defined within the public class called public.The function start at line 26 and ends at 31. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [26.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _validate_path_2023_03_03 | def _validate_path_2023_03_03(path_object: dict[str, Any]) -> Tuple[bool, Optional[str]]:missing = _get_missing_fields(path_object, _PATH_REQUIRED_FIELDS_2023_03_03)if len(missing) > 0:return False, f"path is missing required field(s) {missing}"path = path_object["path"]if not isinstance(path, str):return False, "path ... | 6 | 17 | 1 | 123 | 5 | 34 | 55 | 34 | path_object | ['mtime', 'hash', 'path', 'missing', 'size'] | Tuple[bool, Optional[str]] | {"Assign": 5, "If": 5, "Return": 6} | 6 | 22 | 6 | ["_get_missing_fields", "len", "isinstance", "isinstance", "isinstance", "isinstance"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.v2023_03_03.validate_py.validate_manifest_2023_03_03"] | The function (_validate_path_2023_03_03) defined within the public class called public.The function start at line 34 and ends at 55. It contains 17 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 6.0 functions, It has 6.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | validate_manifest_2023_03_03 | def validate_manifest_2023_03_03(manifest: dict[str, Any]) -> Tuple[bool, Optional[str]]:missing = _get_missing_fields(manifest, _REQUIRED_FIELDS_2023_03_03)if len(missing) > 0:return False, f"manifest is missing required field(s) {missing}"manifest_version = manifest["manifestVersion"]if not isinstance(manifest_versio... | 11 | 24 | 1 | 168 | 5 | 58 | 86 | 58 | manifest | ['hash_alg', 'total_size', 'manifest_version', 'missing', 'paths'] | Tuple[bool, Optional[str]] | {"Assign": 6, "For": 1, "If": 7, "Return": 8} | 8 | 29 | 8 | ["_get_missing_fields", "len", "isinstance", "isinstance", "isinstance", "isinstance", "len", "_validate_path_2023_03_03"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments.asset_manifests.decode_py.validate_manifest"] | The function (validate_manifest_2023_03_03) defined within the public class called public.The function start at line 58 and ends at 86. It contains 24 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 fu... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | __init__ | def __init__(self, cache_name: str, table_name: str, create_query: str, cache_dir: Optional[str] = None) -> None:if not cache_name or not table_name or not create_query:raise JobAttachmentsError("Constructor strings for CacheDB cannot be empty.")self.cache_name: str = cache_nameself.table_name: str = table_nameself.cre... | 7 | 26 | 5 | 164 | 0 | 30 | 59 | 30 | self,cache_name,table_name,create_query,cache_dir | [] | None | {"AnnAssign": 5, "Assign": 5, "Expr": 2, "If": 3, "Return": 1, "Try": 1} | 9 | 30 | 9 | ["JobAttachmentsError", "threading.local", "set", "logger.warning", "self.get_default_cache_db_file_dir", "JobAttachmentsError", "os.makedirs", "os.path.join", "Lock"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 30 and ends at 59. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 5 parameters, represented as [30.0] and does not return any value. It ... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | __enter__ | def __enter__(self):"""Called when entering the context manager."""if self.enabled:import sqlite3try:self.db_connection: sqlite3.Connection = sqlite3.connect(self.cache_dir, check_same_thread=False)except sqlite3.OperationalError as oe:raise JobAttachmentsError(f"Could not access cache file in {self.cache_dir}") from o... | 4 | 19 | 1 | 83 | 0 | 61 | 83 | 61 | self | [] | Returns | {"AnnAssign": 1, "Expr": 4, "If": 1, "Return": 1, "Try": 2} | 5 | 23 | 5 | ["sqlite3.connect", "JobAttachmentsError", "self.db_connection.execute", "logger.info", "self.db_connection.execute"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955847_kinto_kinto_http_py.tests.test_replication_py.test_new_records_are_sent_to_the_destination", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955847_kinto_kinto_http_py.tests.test_replication_py.test_removed_r... | The function (__enter__) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 61 and ends at 83. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. I... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | __exit__ | def __exit__(self, exc_type, exc_value, exc_traceback):"""Called when exiting the context manager."""if self.enabled:import sqlite3self.db_connection.close()for conn in self.local_connections:try:conn.close()except sqlite3.Error as e:logger.warning(f"SQLite connection failed to close with error {e}")self.local_connecti... | 4 | 10 | 4 | 61 | 0 | 85 | 98 | 85 | self,exc_type,exc_value,exc_traceback | [] | None | {"Expr": 5, "For": 1, "If": 1, "Try": 1} | 4 | 14 | 4 | ["self.db_connection.close", "conn.close", "logger.warning", "self.local_connections.clear"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84022601_jaraco_jaraco_windows.jaraco.windows.tempfile_py.TemporaryDirectory.__exit__"] | The function (__exit__) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 85 and ends at 98. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [85.0] and does not return any value. It ... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | get_local_connection | def get_local_connection(self):"""Create and/or returns a thread local connection to the SQLite database."""if not self.enabled:return Noneimport sqlite3if not hasattr(self.local, "connection"):try:self.local.connection = sqlite3.connect(self.cache_dir, check_same_thread=False)self.local_connections.add(self.local.conn... | 4 | 13 | 1 | 80 | 0 | 100 | 115 | 100 | self | [] | Returns | {"Assign": 1, "Expr": 2, "If": 2, "Return": 2, "Try": 1} | 4 | 16 | 4 | ["hasattr", "sqlite3.connect", "self.local_connections.add", "JobAttachmentsError"] | 0 | [] | The function (get_local_connection) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 100 and ends at 115. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function retu... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | get_default_cache_db_file_dir | def get_default_cache_db_file_dir(cls) -> Optional[str]:"""Gets the expected directory for the cache database file based on OS environment variables.If a directory cannot be found, defaults to the working directory."""default_path = os.environ.get("HOME")if default_path:default_path = os.path.join(default_path, CONFIG_... | 2 | 5 | 1 | 40 | 0 | 118 | 126 | 118 | cls | [] | Optional[str] | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 2 | 9 | 2 | ["os.environ.get", "os.path.join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.caches.test_caches_py.TestCacheDB.test_get_default_cache_db_file_dir_env_var_path_exists"] | The function (get_default_cache_db_file_dir) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 118 and ends at 126. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not re... |
aws-deadline_deadline-cloud | CacheDB | public | 1 | 1 | remove_cache | def remove_cache(self) -> None:"""Removes the underlying cache contents from the file system."""if self.enabled:import sqlite3self.db_connection.close()conn_list = list(self.local_connections)for conn in conn_list:try:conn.close()self.local_connections.remove(conn)except sqlite3.Error as e:logger.warning(f"SQLite conne... | 5 | 17 | 1 | 95 | 0 | 128 | 151 | 128 | self | [] | None | {"Assign": 1, "Expr": 8, "For": 1, "If": 1, "Try": 2} | 8 | 24 | 8 | ["self.db_connection.close", "list", "conn.close", "self.local_connections.remove", "logger.warning", "logger.debug", "os.remove", "logger.error"] | 0 | [] | The function (remove_cache) defined within the public class called CacheDB, implement an interface, and it inherit another class.The function start at line 128 and ends at 151. It contains 17 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. ... |
aws-deadline_deadline-cloud | HashCacheEntry | public | 0 | 0 | to_dict | def to_dict(self) -> Dict[str, Any]:return {"file_path": self.file_path,"hash_algorithm": self.hash_algorithm.value,"file_hash": self.file_hash,"last_modified_time": self.last_modified_time,} | 1 | 7 | 1 | 41 | 0 | 29 | 35 | 29 | self | [] | Dict[str, Any] | {"Return": 1} | 0 | 7 | 0 | [] | 35 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957978_dgilland_pydash.src.pydash.objects_py.omit_by", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957978_dgilland_pydash.src.pydash.objects_py.pick_by", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (to_dict) defined within the public class called HashCacheEntry.The function start at line 29 and ends at 35. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 35.0 functions calling this function which are [... |
aws-deadline_deadline-cloud | HashCache | public | 0 | 1 | __init__ | def __init__(self, cache_dir: Optional[str] = None) -> None:table_name: str = f"hashesV{self.CACHE_DB_VERSION}"create_query: str = f"CREATE TABLE IF NOT EXISTS hashesV{self.CACHE_DB_VERSION}(file_path blob primary key, hash_algorithm text secondary key, file_hash text, last_modified_time timestamp)"super().__init__(cac... | 1 | 9 | 2 | 53 | 0 | 52 | 60 | 52 | self,cache_dir | [] | None | {"AnnAssign": 2, "Expr": 1} | 2 | 9 | 2 | ["__init__", "super"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called HashCache, that inherit another class.The function start at line 52 and ends at 60. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [52.0] and does not return any value. It declares 2.0 functions, I... |
aws-deadline_deadline-cloud | HashCache | public | 0 | 1 | get_connection_entry | def get_connection_entry(self, file_path_key: str, hash_algorithm: HashAlgorithm, connection) -> Optional[HashCacheEntry]:"""Returns an entry from the hash cache, if it exists."""if not self.enabled:return Noneentry_vals = connection.execute(f"SELECT * FROM {self.table_name} WHERE file_path=? AND hash_algorithm=?",[fil... | 3 | 21 | 4 | 119 | 0 | 62 | 86 | 62 | self,file_path_key,hash_algorithm,connection | [] | Optional[HashCacheEntry] | {"Assign": 1, "Expr": 1, "If": 2, "Return": 3} | 7 | 25 | 7 | ["fetchone", "connection.execute", "file_path_key.encode", "HashCacheEntry", "str", "HashAlgorithm", "str"] | 0 | [] | The function (get_connection_entry) defined within the public class called HashCache, that inherit another class.The function start at line 62 and ends at 86. It contains 21 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [62.0] and does not return any value. It declares 7.0... |
aws-deadline_deadline-cloud | HashCache | public | 0 | 1 | get_entry | def get_entry(self, file_path_key: str, hash_algorithm: HashAlgorithm) -> Optional[HashCacheEntry]:"""Returns an entry from the hash cache, if it exists."""if not self.enabled:return Nonewith self.db_lock, self.db_connection:return self.get_connection_entry(file_path_key, hash_algorithm, self.db_connection) | 2 | 7 | 3 | 49 | 0 | 88 | 98 | 88 | self,file_path_key,hash_algorithm | [] | Optional[HashCacheEntry] | {"Expr": 1, "If": 1, "Return": 2, "With": 1} | 1 | 11 | 1 | ["self.get_connection_entry"] | 0 | [] | The function (get_entry) defined within the public class called HashCache, that inherit another class.The function start at line 88 and ends at 98. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [88.0] and does not return any value. It declare 1.0 function, an... |
aws-deadline_deadline-cloud | HashCache | public | 0 | 1 | put_entry | def put_entry(self, entry: HashCacheEntry) -> None:"""Inserts or replaces an entry into the hash cache database after acquiring the lock."""if self.enabled:with self.db_lock, self.db_connection:entry_dict = entry.to_dict()entry_dict["file_path"] = entry_dict["file_path"].encode(encoding="utf-8", errors="surrogatepass")... | 2 | 11 | 2 | 65 | 0 | 100 | 111 | 100 | self,entry | [] | None | {"Assign": 2, "Expr": 2, "If": 1, "With": 1} | 3 | 12 | 3 | ["entry.to_dict", "encode", "self.db_connection.execute"] | 0 | [] | The function (put_entry) defined within the public class called HashCache, that inherit another class.The function start at line 100 and ends at 111. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [100.0] and does not return any value. It declares 3.0 functio... |
aws-deadline_deadline-cloud | S3CheckCacheEntry | public | 0 | 0 | to_dict | def to_dict(self) -> Dict[str, Any]:return {"s3_key": self.s3_key,"last_seen_time": self.last_seen_time,} | 1 | 5 | 1 | 27 | 0 | 25 | 29 | 25 | self | [] | Dict[str, Any] | {"Return": 1} | 0 | 5 | 0 | [] | 35 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957978_dgilland_pydash.src.pydash.objects_py.omit_by", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957978_dgilland_pydash.src.pydash.objects_py.pick_by", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (to_dict) defined within the public class called S3CheckCacheEntry.The function start at line 25 and ends at 29. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 35.0 functions calling this function which ar... |
aws-deadline_deadline-cloud | S3CheckCache | public | 0 | 1 | __init__ | def __init__(self, cache_dir: Optional[str] = None) -> None:table_name: str = f"s3checkV{self.CACHE_DB_VERSION}"create_query: str = f"CREATE TABLE IF NOT EXISTS s3checkV{self.CACHE_DB_VERSION}(s3_key text primary key, last_seen_time timestamp)"super().__init__(cache_name=self.CACHE_NAME,table_name=table_name,create_que... | 1 | 9 | 2 | 53 | 0 | 49 | 57 | 49 | self,cache_dir | [] | None | {"AnnAssign": 2, "Expr": 1} | 2 | 9 | 2 | ["__init__", "super"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called S3CheckCache, that inherit another class.The function start at line 49 and ends at 57. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [49.0] and does not return any value. It declares 2.0 functions... |
aws-deadline_deadline-cloud | S3CheckCache | public | 0 | 1 | get_connection_entry | def get_connection_entry(self, s3_key: str, connection) -> Optional[S3CheckCacheEntry]:"""Checks if an entry exists in the cache, and returns it if it hasn't expired."""entry_vals = connection.execute(f"SELECT * FROM {self.table_name} WHERE s3_key=?",[s3_key],).fetchone()if entry_vals:entry = S3CheckCacheEntry(s3_key=e... | 4 | 17 | 3 | 106 | 0 | 59 | 80 | 59 | self,s3_key,connection | [] | Optional[S3CheckCacheEntry] | {"Assign": 3, "Expr": 2, "If": 2, "Return": 2, "Try": 1} | 8 | 22 | 8 | ["fetchone", "connection.execute", "S3CheckCacheEntry", "str", "datetime.fromtimestamp", "float", "datetime.now", "logger.warning"] | 0 | [] | The function (get_connection_entry) defined within the public class called S3CheckCache, that inherit another class.The function start at line 59 and ends at 80. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [59.0] and does not return any value. It declares ... |
aws-deadline_deadline-cloud | S3CheckCache | public | 0 | 1 | get_entry | def get_entry(self, s3_key: str) -> Optional[S3CheckCacheEntry]:"""Checks if an entry exists in the cache, and returns it if it hasn't expired."""if not self.enabled:return Nonewith self.db_lock, self.db_connection:return self.get_connection_entry(s3_key, self.db_connection) | 2 | 5 | 2 | 43 | 0 | 82 | 90 | 82 | self,s3_key | [] | Optional[S3CheckCacheEntry] | {"Expr": 1, "If": 1, "Return": 2, "With": 1} | 1 | 9 | 1 | ["self.get_connection_entry"] | 0 | [] | The function (get_entry) defined within the public class called S3CheckCache, that inherit another class.The function start at line 82 and ends at 90. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [82.0] and does not return any value. It declare 1.0 function,... |
aws-deadline_deadline-cloud | S3CheckCache | public | 0 | 1 | put_entry | def put_entry(self, entry: S3CheckCacheEntry) -> None:"""Inserts or replaces an entry into the cache database."""if self.enabled:with self.db_lock, self.db_connection:self.db_connection.execute(f"INSERT OR REPLACE INTO {self.table_name} VALUES(:s3_key, :last_seen_time)",entry.to_dict(),) | 2 | 7 | 2 | 42 | 0 | 92 | 99 | 92 | self,entry | [] | None | {"Expr": 2, "If": 1, "With": 1} | 2 | 8 | 2 | ["self.db_connection.execute", "entry.to_dict"] | 0 | [] | The function (put_entry) defined within the public class called S3CheckCache, that inherit another class.The function start at line 92 and ends at 99. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [92.0] and does not return any value. It declares 2.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _is_admin | def _is_admin() -> bool:"""Platform independent utility to determine if the tests are running withelevated privileges"""# sys.platform helps mypy type checking ignore other platformsif sys.platform != "win32":return os.getuid() == 0import ctypestry:return ctypes.windll.shell32.IsUserAnAdmin() == 1except Exception:retur... | 3 | 8 | 0 | 43 | 0 | 19 | 31 | 19 | [] | bool | {"Expr": 1, "If": 1, "Return": 3, "Try": 1} | 2 | 13 | 2 | ["os.getuid", "ctypes.windll.shell32.IsUserAnAdmin"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.test_installer_py.TestLinuxAndMacOS.test_system_permissions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.tes... | The function (_is_admin) defined within the public class called public.The function start at line 19 and ends at 31. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | installer_path | def installer_path():path = "DeadlineCloudClient-{platform}-installer.{ext}"if platform.system() == "Darwin":path = os.path.join(path.format(platform="osx", ext="app"),"Contents","MacOS","installbuilder.sh",)elif platform.system() == "Windows":path = path.format(platform="windows-x64", ext="exe")elif platform.system() ... | 7 | 18 | 0 | 144 | 1 | 35 | 56 | 35 | ['path'] | None | {"Assign": 4, "Expr": 1, "If": 5} | 15 | 22 | 15 | ["platform.system", "os.path.join", "path.format", "platform.system", "path.format", "platform.system", "path.format", "os.path.isfile", "FileNotFoundError", "os.access", "platform.system", "PermissionError", "absolute", "Path", "pytest.fixture"] | 0 | [] | The function (installer_path) defined within the public class called public.The function start at line 35 and ends at 56. It contains 18 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15.0 functions ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _run_installer | def _run_installer(installer_path, install_scope, installation_path) -> Path:# use a path that does not existinstallation_path = installation_path / "dne"args = [installer_path,"--mode","unattended","--installscope",install_scope,"--prefix",installation_path,]subprocess.run(args, check=True)return Path(installation_pat... | 1 | 13 | 3 | 49 | 2 | 59 | 73 | 59 | installer_path,install_scope,installation_path | ['args', 'installation_path'] | Path | {"Assign": 2, "Expr": 1, "Return": 1} | 2 | 15 | 2 | ["subprocess.run", "Path"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.test_installer_py.per_test_system_installation", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.test_installer_p... | The function (_run_installer) defined within the public class called public.The function start at line 59 and ends at 73. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _validate_files | def _validate_files(installation_path: Path) -> None:if platform.system() == "Darwin":uninstaller = "uninstall.app"elif platform.system() == "Windows":uninstaller = "uninstall.exe"else:uninstaller = "uninstall"# THENtop_level_dir = [f.name for f in installation_path.iterdir()]assert "DeadlineClient" in top_level_dirdea... | 7 | 24 | 1 | 204 | 10 | 76 | 107 | 76 | installation_path | ['version_regex', 'client_dir', 'uninstaller', 'top_level_dir', 'cli_dir', 'match', 'cli_dir_contents', 'deadline_client_dir', 'cli_path', 'cli_result'] | None | {"Assign": 12, "If": 2} | 10 | 32 | 10 | ["platform.system", "platform.system", "installation_path.iterdir", "iterdir", "Path", "subprocess.run", "re.search", "cli_dir.iterdir", "iterdir", "cli_dir.joinpath"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.test_installer_py.TestSystemInstall.test_install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.installer.test_installer... | The function (_validate_files) defined within the public class called public.The function start at line 76 and ends at 107. It contains 24 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 functions cal... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | user_installation | def user_installation(installer_path, tmp_path_factory):"""Used for tests that just want to assert some facts around the install but do not modify"""tmp_path = tmp_path_factory.mktemp("install")yield _run_installer(installer_path, "user", tmp_path) | 1 | 3 | 2 | 25 | 1 | 111 | 114 | 111 | installer_path,tmp_path_factory | ['tmp_path'] | None | {"Assign": 1, "Expr": 2} | 3 | 4 | 3 | ["tmp_path_factory.mktemp", "_run_installer", "pytest.fixture"] | 0 | [] | The function (user_installation) defined within the public class called public.The function start at line 111 and ends at 114. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [111.0] and does not return any value. It declares 3.0 functions, and It has 3.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | system_installation | def system_installation(installer_path, tmp_path_factory):"""Used for tests that just want to assert some facts around the install but do not modify"""tmp_path = tmp_path_factory.mktemp("install")yield _run_installer(installer_path, "system", tmp_path) | 1 | 3 | 2 | 25 | 1 | 118 | 121 | 118 | installer_path,tmp_path_factory | ['tmp_path'] | None | {"Assign": 1, "Expr": 2} | 3 | 4 | 3 | ["tmp_path_factory.mktemp", "_run_installer", "pytest.fixture"] | 0 | [] | The function (system_installation) defined within the public class called public.The function start at line 118 and ends at 121. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [118.0] and does not return any value. It declares 3.0 functions, and It has 3.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | per_test_user_installation | def per_test_user_installation(installer_path, tmp_path):"""Used for tests that modify the installation"""yield _run_installer(installer_path, "user", tmp_path) | 1 | 2 | 2 | 17 | 0 | 125 | 127 | 125 | installer_path,tmp_path | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["_run_installer", "pytest.fixture"] | 0 | [] | The function (per_test_user_installation) defined within the public class called public.The function start at line 125 and ends at 127. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [125.0] and does not return any value. It declares 2.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | per_test_system_installation | def per_test_system_installation(installer_path, tmp_path):"""Used for tests that modify the installation"""yield _run_installer(installer_path, "system", tmp_path) | 1 | 2 | 2 | 17 | 0 | 131 | 133 | 131 | installer_path,tmp_path | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["_run_installer", "pytest.fixture"] | 0 | [] | The function (per_test_system_installation) defined within the public class called public.The function start at line 131 and ends at 133. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 2.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | uninstaller_path | def uninstaller_path():uninstaller_path = Path("DeadlineClient", "uninstall")if platform.system() == "Darwin":uninstaller_path = Path("DeadlineClient", "uninstall.app", "Contents", "MacOS", "installbuilder.sh")elif platform.system() == "Windows":uninstaller_path = uninstaller_path.with_suffix(".exe")yield uninstaller_p... | 3 | 9 | 0 | 54 | 1 | 137 | 146 | 137 | ['uninstaller_path'] | None | {"Assign": 3, "Expr": 1, "If": 2} | 6 | 10 | 6 | ["Path", "platform.system", "Path", "platform.system", "uninstaller_path.with_suffix", "pytest.fixture"] | 0 | [] | The function (uninstaller_path) defined within the public class called public.The function start at line 137 and ends at 146. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_default_location | def test_default_location(installer_path: Path):"""Ensures that the default output location reported by the installer is accurate. The help text will only show it for the default scope (user). Example help output:--prefix <prefix> Installation DirectoryDefault: /home/<user>/DeadlineCloudClient"""# GIVENdefault_install_... | 6 | 29 | 1 | 244 | 6 | 149 | 191 | 149 | installer_path | ['help_result', 'text_mode', 'default_pattern', 'default_install_location', 'help_output', 'location'] | None | {"Assign": 8, "Expr": 1, "If": 2, "Try": 1, "While": 1} | 21 | 43 | 21 | ["expanduser", "Path", "subprocess.run", "iter", "help_result.stdout.splitlines", "isinstance", "iter", "e.stdout.splitlines", "next", "startswith", "line.strip", "re.match", "strip", "next", "platform.system", "location.group", "default_install_location.as_posix", "str", "Path", "location.group", "str"] | 0 | [] | The function (test_default_location) defined within the public class called public.The function start at line 149 and ends at 191. It contains 29 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 21.0 functions, and It has 21.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_did_not_build_with_evaluation_mode | def test_did_not_build_with_evaluation_mode(installer_path: Path, tmp_path: Path):"""Tests to see if there's an evaluation version header from installbuilder.This is done by launching the installer, exiting before it completes, and checking the outputdoes NOT contain a specific line entry. Unfortunately this is makes t... | 5 | 24 | 2 | 135 | 3 | 201 | 250 | 201 | installer_path,tmp_path | ['proc', 'output', 'eval_text'] | None | {"Assign": 4, "Expr": 5, "For": 1, "Try": 1} | 12 | 50 | 12 | ["subprocess.Popen", "proc.wait", "proc.terminate", "proc.kill", "strip", "proc.stdout.readline", "range", "pytest.mark.skipif", "os.getenv", "lower", "os.getenv", "pytest.mark.skipif"] | 0 | [] | The function (test_did_not_build_with_evaluation_mode) defined within the public class called public.The function start at line 201 and ends at 250. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [201.0] and does not return any value. It declares 12.0 functio... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | test_user_permissions | def test_user_permissions(self, user_installation: Path):# GIVEN / WHEN / THENself._validate_posix_permissions(user_installation) | 1 | 2 | 2 | 15 | 0 | 255 | 257 | 255 | self,user_installation | [] | None | {"Expr": 1} | 1 | 3 | 1 | ["self._validate_posix_permissions"] | 0 | [] | The function (test_user_permissions) defined within the public class called TestLinuxAndMacOS.The function start at line 255 and ends at 257. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [255.0] and does not return any value. It declare 1.0 function, and It... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | test_system_permissions | def test_system_permissions(self, system_installation):# GIVEN / WHEN / THENself._validate_posix_permissions(system_installation) | 1 | 2 | 2 | 13 | 0 | 260 | 262 | 260 | self,system_installation | [] | None | {"Expr": 1} | 3 | 3 | 3 | ["self._validate_posix_permissions", "pytest.mark.skipif", "_is_admin"] | 0 | [] | The function (test_system_permissions) defined within the public class called TestLinuxAndMacOS.The function start at line 260 and ends at 262. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [260.0] and does not return any value. It declares 3.0 functions, and... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | _has_group_other_write | def _has_group_other_write(self, mode: int) -> bool:return bool(mode & (stat.S_IWGRP | stat.S_IWOTH)) | 1 | 2 | 2 | 26 | 0 | 264 | 265 | 264 | self,mode | [] | bool | {"Return": 1} | 1 | 2 | 1 | ["bool"] | 0 | [] | The function (_has_group_other_write) defined within the public class called TestLinuxAndMacOS.The function start at line 264 and ends at 265. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [264.0] and does not return any value. It declare 1.0 function, and I... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | _has_user_read_write | def _has_user_read_write(self, mode: int) -> bool:return bool(mode & (stat.S_IRUSR | stat.S_IWUSR)) | 1 | 2 | 2 | 26 | 0 | 267 | 268 | 267 | self,mode | [] | bool | {"Return": 1} | 1 | 2 | 1 | ["bool"] | 0 | [] | The function (_has_user_read_write) defined within the public class called TestLinuxAndMacOS.The function start at line 267 and ends at 268. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [267.0] and does not return any value. It declare 1.0 function, and It ... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | _has_user_group_other_execute | def _has_user_group_other_execute(self, mode: int) -> bool:return bool(mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) | 1 | 2 | 2 | 30 | 0 | 270 | 271 | 270 | self,mode | [] | bool | {"Return": 1} | 1 | 2 | 1 | ["bool"] | 0 | [] | The function (_has_user_group_other_execute) defined within the public class called TestLinuxAndMacOS.The function start at line 270 and ends at 271. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [270.0] and does not return any value. It declare 1.0 function,... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | _validate_posix_permissions | def _validate_posix_permissions(self, installation_path: Path):# assists mypy type checking to ignore this on Windowsassert sys.platform != "win32"# pwd is not available on Windowsimport pwd# GIVENcurrent_user = pwd.getpwuid(os.getuid())[0]# type: ignore# WHENbad_perms: DefaultDict[Path, List[str]] = defaultdict(list)f... | 9 | 23 | 2 | 209 | 0 | 273 | 304 | 273 | self,installation_path | [] | None | {"AnnAssign": 1, "Assign": 4, "Expr": 5, "For": 2, "If": 4} | 25 | 32 | 25 | ["pwd.getpwuid", "os.getuid", "defaultdict", "installation_path.rglob", "stat.S_IMODE", "entry.stat", "self._has_group_other_write", "append", "self._has_user_read_write", "append", "entry.is_dir", "self._has_user_group_other_execute", "append", "entry.owner", "append", "len", "enumerate", "join", "error_message.append... | 0 | [] | The function (_validate_posix_permissions) defined within the public class called TestLinuxAndMacOS.The function start at line 273 and ends at 304. It contains 23 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [273.0] and does not return any value. It declares 25.0 function... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | test_user_permissions | def test_user_permissions(self, user_installation):# GIVEN / WHEN / THENself._verify_windows_least_privilege(user_installation) | 1 | 2 | 2 | 13 | 0 | 309 | 311 | 309 | self,user_installation | [] | None | {"Expr": 1} | 1 | 3 | 1 | ["self._validate_posix_permissions"] | 0 | [] | The function (test_user_permissions) defined within the public class called TestLinuxAndMacOS.The function start at line 309 and ends at 311. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [309.0] and does not return any value. It declare 1.0 function, and It... |
aws-deadline_deadline-cloud | TestLinuxAndMacOS | public | 0 | 0 | test_system_permissions | def test_system_permissions(self, system_installation):# GIVEN / WHEN / THENself._validate_posix_permissions(system_installation) | 1 | 2 | 2 | 13 | 0 | 314 | 316 | 260 | self,system_installation | [] | None | {"Expr": 1} | 3 | 3 | 3 | ["self._validate_posix_permissions", "pytest.mark.skipif", "_is_admin"] | 0 | [] | The function (test_system_permissions) defined within the public class called TestLinuxAndMacOS.The function start at line 314 and ends at 316. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [260.0] and does not return any value. It declares 3.0 functions, and... |
aws-deadline_deadline-cloud | TestWindows | public | 0 | 0 | _running_in_container | def _running_in_container(self) -> bool:"""Check to see if the cexecsvc service exists and is runningto determine if we're running on a container."""# assists mypy type checking to ignore this on non-Windowsassert sys.platform == "win32"import win32serviceimport win32serviceutiltry:service_status = win32serviceutil.Que... | 2 | 9 | 1 | 44 | 0 | 318 | 333 | 318 | self | [] | bool | {"Assign": 1, "Expr": 1, "Return": 2, "Try": 1} | 1 | 16 | 1 | ["win32serviceutil.QueryServiceStatus"] | 0 | [] | The function (_running_in_container) defined within the public class called TestWindows.The function start at line 318 and ends at 333. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 f... |
aws-deadline_deadline-cloud | TestWindows | public | 0 | 0 | _verify_windows_least_privilege | def _verify_windows_least_privilege(self, installation_path: Path):# assists mypy type checking to ignore this on non-Windowsassert sys.platform == "win32"import ntsecurityconimport win32conimport win32fileimport win32security# GIVENwindows_user = getpass.getuser()if self._running_in_container():# The admin group is di... | 16 | 61 | 2 | 355 | 0 | 335 | 413 | 335 | self,installation_path | [] | None | {"AnnAssign": 1, "Assign": 12, "Expr": 7, "For": 3, "If": 9} | 34 | 79 | 34 | ["getpass.getuser", "self._running_in_container", "win32security.LookupAccountName", "win32security.LookupAccountName", "defaultdict", "installation_path.rglob", "win32security.GetFileSecurity", "str", "sd.GetSecurityDescriptorOwner", "_is_admin", "append", "win32security.LookupAccountSid", "append", "win32security.Loo... | 0 | [] | The function (_verify_windows_least_privilege) defined within the public class called TestWindows.The function start at line 335 and ends at 413. It contains 61 lines of code and it has a cyclomatic complexity of 16. It takes 2 parameters, represented as [335.0] and does not return any value. It declares 34.0 functions... |
aws-deadline_deadline-cloud | TestUserInstall | public | 0 | 0 | test_install | def test_install(self, user_installation: Path):# GIVEN / WHEN / THEN_validate_files(user_installation) | 1 | 2 | 2 | 13 | 0 | 421 | 423 | 421 | self,user_installation | [] | None | {"Expr": 1} | 1 | 3 | 1 | ["_validate_files"] | 0 | [] | The function (test_install) defined within the public class called TestUserInstall.The function start at line 421 and ends at 423. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [421.0] and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
aws-deadline_deadline-cloud | TestUserInstall | public | 0 | 0 | test_uninstall | def test_uninstall(self, per_test_user_installation: Path, uninstaller_path: Path):# GIVEN / WHENresult = subprocess.run([per_test_user_installation / uninstaller_path, "--mode", "unattended"])# THENassert result.returncode == 0# On Windows, the uninstall process will return before the uninstallation is complete.# If n... | 4 | 11 | 3 | 74 | 0 | 425 | 441 | 425 | self,per_test_user_installation,uninstaller_path | [] | None | {"Assign": 1, "Expr": 1, "For": 1, "If": 2} | 6 | 17 | 6 | ["subprocess.run", "platform.system", "range", "per_test_user_installation.exists", "time.sleep", "per_test_user_installation.exists"] | 0 | [] | The function (test_uninstall) defined within the public class called TestUserInstall.The function start at line 425 and ends at 441. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [425.0] and does not return any value. It declares 6.0 functions, and It has 6... |
aws-deadline_deadline-cloud | TestUserInstall | public | 0 | 0 | test_install | def test_install(self, user_installation: Path):# GIVEN / WHEN / THEN_validate_files(user_installation) | 1 | 2 | 2 | 13 | 0 | 446 | 448 | 421 | self,user_installation | [] | None | {"Expr": 1} | 1 | 3 | 1 | ["_validate_files"] | 0 | [] | The function (test_install) defined within the public class called TestUserInstall.The function start at line 446 and ends at 448. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [421.0] and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
aws-deadline_deadline-cloud | TestUserInstall | public | 0 | 0 | test_uninstall | def test_uninstall(self, per_test_system_installation: Path, uninstaller_path: Path):# GIVEN / WHENresult = subprocess.run([per_test_system_installation / uninstaller_path, "--mode", "unattended"],capture_output=True,text=True,)# THENassert result.returncode == 0# On Windows, the uninstall process will return before th... | 4 | 13 | 3 | 83 | 0 | 450 | 468 | 450 | self,per_test_user_installation,uninstaller_path | [] | None | {"Assign": 1, "Expr": 1, "For": 1, "If": 2} | 6 | 17 | 6 | ["subprocess.run", "platform.system", "range", "per_test_user_installation.exists", "time.sleep", "per_test_user_installation.exists"] | 0 | [] | The function (test_uninstall) defined within the public class called TestUserInstall.The function start at line 450 and ends at 468. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [450.0] and does not return any value. It declares 6.0 functions, and It has 6... |
aws-deadline_deadline-cloud | TestVerifySigning | public | 0 | 0 | test_windows_signing | def test_windows_signing(self, installer_path):"""Assumes that the Windows SDK is installed so we can find signtool:C:/Program Files*/Windows Kits/*/bin/*/x64/signtool.exeExample success:IndexAlgorithmTimestamp========================================0sha256 AuthenticodeSuccessfully verified: C:\\*.exeExample failure:In... | 2 | 13 | 2 | 82 | 0 | 477 | 513 | 477 | self,installer_path | [] | None | {"Assign": 3, "Expr": 1, "If": 1} | 6 | 37 | 6 | ["shutil.which", "next", "glob.iglob", "subprocess.run", "pytest.mark.skipif", "platform.system"] | 0 | [] | The function (test_windows_signing) defined within the public class called TestVerifySigning.The function start at line 477 and ends at 513. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [477.0] and does not return any value. It declares 6.0 functions, and ... |
aws-deadline_deadline-cloud | TestVerifySigning | public | 0 | 0 | test_linux_signing | def test_linux_signing(self, installer_path):"""Assumes that gpg is on the PATH, and that the public key has already been imported"""# GIVENgpg = shutil.which("gpg")assert gpg, "gpg not found in PATH"# WHENresult = subprocess.run([gpg, "--verify", f"{installer_path}.sig", installer_path],capture_output=True,text=True,)... | 1 | 15 | 2 | 75 | 0 | 516 | 539 | 516 | self,installer_path | [] | None | {"Assign": 2, "Expr": 1} | 4 | 24 | 4 | ["shutil.which", "subprocess.run", "pytest.mark.skipif", "platform.system"] | 0 | [] | The function (test_linux_signing) defined within the public class called TestVerifySigning.The function start at line 516 and ends at 539. It contains 15 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [516.0] and does not return any value. It declares 4.0 functions, and It... |
aws-deadline_deadline-cloud | TestVerifySigning | public | 0 | 0 | test_macos_signing | def test_macos_signing(self, installer_path):"""Tests that the relevant files are signed on MacOS. Assumes codesign and spectl are on the PATHLeverages codesign to check signing, and spctl to verify that MacOS does not complain about running it"""# GIVENcodesign = shutil.which("codesign")spctl = shutil.which("spctl")as... | 1 | 24 | 2 | 130 | 0 | 542 | 575 | 542 | self,installer_path | [] | None | {"Assign": 4, "Expr": 1} | 6 | 34 | 6 | ["shutil.which", "shutil.which", "subprocess.run", "subprocess.run", "pytest.mark.skipif", "platform.system"] | 0 | [] | The function (test_macos_signing) defined within the public class called TestVerifySigning.The function start at line 542 and ends at 575. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [542.0] and does not return any value. It declares 6.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | external_bucket | def external_bucket() -> str:"""Return a bucket that all developers and test accounts have access to, but isn't in the testers account."""return os.environ.get("INTEG_TEST_JA_CROSS_ACCOUNT_BUCKET", "job-attachment-bucket-snipe-test") | 1 | 2 | 0 | 18 | 0 | 9 | 13 | 9 | [] | str | {"Expr": 1, "Return": 1} | 2 | 5 | 2 | ["os.environ.get", "pytest.fixture"] | 0 | [] | The function (external_bucket) defined within the public class called public.The function start at line 9 and ends at 13. 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 2.0 functions, and It has 2.0 functions cal... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | default_job_template | def default_job_template() -> str:"""A generic job template with 2 steps. First step has 2 tasks and the second step has 1 task."""return json.dumps({"name": "custom-job","specificationVersion": "jobtemplate-2023-09","steps": [{"name": "custom-step","parameterSpace": {"taskParameterDefinitions": [{"name": "frame", "typ... | 1 | 47 | 0 | 172 | 0 | 17 | 66 | 17 | [] | str | {"Expr": 1, "Return": 1} | 2 | 50 | 2 | ["json.dumps", "pytest.fixture"] | 0 | [] | The function (default_job_template) defined within the public class called public.The function start at line 17 and ends at 66. It contains 47 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | default_job_template_step_step_dependency | def default_job_template_step_step_dependency() -> str:"""A generic job template with 2 steps. Second step depends on first step. Both steps have 1 task."""return json.dumps({"name": "custom-step-step-job","specificationVersion": "jobtemplate-2023-09","steps": [{"name": "custom-step","parameterSpace": {"taskParameterDe... | 1 | 48 | 0 | 180 | 0 | 70 | 120 | 70 | [] | str | {"Expr": 1, "Return": 1} | 2 | 51 | 2 | ["json.dumps", "pytest.fixture"] | 0 | [] | The function (default_job_template_step_step_dependency) defined within the public class called public.The function start at line 70 and ends at 120. It contains 48 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | default_job_template_one_task_one_step | def default_job_template_one_task_one_step() -> str:"""A generic job template with one step and one task."""return json.dumps({"name": "custom-job","specificationVersion": "jobtemplate-2023-09","steps": [{"name": "custom-step","parameterSpace": {"taskParameterDefinitions": [{"name": "frame", "type": "INT", "range": ["0... | 1 | 28 | 0 | 99 | 0 | 124 | 154 | 124 | [] | str | {"Expr": 1, "Return": 1} | 2 | 31 | 2 | ["json.dumps", "pytest.fixture"] | 0 | [] | The function (default_job_template_one_task_one_step) defined within the public class called public.The function start at line 124 and ends at 154. It contains 28 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, an... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | fresh_deadline_config | def fresh_deadline_config():"""Fixture to start with a blank AWS Deadline Cloud config file.This fixture is configured for autouse, so that every test is isolated fromthe user's config file."""# Clear the session cache as part of switching out the config.from deadline.client.api._session import invalidate_boto3_session... | 3 | 19 | 0 | 123 | 4 | 18 | 56 | 18 | ['temp_dir_path', 'temp_file_path', 'original_config_file_value', 'temp_dir'] | None | {"Assign": 6, "Expr": 6, "If": 1, "Try": 1, "With": 1} | 11 | 39 | 11 | ["invalidate_boto3_session_cache", "os.environ.get", "tempfile.TemporaryDirectory", "Path", "open", "temp_file.write", "str", "config_file.set_setting", "str", "temp_dir.cleanup", "pytest.fixture"] | 0 | [] | The function (fresh_deadline_config) defined within the public class called public.The function start at line 18 and ends at 56. It contains 19 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has 11.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | deadline_cli_test | def deadline_cli_test() -> DeadlineCliTest:"""Fixture to get the sessions DeadlineCliTest object."""return DeadlineCliTest() | 1 | 2 | 0 | 11 | 0 | 60 | 65 | 60 | [] | DeadlineCliTest | {"Expr": 1, "Return": 1} | 2 | 6 | 2 | ["DeadlineCliTest", "pytest.fixture"] | 0 | [] | The function (deadline_cli_test) defined within the public class called public.The function start at line 60 and ends at 65. 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 2.0 functions, and It has 2.0 functions ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | job_attachment_test | def job_attachment_test(tmp_path_factory: pytest.TempPathFactory,request: pytest.FixtureRequest,):"""Fixture to get the session's JobAttachmentTest object."""return JobAttachmentTest(tmp_path_factory, manifest_version=ManifestVersion.v2023_03_03) | 1 | 5 | 2 | 28 | 0 | 69 | 77 | 69 | tmp_path_factory,request | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 9 | 2 | ["JobAttachmentTest", "pytest.fixture"] | 0 | [] | The function (job_attachment_test) defined within the public class called public.The function start at line 69 and ends at 77. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [69.0], and this function return a value. It declares 2.0 functions, and It has 2.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | upload_input_files_assets_not_in_cas | def upload_input_files_assets_not_in_cas(job_attachment_test: JobAttachmentTest):"""When no assets are in the CAS, make sure all files are uploaded."""# IFjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,queue_id=job_attachment_test.queue_id,deadline_endpoint_url=job_attachment_test.deadline_endp... | 2 | 40 | 1 | 217 | 7 | 81 | 134 | 81 | job_attachment_test | ['object_summary_iterator', 'job_attachment_settings', 'mock_on_uploading_files', 'scene_ma_s3_path', 'upload_group', 'mock_on_preparing_to_submit', 'asset_manager'] | None | {"Assign": 8, "Expr": 2, "If": 1} | 16 | 54 | 16 | ["get_queue", "TypeError", "upload.S3AssetManager", "MagicMock", "MagicMock", "asset_manager.prepare_paths_for_upload", "str", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload_assets", "str", "job_attachment_settings.full_cas_prefix", "job_attachment_test.bucket.objects.filter", "lis... | 0 | [] | The function (upload_input_files_assets_not_in_cas) defined within the public class called public.The function start at line 81 and ends at 134. It contains 40 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 16.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | upload_input_files_one_asset_in_cas | def upload_input_files_one_asset_in_cas(job_attachment_test: JobAttachmentTest, upload_input_files_assets_not_in_cas: None) -> UploadInputFilesOneAssetInCasOutputs:"""Test that when one asset is already in the CAS, that every file except for the one in the CAS is uploaded."""# IFjob_attachment_settings = get_queue(farm... | 3 | 67 | 2 | 376 | 16 | 138 | 227 | 138 | job_attachment_test,upload_input_files_assets_not_in_cas | ['object_summary_iterator', 'brick_png_s3_path', 'job_attachment_settings', 'cloth_png_hash', 's3_objects', 'input_in_output_dir_hash', 'mock_on_uploading_files', 'scene_ma_s3_path', 'input_paths', 'brick_png_hash', 'cloth_png_s3_path', 'input_in_output_dir_s3_path', 'upload_group', 'scene_ma_upload_time', 'mock_on_pre... | UploadInputFilesOneAssetInCasOutputs | {"Assign": 18, "Expr": 1, "If": 1, "Return": 1} | 32 | 90 | 32 | ["get_queue", "Exception", "upload.S3AssetManager", "str", "str", "str", "str", "job_attachment_settings.full_cas_prefix", "job_attachment_test.bucket.Object", "MagicMock", "MagicMock", "asset_manager.prepare_paths_for_upload", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload_assets"... | 0 | [] | The function (upload_input_files_one_asset_in_cas) defined within the public class called public.The function start at line 138 and ends at 227. It contains 67 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [138.0] and does not return any value. It declares 32.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | get_job_bundle_path | def get_job_bundle_path(name: str) -> str:"""Get the path to a job bundle directory.Args:name: Name of the bundle (e.g., 'make_many_small_files')Returns:Path to the job bundle directory"""current_dir = Path(__file__).parentbundle_path = current_dir / "job_bundles" / nameif not bundle_path.exists():raise FileNotFoundErr... | 2 | 6 | 1 | 44 | 2 | 14 | 30 | 14 | name | ['bundle_path', 'current_dir'] | str | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 4 | 17 | 4 | ["Path", "bundle_path.exists", "FileNotFoundError", "str"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.job_templates_py.submit_job_bundle"] | The function (get_job_bundle_path) defined within the public class called public.The function start at line 14 and ends at 30. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions cal... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | submit_job_bundle | def submit_job_bundle(farm_id: str, queue_id: str, template_name: str, parameters: Optional[dict] = None) -> str:"""Submit a job using a local job bundle template.Args:farm_id: The farm ID to usequeue_id: The queue ID to usetemplate_name: Name of the template directoryparameters: Optional parameters to pass to the jobR... | 3 | 15 | 4 | 113 | 4 | 33 | 64 | 33 | farm_id,queue_id,template_name,parameters | ['bundle_path', 'config', 'job_id', 'job_parameters'] | str | {"Assign": 5, "Expr": 3, "If": 1, "Return": 1} | 6 | 32 | 6 | ["get_job_bundle_path", "parameters.items", "config_file.read_config", "config_file.set_setting", "config_file.set_setting", "create_job_from_job_bundle"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.job_templates_py.submit_dep_chain_job", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.job_templates_py.submit_d... | The function (submit_job_bundle) defined within the public class called public.The function start at line 33 and ends at 64. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [33.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions c... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | submit_make_many_small_files_job | def submit_make_many_small_files_job(farm_id: str,queue_id: str,files_per_task: int = 100,task_count: int = 100,output_dir: str = "output",) -> str:"""Submit a job that creates many small files.Args:farm_id: The farm ID to usequeue_id: The queue ID to usefiles_per_task: Number of files to create per tasktask_count: Num... | 1 | 9 | 5 | 60 | 1 | 67 | 89 | 67 | farm_id,queue_id,files_per_task,task_count,output_dir | ['parameters'] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 23 | 1 | ["submit_job_bundle"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.test_incremental_download_many_small_files"] | The function (submit_make_many_small_files_job) defined within the public class called public.The function start at line 67 and ends at 89. It contains 9 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 declare 1.0 function, It has 1.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | submit_make_many_small_files_slow_job | def submit_make_many_small_files_slow_job(farm_id: str,queue_id: str,files_per_task: int = 100,task_count: int = 100,output_dir: str = "output",) -> str:"""Submit a job that creates many small files with longer task duration (for requeue tests).Args:farm_id: The farm ID to usequeue_id: The queue ID to usefiles_per_task... | 1 | 9 | 5 | 60 | 1 | 92 | 114 | 92 | farm_id,queue_id,files_per_task,task_count,output_dir | ['parameters'] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 23 | 1 | ["submit_job_bundle"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.test_conflict_resolution_with_requeue"] | The function (submit_make_many_small_files_slow_job) defined within the public class called public.The function start at line 92 and ends at 114. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [92.0] and does not return any value. It declare 1.0 function, It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | submit_dep_data_flow_job | def submit_dep_data_flow_job(farm_id: str, queue_id: str, data_dir: Optional[str] = None, input_dir: Optional[str] = None) -> str:"""Submit a job with branching and merging step dependencies.Args:farm_id: The farm ID to usequeue_id: The queue ID to usedata_dir: The data directory to use (optional, defaults to ./data_di... | 3 | 9 | 4 | 72 | 1 | 117 | 142 | 117 | farm_id,queue_id,data_dir,input_dir | ['parameters'] | str | {"Assign": 3, "Expr": 1, "If": 2, "Return": 1} | 1 | 26 | 1 | ["submit_job_bundle"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.test_incremental_download_dep_data_flow"] | The function (submit_dep_data_flow_job) defined within the public class called public.The function start at line 117 and ends at 142. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [117.0] and does not return any value. It declare 1.0 function, It has 1.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | submit_dep_chain_job | def submit_dep_chain_job(farm_id: str, queue_id: str, output_dir: str = "output") -> str:"""Submit a job with a chain of step dependencies.Args:farm_id: The farm ID to usequeue_id: The queue ID to useoutput_dir: The output directory to useReturns:The job ID of the submitted job:param output_dir:"""parameters = {"JobNam... | 1 | 6 | 3 | 43 | 1 | 145 | 164 | 145 | farm_id,queue_id,output_dir | ['parameters'] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 20 | 1 | ["submit_job_bundle"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.test_incremental_download_dependency_chain"] | The function (submit_dep_chain_job) defined within the public class called public.The function start at line 145 and ends at 164. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [145.0] and does not return any value. It declare 1.0 function, It has 1.0 function... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | temp_dir | def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:asset_dir: str = os.path.join(tmpdir_path, "files")os.makedirs(asset_dir)with open(os.path.join(asset_dir, "file1.txt"),"w",encoding="utf8",) as f:f.write(MOCK_FILE_CASE["TEST_CASE_1"])with open(os.path.join(asset_dir, "file2.txt"),"w",encoding="utf8"... | 1 | 17 | 1 | 102 | 0 | 61 | 79 | 61 | self | [] | None | {"AnnAssign": 1, "Expr": 4, "With": 3} | 9 | 19 | 9 | ["tempfile.TemporaryDirectory", "os.path.join", "os.makedirs", "open", "os.path.join", "f.write", "open", "os.path.join", "f.write"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"] | The function (temp_dir) defined within the public class called TestAttachment.The function start at line 61 and ends at 79. It contains 17 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 9.0 functions, It has 9.0 functions calle... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | job_attachment_resources | def job_attachment_resources(self, deploy_job_attachment_resources: JobAttachmentManager):if deploy_job_attachment_resources.farm_id is None:raise TypeError("The Farm ID was not properly retrieved when initializing resources.")if (deploy_job_attachment_resources.queue is Noneor deploy_job_attachment_resources.queue_wit... | 4 | 9 | 2 | 43 | 0 | 82 | 91 | 82 | self,deploy_job_attachment_resources | [] | None | {"Expr": 1, "If": 2} | 2 | 10 | 2 | ["TypeError", "TypeError"] | 0 | [] | The function (job_attachment_resources) defined within the public class called TestAttachment.The function start at line 82 and ends at 91. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [82.0] and does not return any value. It declares 2.0 functions, and It ... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | test_attachment_s3_cross_account_access_denied | def test_attachment_s3_cross_account_access_denied(self, external_bucket, temp_dir):# Givenfile_name: str = f"{hash_data(temp_dir.encode('utf-8'), HashAlgorithm.XXH128)}_output"manifest_path: str = os.path.join(temp_dir, file_name)with open(manifest_path,"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE.get("TEST... | 1 | 46 | 3 | 158 | 0 | 95 | 146 | 95 | self,external_bucket,temp_dir | [] | None | {"AnnAssign": 2, "Assign": 3, "Expr": 1, "With": 1} | 9 | 52 | 9 | ["hash_data", "temp_dir.encode", "os.path.join", "open", "json.dump", "MOCK_MANIFEST_CASE.get", "CliRunner", "runner.invoke", "runner.invoke"] | 0 | [] | The function (test_attachment_s3_cross_account_access_denied) defined within the public class called TestAttachment.The function start at line 95 and ends at 146. It contains 46 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [95.0] and does not return any value. It declares... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | _run_attachment_basic_flow | def _run_attachment_basic_flow(self, temp_dir, job_attachment_resources, manifest_case_key) -> Tuple[str, str, str]:"""Helper function that runs the basic attachment flow and returns file info.This is used by both the basic flow test and the file override test."""# Givenfile_name: str = f"{hash_data(temp_dir.encode('ut... | 1 | 53 | 4 | 229 | 0 | 148 | 215 | 148 | self,temp_dir,job_attachment_resources,manifest_case_key | [] | Tuple[str, str, str] | {"AnnAssign": 2, "Assign": 5, "Expr": 2, "Return": 1, "With": 1} | 16 | 68 | 16 | ["hash_data", "temp_dir.encode", "os.path.join", "open", "json.dump", "CliRunner", "runner.invoke", "runner.invoke", "json.loads", "len", "os.listdir", "os.getcwd", "os.listdir", "os.path.join", "os.getcwd", "len"] | 0 | [] | The function (_run_attachment_basic_flow) defined within the public class called TestAttachment.The function start at line 148 and ends at 215. It contains 53 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [148.0] and does not return any value. It declares 16.0 functions, a... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | test_attachment_basic_flow | def test_attachment_basic_flow(self, temp_dir, job_attachment_resources, manifest_case_key):"""Test the basic attachment upload and download flow."""# Run the basic attachment flow and verify the results through assertions# (all assertions are done within _run_attachment_basic_flow)self._run_attachment_basic_flow(temp_... | 1 | 2 | 4 | 22 | 0 | 219 | 223 | 219 | self,temp_dir,job_attachment_resources,manifest_case_key | [] | None | {"Expr": 2} | 3 | 5 | 3 | ["self._run_attachment_basic_flow", "pytest.mark.parametrize", "MOCK_MANIFEST_CASE.keys"] | 0 | [] | The function (test_attachment_basic_flow) defined within the public class called TestAttachment.The function start at line 219 and ends at 223. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [219.0] and does not return any value. It declares 3.0 functions, and... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | test_attachment_path_mapping_flow | def test_attachment_path_mapping_flow(self, temp_dir, job_attachment_resources, manifest_case_key):# Givensource_path: str = os.path.join(temp_dir, "virtual_source")destination_path: str = temp_dirfile_name: str = f"{hash_data(source_path.encode('utf-8'), HashAlgorithm.XXH128)}_output"manifest_path: str = os.path.join(... | 1 | 70 | 4 | 276 | 0 | 227 | 309 | 227 | self,temp_dir,job_attachment_resources,manifest_case_key | [] | None | {"AnnAssign": 5, "Assign": 5, "Expr": 2, "With": 2} | 23 | 83 | 23 | ["os.path.join", "hash_data", "source_path.encode", "os.path.join", "open", "json.dump", "os.path.join", "open", "f.write", "json.dumps", "asdict", "PathMappingRule", "CliRunner", "runner.invoke", "runner.invoke", "json.loads", "len", "os.listdir", "os.path.join", "len", "len", "pytest.mark.parametrize", "MOCK_MANIFEST... | 0 | [] | The function (test_attachment_path_mapping_flow) defined within the public class called TestAttachment.The function start at line 227 and ends at 309. It contains 70 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [227.0] and does not return any value. It declares 23.0 funct... |
aws-deadline_deadline-cloud | TestAttachment | public | 0 | 0 | test_attachment_file_override | def test_attachment_file_override(self, temp_dir, job_attachment_resources, override_mode, expected_num_files, expected_files):test_case_key = "TEST_CASE_1"file_name, manifest_path, s3_root_uri = self._run_attachment_basic_flow(temp_dir=temp_dir,job_attachment_resources=job_attachment_resources,manifest_case_key=test_c... | 3 | 38 | 6 | 176 | 0 | 320 | 364 | 320 | self,temp_dir,job_attachment_resources,override_mode,expected_num_files,expected_files | [] | None | {"Assign": 6, "For": 1} | 15 | 45 | 15 | ["self._run_attachment_basic_flow", "CliRunner", "runner.invoke", "len", "json.loads", "os.listdir", "os.getcwd", "os.listdir", "os.path.join", "os.getcwd", "len", "pytest.mark.parametrize", "pytest.param", "pytest.param", "pytest.param"] | 0 | [] | The function (test_attachment_file_override) defined within the public class called TestAttachment.The function start at line 320 and ends at 364. It contains 38 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [320.0] and does not return any value. It declares 15.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_farm_get | def test_farm_get(deadline_cli_test: DeadlineCliTest) -> None:runner = CliRunner()result = runner.invoke(main,["farm", "get", "--farm-id", deadline_cli_test.farm_id],)assert result.exit_code == 0assert f"farmId: {deadline_cli_test.farm_id}" in result.output# The following vary from farm to farm, so just make sure the g... | 1 | 10 | 1 | 60 | 2 | 9 | 23 | 9 | deadline_cli_test | ['runner', 'result'] | None | {"Assign": 2} | 2 | 15 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_farm_get) defined within the public class called public.The function start at line 9 and ends at 23. 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 2.0 functions, and It has 2.0 functions call... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_farm_list | def test_farm_list(deadline_cli_test: DeadlineCliTest) -> None:runner = CliRunner()result = runner.invoke(main,["farm","list",],)assert result.exit_code == 0assert f"- farmId: {deadline_cli_test.farm_id}" in result.output# The following vary from farm to farm, so just make sure the general layout is there.# Unit tests ... | 1 | 12 | 1 | 49 | 2 | 26 | 42 | 26 | deadline_cli_test | ['runner', 'result'] | None | {"Assign": 2} | 2 | 17 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_farm_list) defined within the public class called public.The function start at line 26 and ends at 42. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ca... |
aws-deadline_deadline-cloud | IncrementalDownloadTest | public | 0 | 0 | __init__ | def __init__(self, farm_id: str, queue_id: str):self.farm_id = farm_idself.queue_id = queue_idself.deadline_client = boto3.client("deadline") | 1 | 4 | 3 | 33 | 0 | 32 | 35 | 32 | self,farm_id,queue_id | [] | None | {"Assign": 3} | 1 | 4 | 1 | ["boto3.client"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called IncrementalDownloadTest.The function start at line 32 and ends at 35. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [32.0] and does not return any value. It declare 1.0 function, It has 1.0 functi... |
aws-deadline_deadline-cloud | IncrementalDownloadTest | public | 0 | 0 | wait_for_job_completion | def wait_for_job_completion(self, job_id: str, timeout: int = 600, poll_interval: int = 5) -> Tuple[bool, str]:"""Wait for a job to complete. Returns (isSuccess, final_status)."""try:result = wait_for_job_completion(farm_id=self.farm_id,queue_id=self.queue_id,job_id=job_id,timeout=timeout,max_poll_interval=poll_interva... | 2 | 14 | 4 | 80 | 0 | 37 | 51 | 37 | self,job_id,timeout,poll_interval | [] | Tuple[bool, str] | {"Assign": 1, "Expr": 1, "Return": 2, "Try": 1} | 1 | 15 | 1 | ["wait_for_job_completion"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.IncrementalDownloadTest.wait_for_job_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_clo... | The function (wait_for_job_completion) defined within the public class called IncrementalDownloadTest.The function start at line 37 and ends at 51. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [37.0] and does not return any value. It declare 1.0 function, I... |
aws-deadline_deadline-cloud | IncrementalDownloadTest | public | 0 | 0 | wait_for_all_files | def wait_for_all_files(self,tmp_path: Path,expected_files: dict,test_name: str,file_pattern: str = "**/*.out",content_check: Optional[str] = None,exact_match: bool = False,count_only: bool = False,):"""Generic function to wait for all expected files to be downloaded with correct content."""result = self.run_incremental... | 9 | 42 | 8 | 211 | 0 | 54 | 106 | 54 | self,tmp_path,expected_files,test_name,file_pattern,content_check,exact_match,count_only | [] | None | {"Assign": 10, "Expr": 5, "For": 1, "If": 6, "Return": 1} | 19 | 53 | 19 | ["self.run_incremental_download_without_storage_profiles", "str", "list", "tmp_path.glob", "expected_files.get", "print", "len", "len", "len", "downloaded_file.read_text", "content.strip", "verified_files.append", "verified_files.append", "len", "print", "len", "len", "len", "_retry"] | 0 | [] | The function (wait_for_all_files) defined within the public class called IncrementalDownloadTest.The function start at line 54 and ends at 106. It contains 42 lines of code and it has a cyclomatic complexity of 9. It takes 8 parameters, represented as [54.0] and does not return any value. It declares 19.0 functions, an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.