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 | IncrementalDownloadTest | public | 0 | 0 | run_incremental_download_without_storage_profiles | def run_incremental_download_without_storage_profiles(self,output_dir: str,force_bootstrap: bool = False,conflict_resolution: Optional[str] = None,lookback_window: Optional[int] = None,test_name: Optional[str] = None,) -> subprocess.CompletedProcess:"""Run the incremental download CLI command."""# Use test-specific che... | 8 | 37 | 6 | 206 | 0 | 108 | 156 | 108 | self,output_dir,force_bootstrap,conflict_resolution,lookback_window,test_name | [] | subprocess.CompletedProcess | {"Assign": 4, "Expr": 8, "If": 6, "Return": 1} | 10 | 49 | 10 | ["os.path.join", "os.makedirs", "cmd.append", "cmd.extend", "cmd.extend", "str", "subprocess.run", "print", "print", "print"] | 0 | [] | The function (run_incremental_download_without_storage_profiles) defined within the public class called IncrementalDownloadTest.The function start at line 108 and ends at 156. It contains 37 lines of code and it has a cyclomatic complexity of 8. It takes 6 parameters, represented as [108.0] and does not return any valu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | incremental_download_test | def incremental_download_test(deadline_cli_test: DeadlineCliTest):"""Fixture to get the IncrementalDownloadTest object."""return IncrementalDownloadTest(farm_id=deadline_cli_test.farm_id, queue_id=deadline_cli_test.queue_id) | 1 | 4 | 1 | 23 | 0 | 160 | 164 | 160 | deadline_cli_test | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 5 | 2 | ["IncrementalDownloadTest", "pytest.fixture"] | 0 | [] | The function (incremental_download_test) defined within the public class called public.The function start at line 160 and ends at 164. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_download_many_small_files | def test_incremental_download_many_small_files(incremental_download_test, tmp_path):"""Test incremental download with many small files (10,000 files total)."""files_per_task = 100task_count = 100total_files = files_per_task * task_count# 10,000 filesunique_output_dir = f"{tmp_path}/many_small_files_output"print(f"[make... | 5 | 53 | 2 | 235 | 11 | 172 | 245 | 172 | incremental_download_test,tmp_path | ['total_files', 'job_complete', 'files_per_task', 'incremental_download_iteration_number', 'task_count', 'task_run_status', 'job_id', 'job_completion_timeout', 'unique_output_dir', 'job', 'start_time'] | None | {"Assign": 12, "AugAssign": 1, "Expr": 9, "If": 3, "While": 1} | 16 | 74 | 16 | ["print", "submit_make_many_small_files_job", "print", "time.time", "incremental_download_test.deadline_client.get_job", "job.get", "print", "incremental_download_test.run_incremental_download_without_storage_profiles", "str", "time.time", "time.sleep", "print", "incremental_download_test.wait_for_all_files", "print", ... | 0 | [] | The function (test_incremental_download_many_small_files) defined within the public class called public.The function start at line 172 and ends at 245. It contains 53 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [172.0] and does not return any value. It declares 16.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_download_dep_data_flow | def test_incremental_download_dep_data_flow(incremental_download_test, tmp_path):"""Test incremental download with dep_data_flow template."""# Create data and input directories in tmp_pathunique_data_dir = tmp_path / "data_dir"unique_data_dir.mkdir()# Create the required input files for the job templatecreate_job_input... | 5 | 69 | 2 | 318 | 12 | 253 | 349 | 253 | incremental_download_test,tmp_path | ['force_bootstrap_first', 'job_complete', 'incremental_download_iteration_number', 'unique_input_dir', 'unique_data_dir', 'task_run_status', 'job_id', 'job_completion_timeout', 'start_time', 'job', 'expected_files', 'create_job_input_content'] | None | {"Assign": 14, "AugAssign": 1, "Expr": 15, "If": 3, "While": 1} | 24 | 97 | 24 | ["unique_data_dir.mkdir", "write_text", "write_text", "unique_input_dir.mkdir", "write_text", "write_text", "submit_dep_data_flow_job", "str", "str", "print", "time.time", "print", "incremental_download_test.deadline_client.get_job", "job.get", "print", "incremental_download_test.run_incremental_download_without_storag... | 0 | [] | The function (test_incremental_download_dep_data_flow) defined within the public class called public.The function start at line 253 and ends at 349. It contains 69 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [253.0] and does not return any value. It declares 24.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_download_dependency_chain | def test_incremental_download_dependency_chain(incremental_download_test, tmp_path):"""Test incremental download with dep_chain template."""unique_output_dir = f"{tmp_path}/dep_chain_output"job_id = submit_dep_chain_job(farm_id=incremental_download_test.farm_id,queue_id=incremental_download_test.queue_id,output_dir=uni... | 6 | 48 | 2 | 235 | 12 | 357 | 425 | 357 | incremental_download_test,tmp_path | ['job_complete', 'expected_content', 'force_bootstrap', 'task_run_status', 'step_name', 'filename', 'job_id', 'job_completion_timeout', 'unique_output_dir', 'job', 'expected_files', 'start_time'] | None | {"Assign": 15, "Expr": 7, "For": 1, "If": 3, "While": 1} | 17 | 69 | 17 | ["submit_dep_chain_job", "time.time", "incremental_download_test.deadline_client.get_job", "job.get", "incremental_download_test.run_incremental_download_without_storage_profiles", "str", "time.time", "time.sleep", "time.sleep", "range", "chr", "ord", "print", "incremental_download_test.wait_for_all_files", "print", "p... | 0 | [] | The function (test_incremental_download_dependency_chain) defined within the public class called public.The function start at line 357 and ends at 425. It contains 48 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [357.0] and does not return any value. It declares 17.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_conflict_resolution_with_requeue | def test_conflict_resolution_with_requeue(incremental_download_test, requeue_level, tmp_path):"""Test incremental download with re-queuing at different levels and conflict resolution."""files_per_task = 10task_count = 2expected_initial_files = files_per_task * task_countunique_output_dir = tmp_path / f"output_{requeue_... | 1 | 40 | 3 | 157 | 6 | 434 | 489 | 434 | incremental_download_test,requeue_level,tmp_path | ['expected_initial_files', 'files_per_task', 'task_count', 'job_id', 'expected_final', 'unique_output_dir'] | None | {"Assign": 8, "Expr": 5} | 12 | 56 | 12 | ["unique_output_dir.mkdir", "os.listdir", "submit_make_many_small_files_slow_job", "incremental_download_test.wait_for_job_completion", "_run_download_until_complete", "_requeue_at_level", "incremental_download_test.wait_for_job_completion", "_get_expected_file_count", "_run_download_until_complete", "pytest.mark.timeo... | 0 | [] | The function (test_conflict_resolution_with_requeue) defined within the public class called public.The function start at line 434 and ends at 489. It contains 40 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [434.0] and does not return any value. It declares 12.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _run_download_until_complete | def _run_download_until_complete(test_instance, tmp_path, unique_output_dir, expected_count, level, phase):"""Run incremental download until expected file count is reached."""# Use the actual unique output directory passed from the testtest_output_dir = Path(unique_output_dir)for iteration in range(1, 11):# Max 10 iter... | 7 | 21 | 6 | 135 | 3 | 492 | 520 | 492 | test_instance,tmp_path,unique_output_dir,expected_count,level,phase | ['test_output_dir', 'result', 'files'] | None | {"Assign": 3, "Expr": 2, "For": 1, "If": 2} | 12 | 29 | 12 | ["Path", "range", "test_instance.run_incremental_download_without_storage_profiles", "str", "phase.title", "test_output_dir.exists", "list", "test_output_dir.glob", "len", "time.sleep", "len", "len"] | 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 (_run_download_until_complete) defined within the public class called public.The function start at line 492 and ends at 520. It contains 21 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [492.0] and does not return any value. It declares 12.0 functions, It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _wait_for_requeue_to_take_effect | def _wait_for_requeue_to_take_effect(test_instance, job_id, timeout=60):"""Wait for requeue to take effect by checking job status changes from SUCCEEDED."""client = test_instance.deadline_clientfarm_id = test_instance.farm_idqueue_id = test_instance.queue_idprint(f"Waiting for requeue to take effect for job {job_id}...... | 3 | 19 | 3 | 141 | 7 | 523 | 550 | 523 | test_instance,job_id,timeout | ['client', 'current_status', 'farm_id', 'task_run_status', 'start_time', 'job', 'queue_id'] | Returns | {"Assign": 8, "Expr": 5, "If": 1, "Return": 1, "While": 1} | 11 | 28 | 11 | ["print", "time.time", "time.time", "client.get_job", "job.get", "print", "print", "time.sleep", "client.get_job", "job.get", "AssertionError"] | 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._requeue_at_level"] | The function (_wait_for_requeue_to_take_effect) defined within the public class called public.The function start at line 523 and ends at 550. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [523.0], and this function return a value. It declares 11.0 functions,... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _requeue_at_level | def _requeue_at_level(test_instance, job_id, level):"""Requeue job at the specified level."""client = test_instance.deadline_clientfarm_id = test_instance.farm_idqueue_id = test_instance.queue_idif level == "job":client.update_job(farmId=farm_id, queueId=queue_id, jobId=job_id, targetTaskRunStatus="READY")else:steps = ... | 3 | 36 | 3 | 196 | 7 | 553 | 594 | 553 | test_instance,job_id,level | ['client', 'task_id', 'farm_id', 'steps', 'tasks', 'step_id', 'queue_id'] | None | {"Assign": 7, "Expr": 6, "If": 2} | 7 | 42 | 7 | ["client.update_job", "client.list_steps", "client.update_step", "client.list_tasks", "client.update_task", "print", "_wait_for_requeue_to_take_effect"] | 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 (_requeue_at_level) defined within the public class called public.The function start at line 553 and ends at 594. It contains 36 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [553.0] and does not return any value. It declares 7.0 functions, It has 7.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _get_expected_file_count | def _get_expected_file_count(level, initial_count, files_per_task):"""Calculate expected file count after requeue based on level."""return initial_count * 2 if level in ["job", "step"] else initial_count + files_per_task | 2 | 2 | 3 | 26 | 0 | 597 | 599 | 597 | level,initial_count,files_per_task | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 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 (_get_expected_file_count) defined within the public class called public.The function start at line 597 and ends at 599. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [597.0], and this function return a value. It has 1.0 function calling this fun... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | temp_dir | def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path | 1 | 3 | 1 | 16 | 0 | 32 | 34 | 32 | self | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["tempfile.TemporaryDirectory"] | 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 TestManifestDownload.The function start at line 32 and ends at 34. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | _assert_input_mainfests_exist | def _assert_input_mainfests_exist(self, files):assert "inputs/textures", "brick.png" in filesassert "inputs/textures", "cloth.png" in filesassert "inputs/scene.ma" in files | 1 | 4 | 2 | 23 | 0 | 36 | 39 | 36 | self,files | [] | None | {} | 0 | 4 | 0 | [] | 0 | [] | The function (_assert_input_mainfests_exist) defined within the public class called TestManifestDownload.The function start at line 36 and ends at 39. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [36.0] and does not return any value.. |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | _assert_output_manifests_exist | def _assert_output_manifests_exist(self, files):assert "output_file" in filesassert "output/nested_output_file" in files | 1 | 3 | 2 | 15 | 0 | 41 | 43 | 41 | self,files | [] | None | {} | 0 | 3 | 0 | [] | 0 | [] | The function (_assert_output_manifests_exist) defined within the public class called TestManifestDownload.The function start at line 41 and ends at 43. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [41.0] and does not return any value.. |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | _assert_dependent_step_output_exist | def _assert_dependent_step_output_exist(self, files):assert "dependent_step_output_file" in filesassert "dependent_step_output/nested_output_file" in files | 1 | 3 | 2 | 15 | 0 | 45 | 47 | 45 | self,files | [] | None | {} | 0 | 3 | 0 | [] | 0 | [] | The function (_assert_dependent_step_output_exist) defined within the public class called TestManifestDownload.The function start at line 45 and ends at 47. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [45.0] and does not return any value.. |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | check_json_mode_contains_files | def check_json_mode_contains_files(self, result):# If JSON mode was specified, make sure the output is JSON and contains the downloaded manifest file.download = json.loads(result.output)assert download is not Noneassert len(download["downloaded"]) == 1return download | 1 | 5 | 2 | 34 | 0 | 49 | 54 | 49 | self,result | [] | Returns | {"Assign": 1, "Return": 1} | 2 | 6 | 2 | ["json.loads", "len"] | 0 | [] | The function (check_json_mode_contains_files) defined within the public class called TestManifestDownload.The function start at line 49 and ends at 54. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [49.0], and this function return a value. It declares 2.0 fun... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | validate_result_exit_code_0 | def validate_result_exit_code_0(self, job_attachment_test, result):# Thenassert result.exit_code == 0, (f"{result.output}, {job_attachment_test.farm_id}, {job_attachment_test.queue_id}") | 1 | 4 | 3 | 20 | 0 | 56 | 60 | 56 | self,job_attachment_test,result | [] | None | {} | 0 | 5 | 0 | [] | 0 | [] | The function (validate_result_exit_code_0) defined within the public class called TestManifestDownload.The function start at line 56 and ends at 60. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [56.0] and does not return any value.. |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | run_cli_with_params | def run_cli_with_params(self, asset_type, job_attachment_test, job_id, json_output, step_id, temp_dir):runner = CliRunner()# Download for farm, queue, job to temp dir.args = ["manifest","download","--farm-id",job_attachment_test.farm_id,"--queue-id",job_attachment_test.queue_id,"--job-id",job_id,"--asset-type",asset_ty... | 3 | 24 | 7 | 88 | 0 | 62 | 89 | 62 | self,asset_type,job_attachment_test,job_id,json_output,step_id,temp_dir | [] | Returns | {"Assign": 3, "Expr": 3, "If": 2, "Return": 1} | 5 | 28 | 5 | ["CliRunner", "args.append", "args.append", "args.append", "runner.invoke"] | 0 | [] | The function (run_cli_with_params) defined within the public class called TestManifestDownload.The function start at line 62 and ends at 89. It contains 24 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [62.0], and this function return a value. It declares 5.0 functions, an... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | _setup_create_job | def _setup_create_job(self,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,job_template: str,job_attachment_test: JobAttachmentTest,) -> str:"""Create a job with the provided template and wait for the job to be created."""farm_id: str = job_attachment_test.farm_idqueue_id: str = job_attachment... | 1 | 27 | 4 | 123 | 0 | 91 | 129 | 91 | self,upload_input_files_one_asset_in_cas,job_template,job_attachment_test | [] | str | {"AnnAssign": 3, "Assign": 2, "Expr": 2, "Return": 1} | 4 | 39 | 4 | ["job_attachment_test.deadline_client.create_job", "upload_input_files_one_asset_in_cas.attachments.to_dict", "job_attachment_test.deadline_client.get_waiter", "waiter.wait"] | 0 | [] | The function (_setup_create_job) defined within the public class called TestManifestDownload.The function start at line 91 and ends at 129. It contains 27 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [91.0] and does not return any value. It declares 4.0 functions, and It... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | validate_manifest_is_not_None | def validate_manifest_is_not_None(self, manifest_file):manifest: BaseAssetManifest = decode_manifest(manifest_file.read())assert manifest is not Nonereturn manifest | 1 | 4 | 2 | 26 | 0 | 131 | 134 | 131 | self,manifest_file | [] | Returns | {"AnnAssign": 1, "Return": 1} | 2 | 4 | 2 | ["decode_manifest", "manifest_file.read"] | 0 | [] | The function (validate_manifest_is_not_None) defined within the public class called TestManifestDownload.The function start at line 131 and ends at 134. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [131.0], and this function return a value. It declares 2.0 f... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | _sync_mock_output_file | def _sync_mock_output_file(self,job_attachment_test: JobAttachmentTest,job_id: str,first_step_name: str,second_step_name: Optional[str],asset_root_path: str,output_file_path: str,nested_output_file_path: str,) -> str:"""Create a fake manifest file, upload it as a step output and return the step ID that is dependent.job... | 4 | 54 | 8 | 289 | 0 | 136 | 206 | 136 | self,job_attachment_test,job_id,first_step_name,second_step_name,asset_root_path,output_file_path,nested_output_file_path | [] | str | {"Assign": 9, "Expr": 2, "Return": 1} | 11 | 71 | 11 | ["job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "AssetSync", "AssetManifest", "HashAlgorithm", "ManifestPath", "ManifestPath", "_float_to_iso_datetime_string", "time.time", "job_attachment_test.job_attachment_settings.full_output_prefix", "asset_sync._upload_output_m... | 0 | [] | The function (_sync_mock_output_file) defined within the public class called TestManifestDownload.The function start at line 136 and ends at 206. It contains 54 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [136.0] and does not return any value. It declares 11.0 functions,... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | test_manifest_download_job_asset_type_with_no_step_dependency | def test_manifest_download_job_asset_type_with_no_step_dependency(self,temp_dir: str,json_output: bool,asset_type: str,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,default_job_template: str,job_attachment_test: JobAttachmentTest,):# Given:# Create a jobjob_id: str = self._setup_create_job(u... | 6 | 44 | 7 | 226 | 0 | 218 | 274 | 218 | self,temp_dir,json_output,asset_type,upload_input_files_one_asset_in_cas,default_job_template,job_attachment_test | [] | None | {"AnnAssign": 4, "Assign": 3, "Expr": 5, "If": 4, "With": 1} | 15 | 57 | 15 | ["self._setup_create_job", "self._sync_mock_output_file", "self.run_cli_with_params", "self.validate_result_exit_code_0", "self.check_json_mode_contains_files", "open", "self.validate_manifest_is_not_None", "self._assert_input_mainfests_exist", "self._assert_output_manifests_exist", "self._assert_input_mainfests_exist"... | 0 | [] | The function (test_manifest_download_job_asset_type_with_no_step_dependency) defined within the public class called TestManifestDownload.The function start at line 218 and ends at 274. It contains 44 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [218.0] and does not return... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | test_manifest_download_asset_type_with_job_step_dependency | def test_manifest_download_asset_type_with_job_step_dependency(self,temp_dir: str,asset_type: str,json_output: bool,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,default_job_template_step_step_dependency: str,job_attachment_test: JobAttachmentTest,):# Create a job, with step step dependency.... | 6 | 58 | 7 | 259 | 0 | 286 | 357 | 286 | self,temp_dir,asset_type,json_output,upload_input_files_one_asset_in_cas,default_job_template_step_step_dependency,job_attachment_test | [] | None | {"AnnAssign": 3, "Assign": 3, "Expr": 9, "If": 4, "With": 1} | 18 | 72 | 18 | ["self._setup_create_job", "self._sync_mock_output_file", "self._sync_mock_output_file", "self.run_cli_with_params", "self.validate_result_exit_code_0", "self.check_json_mode_contains_files", "open", "self.validate_manifest_is_not_None", "self._assert_input_mainfests_exist", "self._assert_output_manifests_exist", "self... | 0 | [] | The function (test_manifest_download_asset_type_with_job_step_dependency) defined within the public class called TestManifestDownload.The function start at line 286 and ends at 357. It contains 58 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [286.0] and does not return an... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | test_manifest_download_output_only_for_one_step | def test_manifest_download_output_only_for_one_step(self,temp_dir: str,json_output: bool,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,default_job_template_step_step_dependency: str,job_attachment_test: JobAttachmentTest,):# Create a job, with step-step dependency.job_id: str = self._setup_c... | 3 | 49 | 6 | 208 | 0 | 366 | 426 | 366 | self,temp_dir,json_output,upload_input_files_one_asset_in_cas,default_job_template_step_step_dependency,job_attachment_test | [] | None | {"AnnAssign": 4, "Assign": 3, "Expr": 3, "If": 1, "With": 1} | 12 | 61 | 12 | ["self._setup_create_job", "self._sync_mock_output_file", "self._sync_mock_output_file", "self.run_cli_with_params", "self.validate_result_exit_code_0", "self.check_json_mode_contains_files", "open", "self.validate_manifest_is_not_None", "self._assert_output_manifests_exist", "pytest.mark.parametrize", "pytest.param", ... | 0 | [] | The function (test_manifest_download_output_only_for_one_step) defined within the public class called TestManifestDownload.The function start at line 366 and ends at 426. It contains 49 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [366.0] and does not return any value. It... |
aws-deadline_deadline-cloud | TestManifestDownload | public | 0 | 0 | test_manifest_download_job_input_with_given_step_and_step_dependency | def test_manifest_download_job_input_with_given_step_and_step_dependency(self,temp_dir: str,json_output: bool,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,default_job_template_step_step_dependency: str,job_attachment_test: JobAttachmentTest,):# Given:# Create a job, with step step dependenc... | 3 | 48 | 6 | 202 | 0 | 435 | 495 | 435 | self,temp_dir,json_output,upload_input_files_one_asset_in_cas,default_job_template_step_step_dependency,job_attachment_test | [] | None | {"AnnAssign": 4, "Assign": 3, "Expr": 4, "If": 1, "With": 1} | 13 | 61 | 13 | ["self._setup_create_job", "self._sync_mock_output_file", "self._sync_mock_output_file", "self.run_cli_with_params", "self.validate_result_exit_code_0", "self.check_json_mode_contains_files", "open", "self.validate_manifest_is_not_None", "self._assert_input_mainfests_exist", "self._assert_dependent_step_output_exist", ... | 0 | [] | The function (test_manifest_download_job_input_with_given_step_and_step_dependency) defined within the public class called TestManifestDownload.The function start at line 435 and ends at 495. It contains 48 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [435.0] and does not... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | temp_dir | def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path | 1 | 3 | 1 | 16 | 0 | 24 | 26 | 24 | self | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["tempfile.TemporaryDirectory"] | 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 TestManifestSnapshot.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | manifest_dir | def manifest_dir(self, temp_dir):manifest_dir = os.path.join(temp_dir, "manifest_dir")os.makedirs(manifest_dir)yield manifest_dir | 1 | 4 | 2 | 27 | 0 | 29 | 33 | 29 | self,temp_dir | [] | None | {"Assign": 1, "Expr": 2} | 2 | 5 | 2 | ["os.path.join", "os.makedirs"] | 0 | [] | The function (manifest_dir) defined within the public class called TestManifestSnapshot.The function start at line 29 and ends at 33. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0] and does not return any value. It declares 2.0 functions, and It has 2.... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | _create_test_manifest | def _create_test_manifest(self, tmp_path: str, root_dir: str) -> str:"""Create some test files in the temp dir, snapshot it and return the manifest file."""TEST_MANIFEST_DIR = "manifest_dir"# Givenmanifest_dir = os.path.join(tmp_path, TEST_MANIFEST_DIR)os.makedirs(manifest_dir)subdir1 = os.path.join(root_dir, "subdir1"... | 1 | 32 | 3 | 194 | 0 | 35 | 77 | 35 | self,tmp_path,root_dir | [] | str | {"Assign": 8, "Expr": 6, "Return": 1} | 18 | 43 | 18 | ["os.path.join", "os.makedirs", "os.path.join", "os.path.join", "os.makedirs", "os.makedirs", "touch", "Path", "os.path.join", "touch", "Path", "os.path.join", "CliRunner", "runner.invoke", "os.listdir", "len", "len", "os.path.join"] | 0 | [] | The function (_create_test_manifest) defined within the public class called TestManifestSnapshot.The function start at line 35 and ends at 77. It contains 32 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [35.0] and does not return any value. It declares 18.0 functions, and... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | test_manifest_diff | def test_manifest_diff(self, tmp_path: str, json_output: bool):"""Tests if manifest diff CLI works, basic case. Variation on JSON as printout.Business logic testing will be done at the API level where we can check the outputs."""TEST_ROOT_DIR = "root_dir"# Given a created manifest file...root_dir = os.path.join(tmp_pat... | 3 | 16 | 3 | 138 | 0 | 86 | 114 | 86 | self,tmp_path,json_output | [] | None | {"Assign": 8, "Expr": 3, "If": 2} | 13 | 29 | 13 | ["os.path.join", "self._create_test_manifest", "touch", "Path", "os.path.join", "CliRunner", "args.append", "runner.invoke", "json.loads", "len", "pytest.mark.parametrize", "pytest.param", "pytest.param"] | 0 | [] | The function (test_manifest_diff) defined within the public class called TestManifestSnapshot.The function start at line 86 and ends at 114. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [86.0] and does not return any value. It declares 13.0 functions, and ... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | test_manifest_snapshot_and_diff_with_include | def test_manifest_snapshot_and_diff_with_include(self, tmp_path: str, manifest_dir: str):"""Tests creating a snapshot of the whole root directory and then running a diff with an include filter.This verifies that:1. The initial snapshot contains all files2. The diff correctly identifies changes only in the included subd... | 2 | 41 | 3 | 242 | 0 | 116 | 175 | 116 | self,tmp_path,manifest_dir | [] | None | {"Assign": 13, "Expr": 5, "For": 1, "With": 1} | 21 | 60 | 21 | ["os.path.join", "self._create_test_manifest", "touch", "Path", "os.path.join", "Path", "os.path.join", "nested_file_path.parent.mkdir", "nested_file_path.touch", "CliRunner", "runner.invoke", "os.listdir", "len", "len", "os.path.join", "open", "json.load", "set", "manifest_data.get", "actual_files.add", "file_entry.ge... | 0 | [] | The function (test_manifest_snapshot_and_diff_with_include) defined within the public class called TestManifestSnapshot.The function start at line 116 and ends at 175. It contains 41 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [116.0] and does not return any value. It de... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | test_manifest_snapshot_over_windows_path_limit | def test_manifest_snapshot_over_windows_path_limit(self, tmp_path: WindowsPath):"""Tests that if the snapshot root directory is almost as long as the Windows path length limit,the snapshot will still work despite reaching over the Windows path length limit.See https://learn.microsoft.com/en-us/windows/win32/fileio/maxi... | 1 | 40 | 2 | 223 | 0 | 182 | 240 | 182 | self,tmp_path | [] | None | {"AnnAssign": 6, "Assign": 2, "Expr": 4} | 23 | 59 | 23 | ["len", "str", "os.path.join", "os.makedirs", "touch", "Path", "os.path.join", "os.path.join", "math.floor", "os.makedirs", "len", "CliRunner", "runner.invoke", "result.stdout.lower", "os.listdir", "len", "len", "len", "os.path.join", "len", "os.path.join", "pytest.mark.skipif", "_is_windows_long_path_registry_enabled"... | 0 | [] | The function (test_manifest_snapshot_over_windows_path_limit) defined within the public class called TestManifestSnapshot.The function start at line 182 and ends at 240. It contains 40 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [182.0] and does not return any value. It ... |
aws-deadline_deadline-cloud | TestManifestSnapshot | public | 0 | 0 | test_manifest_snapshot_over_windows_path_limit_json | def test_manifest_snapshot_over_windows_path_limit_json(self, tmp_path: WindowsPath):"""Tests that if the snapshot root directory is almost as long as the Windows path length limit,the snapshot will still work despite reaching over the Windows path length limit.This test uses json output in the cli options and verifies... | 1 | 41 | 2 | 232 | 0 | 247 | 308 | 247 | self,tmp_path | [] | None | {"AnnAssign": 6, "Assign": 2, "Expr": 4} | 24 | 62 | 24 | ["len", "str", "os.path.join", "os.makedirs", "touch", "Path", "os.path.join", "os.path.join", "math.floor", "os.makedirs", "len", "CliRunner", "runner.invoke", "get", "json.loads", "os.listdir", "len", "len", "len", "os.path.join", "len", "os.path.join", "pytest.mark.skipif", "_is_windows_long_path_registry_enabled"] | 0 | [] | The function (test_manifest_snapshot_over_windows_path_limit_json) defined within the public class called TestManifestSnapshot.The function start at line 247 and ends at 308. It contains 41 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [247.0] and does not return any value... |
aws-deadline_deadline-cloud | TestManifestUpload | public | 0 | 0 | temp_dir | def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path | 1 | 3 | 1 | 16 | 0 | 44 | 46 | 44 | self | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["tempfile.TemporaryDirectory"] | 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 TestManifestUpload.The function start at line 44 and ends at 46. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function calle... |
aws-deadline_deadline-cloud | TestManifestUpload | public | 0 | 0 | create_manifest_file | def create_manifest_file(self, root_directory: str, destination_directory: str) -> str:"""Create a test manifest file, and return the full path for testing."""# Given a snapshot file:test_file_name = "test_file"test_file = os.path.join(root_directory, test_file_name)os.makedirs(os.path.dirname(test_file), exist_ok=True... | 1 | 12 | 3 | 101 | 0 | 48 | 68 | 48 | self,root_directory,destination_directory | [] | str | {"AnnAssign": 1, "Assign": 2, "Expr": 3, "Return": 1, "With": 1} | 6 | 21 | 6 | ["os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot"] | 0 | [] | The function (create_manifest_file) defined within the public class called TestManifestUpload.The function start at line 48 and ends at 68. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [48.0] and does not return any value. It declares 6.0 functions, and It... |
aws-deadline_deadline-cloud | TestManifestUpload | public | 0 | 0 | test_manifest_upload | def test_manifest_upload(self, temp_dir: str):"""Simple test to generate a manifest, and then call the upload CLI to upload to S3.The test verifies the manifest is uploaded by doing a S3 get call."""# Given a snapshot file:manifest_file = self.create_manifest_file(temp_dir, temp_dir)manifest_file_name = Path(manifest_f... | 1 | 21 | 2 | 117 | 0 | 70 | 104 | 70 | self,temp_dir | [] | None | {"Assign": 7, "Expr": 4} | 9 | 35 | 9 | ["self.create_manifest_file", "Path", "os.environ.get", "CliRunner", "main.add_command", "runner.invoke", "boto3.client", "s3_client.head_object", "s3_client.delete_object"] | 0 | [] | The function (test_manifest_upload) defined within the public class called TestManifestUpload.The function start at line 70 and ends at 104. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [70.0] and does not return any value. It declares 9.0 functions, and I... |
aws-deadline_deadline-cloud | TestManifestUpload | public | 0 | 0 | test_manifest_upload_by_farm_queue | def test_manifest_upload_by_farm_queue(self, temp_dir: str):"""Simple test to generate a manifest, and then call the upload CLI to upoad to S3.This test case uses --farm-id and --queue-idThe test verifies the manifest is uploaded by doing a S3 get call."""# Given a snapshot file:manifest_file = self.create_manifest_fil... | 2 | 28 | 2 | 168 | 0 | 106 | 149 | 106 | self,temp_dir | [] | None | {"Assign": 10, "Expr": 4, "Try": 1} | 12 | 44 | 12 | ["self.create_manifest_file", "Path", "os.environ.get", "os.environ.get", "os.environ.get", "CliRunner", "runner.invoke", "get_queue", "boto3.client", "s3_client.head_object", "pytest.fail", "s3_client.delete_object"] | 0 | [] | The function (test_manifest_upload_by_farm_queue) defined within the public class called TestManifestUpload.The function start at line 106 and ends at 149. It contains 28 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [106.0] and does not return any value. It declares 12.0 ... |
aws-deadline_deadline-cloud | TestManifestUpload | public | 0 | 0 | test_manifest_upload_over_windows_path_limit | def test_manifest_upload_over_windows_path_limit(self, tmp_path):"""Tests that when a manifest is created over the windows path limit, it is able to be uploaded and there are no issues."""tmp_path_str = str(tmp_path)# Create a manifest directory that is almost as long as the Windows path length limit.manifest_directory... | 1 | 33 | 2 | 180 | 0 | 155 | 203 | 155 | self,tmp_path | [] | None | {"AnnAssign": 4, "Assign": 6, "Expr": 4} | 17 | 49 | 17 | ["str", "len", "os.path.join", "math.floor", "self.create_manifest_file", "os.path.join", "len", "Path", "os.environ.get", "CliRunner", "main.add_command", "runner.invoke", "boto3.client", "s3_client.head_object", "s3_client.delete_object", "pytest.mark.skipif", "_is_windows_long_path_registry_enabled"] | 0 | [] | The function (test_manifest_upload_over_windows_path_limit) defined within the public class called TestManifestUpload.The function start at line 155 and ends at 203. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [155.0] and does not return any value. It decl... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_get | def test_queue_get(deadline_cli_test: DeadlineCliTest) -> None:runner = CliRunner()result = runner.invoke(main,["queue","get","--queue-id",deadline_cli_test.queue_id,"--farm-id",deadline_cli_test.farm_id,],)assert result.exit_code == 0assert f"queueId: {deadline_cli_test.queue_id}" in result.output# The following vary ... | 1 | 19 | 1 | 80 | 2 | 12 | 35 | 12 | deadline_cli_test | ['runner', 'result'] | None | {"Assign": 2} | 2 | 24 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_queue_get) defined within the public class called public.The function start at line 12 and ends at 35. It contains 19 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 | public | public | 0 | 0 | test_queue_list | def test_queue_list(deadline_cli_test: DeadlineCliTest) -> None:runner = CliRunner()result = runner.invoke(main,["queue", "list", "--farm-id", deadline_cli_test.farm_id],)assert result.exit_code == 0assert f"- queueId: {deadline_cli_test.queue_id}" in result.output# The following vary from queue to queue, so just make ... | 1 | 9 | 1 | 54 | 2 | 38 | 51 | 38 | deadline_cli_test | ['runner', 'result'] | None | {"Assign": 2} | 2 | 14 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_queue_list) defined within the public class called public.The function start at line 38 and ends at 51. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ca... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials | def test_queue_export_credentials(deadline_cli_test: DeadlineCliTest) -> None:runner = CliRunner()result = runner.invoke(main,["queue","export-credentials","--farm-id",deadline_cli_test.farm_id,"--queue-id",deadline_cli_test.queue_id,],)try:assert result.exit_code == 0creds = json.loads(result.output)# Transform creden... | 3 | 29 | 1 | 140 | 6 | 54 | 95 | 54 | deadline_cli_test | ['creds', '_', 'sts', 'runner', 'session', 'result'] | None | {"Assign": 6, "Expr": 1, "Try": 1} | 8 | 42 | 8 | ["CliRunner", "runner.invoke", "json.loads", "datetime.datetime.fromisoformat", "boto3.Session", "session.client", "sts.get_caller_identity", "type"] | 0 | [] | The function (test_queue_export_credentials) defined within the public class called public.The function start at line 54 and ends at 95. It contains 29 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 8.0 functions, and It has 8... |
aws-deadline_deadline-cloud | DeadlineCliTest | public | 0 | 0 | __init__ | def __init__(self):"""Sets up resources that the integ tests will need"""self.farm_id: str = os.environ["FARM_ID"]self.queue_id: str = os.environ["QUEUE_ID"] | 1 | 3 | 1 | 30 | 0 | 21 | 27 | 21 | self | [] | None | {"AnnAssign": 2, "Expr": 1} | 0 | 7 | 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 DeadlineCliTest.The function start at line 21 and ends at 27. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4993.0 functions calling this function which a... |
aws-deadline_deadline-cloud | DeadlineCliTest | public | 0 | 0 | __init__ | def __init__(self,tmp_path_factory: TempPathFactory,manifest_version: ManifestVersion,):"""Sets up resource that these integration tests will need."""self.farm_id: str = os.environ.get("FARM_ID", "")self.queue_id: str = os.environ.get("QUEUE_ID", "")self.bucket = boto3.resource("s3").Bucket(os.environ.get("JOB_ATTACHME... | 1 | 22 | 3 | 161 | 0 | 44 | 73 | 44 | self | [] | None | {"AnnAssign": 2, "Expr": 1} | 0 | 7 | 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 DeadlineCliTest.The function start at line 44 and ends at 73. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [44.0] and does not return any value. It has 4993.0 functions calling this function whi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | is_windows_non_admin | def is_windows_non_admin():return sys.platform == "win32" and getpass.getuser() != "Administrator" | 2 | 2 | 0 | 18 | 0 | 7 | 8 | 7 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["getpass.getuser"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.deadline_job_attachments.test_job_attachments_py.test_sync_outputs_with_symlink", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.te... | The function (is_windows_non_admin) defined within the public class called public.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function cal... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | notifier_callback | def notifier_callback(progress: float, message: str) -> None:pass | 1 | 2 | 2 | 14 | 0 | 44 | 45 | 44 | progress,message | [] | None | {} | 0 | 2 | 0 | [] | 0 | [] | The function (notifier_callback) defined within the public class called public.The function start at line 44 and ends at 45. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value.. |
aws-deadline_deadline-cloud | JobAttachmentTest | public | 0 | 0 | __init__ | def __init__(self,deploy_job_attachment_resources: JobAttachmentManager,tmp_path_factory: TempPathFactory,manifest_version: ManifestVersion,):"""Sets up resource that these integration tests will need."""self.job_attachment_resources = deploy_job_attachment_resourcesif self.job_attachment_resources.farm_id is None:rais... | 4 | 28 | 4 | 178 | 0 | 65 | 100 | 65 | self,deploy_job_attachment_resources,tmp_path_factory,manifest_version | [] | None | {"Assign": 12, "Expr": 1, "If": 2} | 8 | 36 | 8 | ["TypeError", "TypeError", "Bucket", "boto3.resource", "tmp_path_factory.mktemp", "tmp_path_factory.mktemp", "boto3.Session", "os.getenv"] | 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 JobAttachmentTest.The function start at line 65 and ends at 100. It contains 28 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [65.0] and does not return any value. It declares 8.0 functions, It has 8.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | job_attachment_test | def job_attachment_test(deploy_job_attachment_resources: JobAttachmentManager,tmp_path_factory: TempPathFactory,request: pytest.FixtureRequest,):"""Fixture to get the session's JobAttachmentTest object."""return JobAttachmentTest(deploy_job_attachment_resources, tmp_path_factory, manifest_version=request.param) | 1 | 8 | 3 | 32 | 0 | 104 | 115 | 104 | deploy_job_attachment_resources,tmp_path_factory,request | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 12 | 2 | ["JobAttachmentTest", "pytest.fixture"] | 0 | [] | The function (job_attachment_test) defined within the public class called public.The function start at line 104 and ends at 115. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [104.0], and this function return a value. It declares 2.0 functions, and It has 2.... |
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 | 119 | 172 | 119 | 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 119 and ends at 172. 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 | 181 | 270 | 181 | 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 181 and ends at 270. It contains 67 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [181.0] and does not return any value. It declares 32.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_upload_input_files_all_assets_in_cas | def test_upload_input_files_all_assets_in_cas(job_attachment_test: JobAttachmentTest,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,) -> None:"""Test that when all assets are already in the CAS, that no files are uploaded."""# IFjob_attachment_settings = get_queue(farm_id=job_attachment_test.... | 5 | 58 | 2 | 299 | 7 | 274 | 350 | 274 | job_attachment_test,upload_input_files_one_asset_in_cas | ['asset_manager', 'job_attachment_settings', 'mock_on_uploading_files', 'input_paths', 'upload_group', 'mock_on_preparing_to_submit', 'asset_upload_time'] | None | {"Assign": 9, "Expr": 1, "For": 1, "If": 2} | 19 | 77 | 19 | ["get_queue", "Exception", "upload.S3AssetManager", "str", "str", "str", "str", "job_attachment_test.bucket.objects.filter", "job_attachment_settings.full_cas_prefix", "MagicMock", "MagicMock", "asset_manager.prepare_paths_for_upload", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload... | 0 | [] | The function (test_upload_input_files_all_assets_in_cas) defined within the public class called public.The function start at line 274 and ends at 350. It contains 58 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [274.0] and does not return any value. It declares 19.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 392 | 393 | 392 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (sync_inputs.on_downloading_files) defined within the public class called public.The function start at line 392 and ends at 393. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [392.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs | def sync_inputs(job_attachment_test: JobAttachmentTest,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,tmp_path_factory: TempPathFactory,default_job_template: str,) -> SyncInputsOutputs:"""Test that all of the input files get synced locally."""# IFjob_attachment_settings = get_queue(farm_id=jo... | 1 | 43 | 4 | 244 | 5 | 363 | 419 | 363 | job_attachment_test,upload_input_files_one_asset_in_cas,tmp_path_factory,default_job_template | ['job_attachment_settings', 'session_dir', 'job_response', 'syncer', 'dest_dir'] | SyncInputsOutputs | {"Assign": 5, "Expr": 2, "Return": 2} | 19 | 57 | 19 | ["get_queue", "job_attachment_test.deadline_client.create_job", "upload_input_files_one_asset_in_cas.attachments.to_dict", "asset_sync.AssetSync", "tmp_path_factory.mktemp", "syncer.sync_inputs", "_get_unique_dest_dir_name", "str", "exists", "Path", "exists", "Path", "exists", "Path", "exists", "Path", "SyncInputsOutpu... | 0 | [] | The function (sync_inputs) defined within the public class called public.The function start at line 363 and ends at 419. It contains 43 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [363.0] and does not return any value. It declares 19.0 functions, and It has 19.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs_no_job_attachment_s3_settings.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 460 | 461 | 460 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (sync_inputs_no_job_attachment_s3_settings.on_downloading_files) defined within the public class called public.The function start at line 460 and ends at 461. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [460.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs_no_job_attachment_s3_settings | def sync_inputs_no_job_attachment_s3_settings(job_attachment_test: JobAttachmentTest,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,tmp_path_factory: TempPathFactory,default_job_template_one_task_one_step: str,caplog: LogCaptureFixture,) -> SyncInputsNoJobAttachmentS3SettingsOutput:"""Test th... | 1 | 46 | 5 | 212 | 3 | 430 | 487 | 430 | job_attachment_test,upload_input_files_one_asset_in_cas,tmp_path_factory,default_job_template_one_task_one_step,caplog | ['session_dir', 'syncer', 'job_response'] | SyncInputsNoJobAttachmentS3SettingsOutput | {"Assign": 3, "Expr": 2, "Return": 2} | 11 | 58 | 11 | ["caplog.set_level", "job_attachment_test.deadline_client.create_job", "upload_input_files_one_asset_in_cas.attachments.to_dict", "asset_sync.AssetSync", "tmp_path_factory.mktemp", "syncer.sync_inputs", "syncer.get_s3_settings", "syncer.get_attachments", "SummaryStatistics", "SyncInputsNoJobAttachmentS3SettingsOutput",... | 0 | [] | The function (sync_inputs_no_job_attachment_s3_settings) defined within the public class called public.The function start at line 430 and ends at 487. It contains 46 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [430.0] and does not return any value. It declares 11.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs_no_job_attachment_settings_in_job.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 527 | 528 | 527 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (sync_inputs_no_job_attachment_settings_in_job.on_downloading_files) defined within the public class called public.The function start at line 527 and ends at 528. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [527.0] and does not return any value... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_inputs_no_job_attachment_settings_in_job | def sync_inputs_no_job_attachment_settings_in_job(job_attachment_test: JobAttachmentTest,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,tmp_path_factory: TempPathFactory,default_job_template_one_task_one_step: str,caplog: LogCaptureFixture,) -> SyncInputsNoJobAttachmentSettingsInJobOutput:"""... | 1 | 42 | 5 | 199 | 3 | 498 | 551 | 498 | job_attachment_test,upload_input_files_one_asset_in_cas,tmp_path_factory,default_job_template_one_task_one_step,caplog | ['session_dir', 'syncer', 'job_response'] | SyncInputsNoJobAttachmentSettingsInJobOutput | {"Assign": 3, "Expr": 2, "Return": 2} | 10 | 54 | 10 | ["caplog.set_level", "job_attachment_test.deadline_client.create_job", "asset_sync.AssetSync", "tmp_path_factory.mktemp", "syncer.sync_inputs", "syncer.get_s3_settings", "syncer.get_attachments", "SummaryStatistics", "SyncInputsNoJobAttachmentSettingsInJobOutput", "pytest.fixture"] | 0 | [] | The function (sync_inputs_no_job_attachment_settings_in_job) defined within the public class called public.The function start at line 498 and ends at 551. It contains 42 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [498.0] and does not return any value. It declares 10.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_outputs_no_job_attachment_settings_in_job | def test_sync_outputs_no_job_attachment_settings_in_job(job_attachment_test: JobAttachmentTest,sync_inputs_no_job_attachment_settings_in_job: SyncInputsNoJobAttachmentSettingsInJobOutput,caplog: LogCaptureFixture,) -> None:"""Test that syncing outputs is skipped when the queue has no job attachment settings."""# IFcapl... | 1 | 45 | 3 | 230 | 3 | 555 | 610 | 555 | job_attachment_test,sync_inputs_no_job_attachment_settings_in_job,caplog | ['waiter', 'step_id', 'task_id'] | None | {"Assign": 3, "Expr": 4} | 9 | 56 | 9 | ["caplog.set_level", "job_attachment_test.deadline_client.get_waiter", "waiter.wait", "job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "sync_inputs_no_job_attachment_settings_in_job.asset_syncer.sync_outputs", "sync_inputs_no_job_attachment_settings_in_job.asset_syncer... | 0 | [] | The function (test_sync_outputs_no_job_attachment_settings_in_job) defined within the public class called public.The function start at line 555 and ends at 610. It contains 45 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [555.0] and does not return any value. It declares ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_outputs_no_job_attachment_s3_settings | def test_sync_outputs_no_job_attachment_s3_settings(job_attachment_test: JobAttachmentTest,sync_inputs_no_job_attachment_s3_settings: SyncInputsNoJobAttachmentS3SettingsOutput,caplog: LogCaptureFixture,) -> None:"""Test that syncing outputs is skipped when the job has no job attachment settings."""# IFcaplog.set_level(... | 1 | 44 | 3 | 230 | 3 | 614 | 668 | 614 | job_attachment_test,sync_inputs_no_job_attachment_s3_settings,caplog | ['waiter', 'step_id', 'task_id'] | None | {"Assign": 3, "Expr": 4} | 9 | 55 | 9 | ["caplog.set_level", "job_attachment_test.deadline_client.get_waiter", "waiter.wait", "job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "sync_inputs_no_job_attachment_s3_settings.asset_syncer.sync_outputs", "sync_inputs_no_job_attachment_s3_settings.asset_syncer.get_s3_... | 0 | [] | The function (test_sync_outputs_no_job_attachment_s3_settings) defined within the public class called public.The function start at line 614 and ends at 668. It contains 44 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [614.0] and does not return any value. It declares 9.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | sync_outputs | def sync_outputs(job_attachment_test: JobAttachmentTest,sync_inputs: SyncInputsOutputs,) -> SyncOutputsOutput:"""Test that all outputs from the job get synced to the JobAttachment S3 Bucket."""# IFjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,queue_id=job_attachment_test.queue_id,deadline_endp... | 5 | 123 | 2 | 656 | 22 | 686 | 846 | 686 | job_attachment_test,sync_inputs | ['render_start_time', 'object_summary_iterator', 'list_steps_response', 'job_attachment_settings', 'step0_id', 'file_to_be_synced_step1_task0', 'mock_on_uploading_files', 'step1_task0_id', 'summary_stats', 'step_ids', 'waiter', 'file_to_be_synced_step0_task1_base', 'file_to_be_synced_step0_task0', 'file_to_be_synced_st... | SyncOutputsOutput | {"Assign": 26, "Expr": 5, "If": 1, "Return": 1, "With": 3} | 28 | 161 | 28 | ["get_queue", "Exception", "job_attachment_test.deadline_client.get_waiter", "waiter.wait", "job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "job_attachment_test.deadline_client.list_tasks", "time.time", "MagicMock", "open", "f.write", "sync_inputs.asset_syncer.sync_ou... | 0 | [] | The function (sync_outputs) defined within the public class called public.The function start at line 686 and ends at 846. It contains 123 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [686.0] and does not return any value. It declares 28.0 functions, and It has 28.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_outputs_with_symlink | def test_sync_outputs_with_symlink(job_attachment_test: JobAttachmentTest,sync_inputs: SyncInputsOutputs,tmp_path,) -> None:"""Test that a symlink pointing to a file outside the session directory is not synced as output."""job_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,queue_id=job_attachment_t... | 4 | 59 | 3 | 326 | 14 | 854 | 926 | 854 | job_attachment_test,sync_inputs,tmp_path | ['list_steps_response', 'job_attachment_settings', 'step0_id', 'symlink_output', 'mock_on_uploading_files', 'summary_stats', 'symlink_path', 'step_ids', 'list_tasks_response', 'tmp_dir', 'symlink_target_path', 'waiter', 'task_ids', 'step0_task0_id'] | None | {"Assign": 14, "Expr": 5, "If": 1} | 16 | 73 | 16 | ["get_queue", "Exception", "job_attachment_test.deadline_client.get_waiter", "waiter.wait", "job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "Path", "tmp_dir.mkdir", "symlink_target_path.write_text", "symlink_path.symlink_to", "symlink_path.is_symlink", "MagicMock", "s... | 0 | [] | The function (test_sync_outputs_with_symlink) defined within the public class called public.The function start at line 854 and ends at 926. It contains 59 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [854.0] and does not return any value. It declares 16.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_with_step_dependencies.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 959 | 960 | 959 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_sync_inputs_with_step_dependencies.on_downloading_files) defined within the public class called public.The function start at line 959 and ends at 960. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [959.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_with_step_dependencies | def test_sync_inputs_with_step_dependencies(job_attachment_test: JobAttachmentTest,tmp_path_factory: TempPathFactory,sync_outputs: SyncOutputsOutput,):"""Test that sync_inputs() syncs the inputs specified in job settings, and the outputs from other stepsspecified in step dependencies."""# IFjob_attachment_settings = ge... | 2 | 37 | 3 | 263 | 7 | 930 | 984 | 930 | job_attachment_test,tmp_path_factory,sync_outputs | ['list_steps_response', 'job_attachment_settings', 'step0_id', 'session_dir', 'step_ids', 'syncer', 'dest_dir'] | Returns | {"Assign": 7, "Expr": 2, "Return": 1} | 21 | 55 | 21 | ["get_queue", "job_attachment_test.deadline_client.list_steps", "tmp_path_factory.mktemp", "asset_sync.AssetSync", "syncer.sync_inputs", "_get_unique_dest_dir_name", "str", "exists", "Path", "exists", "Path", "exists", "Path", "exists", "Path", "exists", "Path", "exists", "Path", "exists", "Path"] | 0 | [] | The function (test_sync_inputs_with_step_dependencies) defined within the public class called public.The function start at line 930 and ends at 984. It contains 37 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [930.0], and this function return a value. It declares 21.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_with_job_id_step_id_task_id_and_download_directory | def test_download_outputs_with_job_id_step_id_task_id_and_download_directory(job_attachment_test: JobAttachmentTest, tmp_path: Path, sync_outputs: SyncOutputsOutput):"""Test that outputs for a task are downloaded to the correct location locally"""# GIVENjob_attachment_settings = get_queue(farm_id=job_attachment_test.fa... | 3 | 23 | 3 | 120 | 2 | 988 | 1,019 | 988 | job_attachment_test,tmp_path,sync_outputs | ['job_output_downloader', 'job_attachment_settings'] | None | {"Assign": 2, "Expr": 3, "If": 1, "Try": 1} | 7 | 32 | 7 | ["get_queue", "TypeError", "download.OutputDownloader", "job_output_downloader.download_job_output", "exists", "Path", "_cleanup_outputs_dir"] | 0 | [] | The function (test_download_outputs_with_job_id_step_id_task_id_and_download_directory) defined within the public class called public.The function start at line 988 and ends at 1019. It contains 23 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [988.0] and does not return a... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_with_job_id_step_id_and_download_directory | def test_download_outputs_with_job_id_step_id_and_download_directory(job_attachment_test: JobAttachmentTest, tmp_path: Path, sync_outputs: SyncOutputsOutput):"""Test that outputs for a step are downloaded to the correct location locally"""# GIVENjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,qu... | 3 | 24 | 3 | 133 | 2 | 1,023 | 1,055 | 1,023 | job_attachment_test,tmp_path,sync_outputs | ['job_output_downloader', 'job_attachment_settings'] | None | {"Assign": 2, "Expr": 3, "If": 1, "Try": 1} | 9 | 33 | 9 | ["get_queue", "TypeError", "download.OutputDownloader", "job_output_downloader.download_job_output", "exists", "Path", "exists", "Path", "_cleanup_outputs_dir"] | 0 | [] | The function (test_download_outputs_with_job_id_step_id_and_download_directory) defined within the public class called public.The function start at line 1023 and ends at 1055. It contains 24 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1023.0] and does not return any val... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_with_job_id_and_download_directory | def test_download_outputs_with_job_id_and_download_directory(job_attachment_test: JobAttachmentTest, tmp_path: Path, sync_outputs: SyncOutputsOutput):"""Test that outputs for a job are downloaded to the correct location locally"""# GIVENjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,queue_id=jo... | 3 | 25 | 3 | 146 | 2 | 1,059 | 1,092 | 1,059 | job_attachment_test,tmp_path,sync_outputs | ['job_output_downloader', 'job_attachment_settings'] | None | {"Assign": 2, "Expr": 3, "If": 1, "Try": 1} | 11 | 34 | 11 | ["get_queue", "TypeError", "download.OutputDownloader", "job_output_downloader.download_job_output", "exists", "Path", "exists", "Path", "exists", "Path", "_cleanup_outputs_dir"] | 0 | [] | The function (test_download_outputs_with_job_id_and_download_directory) defined within the public class called public.The function start at line 1059 and ends at 1092. It contains 25 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1059.0] and does not return any value. It d... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _cleanup_outputs_dir | def _cleanup_outputs_dir(job_attachment_test: JobAttachmentTest) -> None:shutil.rmtree(job_attachment_test.OUTPUT_PATH)# Revive the INPUT_IN_OUTPUT_DIR_PATH file.job_attachment_test.OUTPUT_PATH.mkdir(parents=True, exist_ok=True)with open(job_attachment_test.INPUT_IN_OUTPUT_DIR_PATH, "w") as f:f.write("Although it is in... | 1 | 9 | 1 | 51 | 0 | 1,095 | 1,104 | 1,095 | job_attachment_test | [] | None | {"Expr": 3, "With": 1} | 4 | 10 | 4 | ["shutil.rmtree", "job_attachment_test.OUTPUT_PATH.mkdir", "open", "f.write"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.deadline_job_attachments.test_job_attachments_py.test_download_outputs_with_job_id_and_download_directory", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_... | The function (_cleanup_outputs_dir) defined within the public class called public.The function start at line 1095 and ends at 1104. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | upload_input_files_no_input_paths | def upload_input_files_no_input_paths(job_attachment_test: JobAttachmentTest,) -> UploadInputFilesNoInputPathsOutput:"""Test that the created job settings object doesn't have the requiredAssets field when there are no input files."""# IFjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id,queue_id=jo... | 2 | 44 | 1 | 233 | 6 | 1,113 | 1,169 | 1,113 | job_attachment_test | ['job_attachment_settings', 'mock_on_uploading_files', 'mock_host_path_format_name', 'upload_group', 'mock_on_preparing_to_submit', 'asset_manager'] | UploadInputFilesNoInputPathsOutput | {"Assign": 8, "Expr": 1, "If": 1, "Return": 1} | 17 | 57 | 17 | ["get_queue", "TypeError", "upload.S3AssetManager", "MagicMock", "MagicMock", "asset_manager.prepare_paths_for_upload", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload_assets", "str", "PathFormat.get_host_path_format_string", "ManifestProperties", "str", "PathFormat", "UploadInputFi... | 0 | [] | The function (upload_input_files_no_input_paths) defined within the public class called public.The function start at line 1113 and ends at 1169. It contains 44 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 17.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_upload_input_files_no_download_paths | def test_upload_input_files_no_download_paths(job_attachment_test: JobAttachmentTest) -> None:"""Test that if there are no output directories, when upload_assets is called,then the resulting attachments object has no output directories in it."""# IFjob_attachment_settings = get_queue(farm_id=job_attachment_test.farm_id... | 3 | 51 | 1 | 366 | 8 | 1,173 | 1,238 | 1,173 | job_attachment_test | ['job_attachment_settings', 'mock_on_uploading_files', 'mock_host_path_format_name', 'asset_root_hash', 'upload_group', 'mock_on_preparing_to_submit', 'manifest_hash', 'asset_manager'] | None | {"Assign": 10, "Expr": 1, "If": 2} | 24 | 66 | 24 | ["get_queue", "TypeError", "upload.S3AssetManager", "MagicMock", "MagicMock", "asset_manager.prepare_paths_for_upload", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload_assets", "str", "TypeError", "PathFormat.get_host_path_format_string", "hash_data", "encode", "str", "hash_data", "... | 0 | [] | The function (test_upload_input_files_no_download_paths) defined within the public class called public.The function start at line 1173 and ends at 1238. It contains 51 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 24.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_no_inputs.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 1,272 | 1,273 | 1,272 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_sync_inputs_no_inputs.on_downloading_files) defined within the public class called public.The function start at line 1272 and ends at 1273. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1272.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_no_inputs | def test_sync_inputs_no_inputs(job_attachment_test: JobAttachmentTest,upload_input_files_no_input_paths: UploadInputFilesNoInputPathsOutput,tmp_path: Path,default_job_template_one_task_one_step: str,) -> None:"""Test that all of the input files get synced locally."""# IFjob_attachment_settings = get_queue(farm_id=job_a... | 1 | 33 | 4 | 156 | 4 | 1,242 | 1,286 | 1,242 | job_attachment_test,upload_input_files_no_input_paths,tmp_path,default_job_template_one_task_one_step | ['session_dir', 'syncer', 'job_attachment_settings', 'job_response'] | None | {"Assign": 4, "Expr": 3, "Return": 1} | 9 | 45 | 9 | ["get_queue", "job_attachment_test.deadline_client.create_job", "upload_input_files_no_input_paths.attachments.to_dict", "asset_sync.AssetSync", "session_dir.mkdir", "syncer.sync_inputs", "any", "iterdir", "Path"] | 0 | [] | The function (test_sync_inputs_no_inputs) defined within the public class called public.The function start at line 1242 and ends at 1286. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1242.0] and does not return any value. It declares 9.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_upload_bucket_wrong_account | def test_upload_bucket_wrong_account(external_bucket: str, job_attachment_test: JobAttachmentTest):"""Test that if trying to upload to a bucket that isn't in the farm's AWS account, the correct error is thrown."""# IFjob_attachment_settings = JobAttachmentS3Settings(s3BucketName=external_bucket,rootPrefix=job_attachmen... | 1 | 34 | 2 | 181 | 5 | 1,291 | 1,336 | 1,291 | external_bucket,job_attachment_test | ['job_attachment_settings', 'mock_on_uploading_files', 'upload_group', 'mock_on_preparing_to_submit', 'asset_manager'] | None | {"Assign": 6, "Expr": 2, "With": 1} | 12 | 46 | 12 | ["JobAttachmentS3Settings", "upload.S3AssetManager", "MagicMock", "MagicMock", "pytest.raises", "asset_manager.prepare_paths_for_upload", "str", "str", "asset_manager.hash_assets_and_create_manifest", "str", "asset_manager.upload_assets", "str"] | 0 | [] | The function (test_upload_bucket_wrong_account) defined within the public class called public.The function start at line 1291 and ends at 1336. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1291.0] and does not return any value. It declares 12.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_bucket_wrong_account.on_downloading_files | def on_downloading_files(*args, **kwargs):return True | 1 | 2 | 2 | 11 | 0 | 1,370 | 1,371 | 1,370 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_sync_inputs_bucket_wrong_account.on_downloading_files) defined within the public class called public.The function start at line 1370 and ends at 1371. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1370.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_inputs_bucket_wrong_account | def test_sync_inputs_bucket_wrong_account(external_bucket: str,job_attachment_test: JobAttachmentTest,upload_input_files_one_asset_in_cas: UploadInputFilesOneAssetInCasOutputs,default_job_template: str,tmp_path_factory: TempPathFactory,):"""Test that if trying to sync inputs to a bucket that isn't in the farm's AWS acc... | 1 | 35 | 5 | 147 | 4 | 1,341 | 1,385 | 1,341 | external_bucket,job_attachment_test,upload_input_files_one_asset_in_cas,default_job_template,tmp_path_factory | ['session_dir', 'syncer', 'job_attachment_settings', 'job_response'] | Returns | {"Assign": 4, "Expr": 2, "Return": 1, "With": 1} | 7 | 45 | 7 | ["JobAttachmentS3Settings", "job_attachment_test.deadline_client.create_job", "upload_input_files_one_asset_in_cas.attachments.to_dict", "asset_sync.AssetSync", "tmp_path_factory.mktemp", "pytest.raises", "syncer.sync_inputs"] | 0 | [] | The function (test_sync_inputs_bucket_wrong_account) defined within the public class called public.The function start at line 1341 and ends at 1385. It contains 35 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1341.0], and this function return a value. It declares 7.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_sync_outputs_bucket_wrong_account | def test_sync_outputs_bucket_wrong_account(job_attachment_test: JobAttachmentTest,sync_inputs: SyncInputsOutputs,external_bucket: str,) -> None:"""Test that if trying to sync outputs to a bucket that isn't in the farm's AWS account, the correct error is thrown.This is ensuring that the S3 file upload is passing the Exp... | 3 | 56 | 3 | 319 | 12 | 1,390 | 1,469 | 1,390 | job_attachment_test,sync_inputs,external_bucket | ['list_steps_response', 'job_attachment_settings', 'step0_id', 'mock_on_uploading_files', 'file_to_be_synced_step0_task0', 'step_ids', 'list_tasks_response', 'render_start_time', 'file_to_be_synced_step0_task0_base', 'waiter', 'task_ids', 'step0_task0_id'] | None | {"Assign": 12, "Expr": 5, "With": 2} | 13 | 80 | 13 | ["JobAttachmentS3Settings", "job_attachment_test.deadline_client.get_waiter", "waiter.wait", "job_attachment_test.deadline_client.list_steps", "job_attachment_test.deadline_client.list_tasks", "mkdir", "Path", "time.time", "open", "f.write", "MagicMock", "pytest.raises", "sync_inputs.asset_syncer.sync_outputs"] | 0 | [] | The function (test_sync_outputs_bucket_wrong_account) defined within the public class called public.The function start at line 1390 and ends at 1469. It contains 56 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1390.0] and does not return any value. It declares 13.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_bucket_wrong_account | def test_download_outputs_bucket_wrong_account(job_attachment_test: JobAttachmentTest,tmp_path: Path,sync_outputs: SyncOutputsOutput,external_bucket: str,):"""Test that if trying to download outputs to a bucketthat isn't in the farm's AWS account, the correct error is thrown."""# GIVENjob_attachment_settings = JobAttac... | 1 | 23 | 4 | 96 | 2 | 1,474 | 1,503 | 1,474 | job_attachment_test,tmp_path,sync_outputs,external_bucket | ['job_output_downloader', 'job_attachment_settings'] | None | {"Assign": 2, "Expr": 2, "With": 1} | 4 | 30 | 4 | ["JobAttachmentS3Settings", "pytest.raises", "download.OutputDownloader", "job_output_downloader.download_job_output"] | 0 | [] | The function (test_download_outputs_bucket_wrong_account) defined within the public class called public.The function start at line 1474 and ends at 1503. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1474.0] and does not return any value. It declares 4.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_no_outputs_dir | def test_download_outputs_no_outputs_dir(job_attachment_test: JobAttachmentTest,sync_outputs: SyncOutputsOutput,):"""Test that if trying to download outputs but not specify a file pathDownload will be saved to the current directory."""download_path = Path(os.path.normpath(Path("").absolute()) / sync_outputs.step0_task0... | 3 | 28 | 2 | 149 | 3 | 1,507 | 1,546 | 1,507 | job_attachment_test,sync_outputs | ['job_output_downloader', 'job_attachment_settings', 'download_path'] | None | {"Assign": 3, "Expr": 4, "If": 1, "Try": 1} | 12 | 40 | 12 | ["Path", "os.path.normpath", "absolute", "Path", "get_queue", "Exception", "download.OutputDownloader", "job_output_downloader.set_root_path", "str", "job_output_downloader.download_job_output", "download_path.exists", "shutil.rmtree"] | 0 | [] | The function (test_download_outputs_no_outputs_dir) defined within the public class called public.The function start at line 1507 and ends at 1546. It contains 28 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1507.0] and does not return any value. It declares 12.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_download_outputs_windows_long_file_path | def test_download_outputs_windows_long_file_path(job_attachment_test: JobAttachmentTest, sync_outputs: SyncOutputsOutput, tmp_path: WindowsPath):"""Test that when trying to download outputs to a file path thatlonger than 260 chars in Windows, the download is successful."""tmp_path_len: int = len(str(tmp_path))long_root... | 3 | 41 | 3 | 220 | 3 | 1,554 | 1,608 | 1,554 | job_attachment_test,sync_outputs,tmp_path | ['job_output_downloader', 'output_file_path', 'job_attachment_settings'] | None | {"AnnAssign": 3, "Assign": 3, "Expr": 5, "If": 1, "Try": 1} | 21 | 55 | 21 | ["len", "str", "os.path.join", "math.floor", "os.makedirs", "len", "get_queue", "Exception", "download.OutputDownloader", "job_output_downloader.set_root_path", "str", "str", "job_output_downloader.download_job_output", "Path", "output_file_path.exists", "len", "str", "len", "str", "shutil.rmtree", "pytest.mark.skipif"... | 0 | [] | The function (test_download_outputs_windows_long_file_path) defined within the public class called public.The function start at line 1554 and ends at 1608. It contains 41 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1554.0] and does not return any value. It declares 21.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | get_boto_session | def get_boto_session():"""Fixture to establish authenticated session for MCP integration tests."""session = boto3.Session()sts_client = session.client("sts")_ = sts_client.get_caller_identity()return session | 1 | 5 | 0 | 29 | 3 | 24 | 31 | 24 | ['sts_client', '_', 'session'] | Returns | {"Assign": 3, "Expr": 1, "Return": 1} | 4 | 8 | 4 | ["boto3.Session", "session.client", "sts_client.get_caller_identity", "pytest.fixture"] | 0 | [] | The function (get_boto_session) defined within the public class called public.The function start at line 24 and ends at 31. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 4.0 functions, and It has 4.0 functio... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_server_integration | async def test_mcp_server_integration(get_boto_session):"""Test that MCP server starts, registers tools, and handles tool calls."""with patch("deadline.client.api._session.get_boto3_session") as mock_session:mock_session.return_value = get_boto_sessionapp = server.app# 1. Check if all tools in TOOL_REGISTRY are availab... | 21 | 66 | 1 | 410 | 15 | 36 | 120 | 36 | get_boto_session | ['list_queues_tool', 'farms_data', 'farms_result', 'available_params', 'auth_result', 'auth_data', 'app', 'input_schema', 'expected_params', 'tools', 'missing_params', 'missing_tools', 'tools_result', 'available_tool_names', 'expected_tools'] | Returns | {"Assign": 20, "Expr": 3, "For": 1, "If": 6, "Return": 1, "Try": 2, "With": 1} | 25 | 85 | 25 | ["patch", "app.list_tools", "isinstance", "TOOL_REGISTRY.keys", "app.call_tool", "hasattr", "json.loads", "auth_data.get", "pytest.fail", "app.call_tool", "hasattr", "json.loads", "farms_data.get", "pytest.fail", "get_tool_definition", "hasattr", "isinstance", "list", "keys", "hasattr", "list", "input_schema.properties... | 0 | [] | The function (test_mcp_server_integration) defined within the public class called public.The function start at line 36 and ends at 120. It contains 66 lines of code and it has a cyclomatic complexity of 21. The function does not take any parameters, and this function return a value. It declares 25.0 functions, and It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_tool_description_extraction | async def test_tool_description_extraction(get_boto_session):"""Test that tool descriptions are properly extracted from original function docstrings."""app = server.apptools_result = await app.list_tools()tools = tools_result if isinstance(tools_result, list) else tools_result.toolslist_farms_tool = Nonefor tool in too... | 4 | 21 | 1 | 98 | 5 | 125 | 153 | 125 | get_boto_session | ['original_docstring', 'app', 'list_farms_tool', 'tools', 'tools_result'] | Returns | {"Assign": 6, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 2 | 29 | 2 | ["app.list_tools", "isinstance"] | 0 | [] | The function (test_tool_description_extraction) defined within the public class called public.The function start at line 125 and ends at 153. It contains 21 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and ... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | __init__ | def __init__(self, process):self.process = processself.request_id = 0 | 1 | 3 | 2 | 17 | 0 | 159 | 161 | 159 | self,process | [] | None | {"Assign": 2} | 0 | 3 | 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 MCPClient.The function start at line 159 and ends at 161. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [159.0] and does not return any value. It has 4993.0 functions calling this function which a... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | send_request | async def send_request(self, method, params=None):"""Send a JSON-RPC request to the MCP server."""self.request_id += 1request = {"jsonrpc": "2.0","id": self.request_id,"method": method,"params": params or {},}request_json = json.dumps(request) + "\n"self.process.stdin.write(request_json.encode())await self.process.stdi... | 3 | 15 | 3 | 112 | 0 | 163 | 181 | 163 | self,method,params | [] | Returns | {"Assign": 3, "AugAssign": 1, "Expr": 3, "If": 1, "Return": 1} | 9 | 19 | 9 | ["json.dumps", "self.process.stdin.write", "request_json.encode", "self.process.stdin.drain", "self.process.stdout.readline", "RuntimeError", "json.loads", "strip", "response_line.decode"] | 0 | [] | The function (send_request) defined within the public class called MCPClient.The function start at line 163 and ends at 181. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [163.0], and this function return a value. It declares 9.0 functions, and It has 9.0 f... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | initialize | async def initialize(self):"""Initialize the MCP session."""response = await self.send_request("initialize",{"protocolVersion": "2024-11-05","capabilities": {"tools": {}},"clientInfo": {"name": "test-client", "version": "1.0.0"},},)if "error" in response:raise RuntimeError(f"Initialize failed: {response['error']}")# Se... | 2 | 13 | 1 | 64 | 0 | 183 | 199 | 183 | self | [] | Returns | {"Assign": 1, "Expr": 2, "If": 1, "Return": 1} | 3 | 17 | 3 | ["self.send_request", "RuntimeError", "self.send_notification"] | 89 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.intratests.garbage_check.garbage_check_py.Base.initialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.intratests.garbage_check.garbage_check_py.g... | The function (initialize) defined within the public class called MCPClient.The function start at line 183 and ends at 199. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions ca... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | send_notification | async def send_notification(self, method, params=None):"""Send a JSON-RPC notification (no response expected)."""request = {"jsonrpc": "2.0", "method": method, "params": params or {}}request_json = json.dumps(request) + "\n"self.process.stdin.write(request_json.encode())await self.process.stdin.drain() | 2 | 5 | 3 | 64 | 0 | 201 | 207 | 201 | self,method,params | [] | None | {"Assign": 2, "Expr": 3} | 4 | 7 | 4 | ["json.dumps", "self.process.stdin.write", "request_json.encode", "self.process.stdin.drain"] | 0 | [] | The function (send_notification) defined within the public class called MCPClient.The function start at line 201 and ends at 207. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [201.0] and does not return any value. It declares 4.0 functions, and It has 4.0 f... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | list_tools | async def list_tools(self):"""List available tools."""response = await self.send_request("tools/list", {})if "error" in response:raise RuntimeError(f"List tools failed: {response['error']}")return response["result"]["tools"] | 2 | 5 | 1 | 37 | 0 | 209 | 214 | 209 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["self.send_request", "RuntimeError"] | 0 | [] | The function (list_tools) defined within the public class called MCPClient.The function start at line 209 and ends at 214. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 function... |
aws-deadline_deadline-cloud | MCPClient | public | 0 | 0 | call_tool | async def call_tool(self, name, arguments=None):"""Call a tool."""response = await self.send_request("tools/call", {"name": name, "arguments": arguments or {}})if "error" in response:raise RuntimeError(f"Tool call failed: {response['error']}")return response["result"] | 3 | 7 | 3 | 50 | 0 | 216 | 223 | 216 | self,name,arguments | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 8 | 2 | ["self.send_request", "RuntimeError"] | 0 | [] | The function (call_tool) defined within the public class called MCPClient.The function start at line 216 and ends at 223. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [216.0], and this function return a value. It declares 2.0 functions, and It has 2.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_server_process_integration | async def test_mcp_server_process_integration(get_boto_session):"""Test MCP server as a separate process via stdio communication."""with patch("deadline.client.api._session.get_boto3_session") as mock_session:mock_session.return_value = get_boto_sessionprocess = await asyncio.create_subprocess_exec(sys.executable,"-c",... | 11 | 40 | 1 | 269 | 10 | 228 | 276 | 228 | get_boto_session | ['client', 'farms_result', 'farms_data', 'init_response', 'tool_names', 'expected_tools', 'farms_content', 'tools', 'missing_tools', 'process'] | Returns | {"Assign": 11, "Expr": 7, "If": 2, "Return": 1, "Try": 3, "With": 1} | 17 | 49 | 17 | ["patch", "asyncio.create_subprocess_exec", "MCPClient", "client.initialize", "client.list_tools", "len", "TOOL_REGISTRY.keys", "client.call_tool", "len", "json.loads", "print", "pytest.fail", "process.terminate", "asyncio.wait_for", "process.wait", "process.kill", "process.wait"] | 0 | [] | The function (test_mcp_server_process_integration) defined within the public class called public.The function start at line 228 and ends at 276. It contains 40 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters, and this function return a value. It declares 17.0 functions,... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_tool_telemetry | async def test_mcp_tool_telemetry(get_boto_session):"""Test that MCP tools record telemetry events."""with patch("deadline.client.api._session.get_boto3_session") as mock_session:mock_session.return_value = get_boto_sessionmock_telemetry_client = MagicMock()with patch("deadline._mcp.utils.get_deadline_cloud_library_tel... | 6 | 58 | 1 | 314 | 11 | 281 | 351 | 281 | get_boto_session | ['latency_events', 'expected_usage_keys', 'usage_event_details', 'event_types', 'auth_result', 'app', 'latency_event_details', 'usage_events', 'expected_latency_keys', 'mock_telemetry_client', 'recorded_calls'] | Returns | {"Assign": 13, "Expr": 1, "Return": 1, "With": 2} | 16 | 71 | 16 | ["patch", "MagicMock", "patch", "app.call_tool", "len", "len", "set", "latency_event_details.keys", "set", "latency_event_details.keys", "isinstance", "set", "usage_event_details.keys", "set", "usage_event_details.keys", "isinstance"] | 0 | [] | The function (test_mcp_tool_telemetry) defined within the public class called public.The function start at line 281 and ends at 351. It contains 58 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 16.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_server_startup_telemetry | def test_mcp_server_startup_telemetry():"""Test that MCP server startup records telemetry."""mock_telemetry_client = MagicMock()with patch("deadline.client.cli._mcp_server.get_deadline_cloud_library_telemetry_client") as mock_get_client, patch("deadline._mcp.server.main") as mock_mcp_main:mock_get_client.return_value =... | 1 | 14 | 0 | 83 | 3 | 355 | 375 | 355 | ['runner', 'result', 'mock_telemetry_client'] | None | {"Assign": 4, "Expr": 3, "With": 1} | 7 | 21 | 7 | ["MagicMock", "patch", "patch", "CliRunner", "runner.invoke", "mock_telemetry_client.record_event.assert_called_once_with", "mock_mcp_main.assert_called_once"] | 0 | [] | The function (test_mcp_server_startup_telemetry) defined within the public class called public.The function start at line 355 and ends at 375. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_tool_error_handling.parse_tool_result | def parse_tool_result(result):"""Helper to parse and validate tool result JSON."""assert result is not None, "Tool call should return a result"if result and hasattr(result[0], "text"):return json.loads(result[0].text)return {} | 3 | 5 | 1 | 41 | 0 | 383 | 388 | 383 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_mcp_tool_error_handling.parse_tool_result) defined within the public class called public.The function start at line 383 and ends at 388. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_mcp_tool_error_handling | async def test_mcp_tool_error_handling():"""Test that MCP tools properly handle and return errors using real AWS service validation."""def parse_tool_result(result):"""Helper to parse and validate tool result JSON."""assert result is not None, "Tool call should return a result"if result and hasattr(result[0], "text"):r... | 4 | 59 | 0 | 279 | 8 | 380 | 456 | 380 | ['resource_error_types', 'deadline_client', 'app', 'jobs_data', 'queues_data', 'fleets_data', 'mock_session', 'expected_error_types'] | Returns | {"Assign": 10, "Expr": 4, "If": 1, "Return": 2, "With": 1} | 20 | 77 | 20 | ["hasattr", "json.loads", "MagicMock", "boto3.client", "get", "MagicMock", "patch", "parse_tool_result", "app.call_tool", "any", "lower", "print", "parse_tool_result", "app.call_tool", "any", "lower", "print", "parse_tool_result", "app.call_tool", "any"] | 0 | [] | The function (test_mcp_tool_error_handling) defined within the public class called public.The function start at line 380 and ends at 456. It contains 59 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 20.0 functions, and It... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | launch_jobbundle_dir | def launch_jobbundle_dir():squish.startApplication("deadline bundle gui-submit --browse")test.log("Launched Choose Job Bundle Directory.") | 1 | 3 | 0 | 16 | 0 | 15 | 17 | 15 | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["squish.startApplication", "test.log"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.choose_jobbundledir_helpers_py.detect_platform_and_launch_jobbundle_guisubmitter"] | The function (launch_jobbundle_dir) defined within the public class called public.The function start at line 15 and ends at 17. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions ca... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | launch_jobbundle_dir_windows_only | def launch_jobbundle_dir_windows_only():squish.startApplication(f"python {config.windows_deadline_path_envvar} bundle gui-submit --browse")test.log("Launched Choose Job Bundle Directory on Windows.") | 1 | 5 | 0 | 17 | 0 | 21 | 25 | 21 | [] | None | {"Expr": 2} | 2 | 5 | 2 | ["squish.startApplication", "test.log"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.choose_jobbundledir_helpers_py.detect_platform_and_launch_jobbundle_guisubmitter"] | The function (launch_jobbundle_dir_windows_only) defined within the public class called public.The function start at line 21 and ends at 25. 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 declares 2.0 functions, It has 2.0... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | detect_platform_and_launch_jobbundle_guisubmitter | def detect_platform_and_launch_jobbundle_guisubmitter():if platform.system() == "Linux":test.log("Detected test running on Linux OS")test.log("Launching Choose Job Bundle GUI Submitter on Linux")launch_jobbundle_dir()elif platform.system() == "Windows":test.log("Detected test running on Windows OS")test.log("Launching ... | 4 | 15 | 0 | 84 | 0 | 29 | 43 | 29 | [] | None | {"Expr": 10, "If": 3} | 13 | 15 | 13 | ["platform.system", "test.log", "test.log", "launch_jobbundle_dir", "platform.system", "test.log", "test.log", "launch_jobbundle_dir_windows_only", "platform.system", "test.log", "test.log", "launch_jobbundle_dir", "test.log"] | 0 | [] | The function (detect_platform_and_launch_jobbundle_guisubmitter) defined within the public class called public.The function start at line 29 and ends at 43. It contains 15 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 13.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | select_jobbundle | def select_jobbundle(filepath: str):# enter job bundle directory file path in directory text inputsquish.type(squish.waitForObject(choose_jobbundledir_locators.jobbundle_filepath_input), filepath)test.log("Entered job bundle file path in Choose Job Bundle Directory.")# verify text input appearstest.compare(str(squish.w... | 1 | 18 | 1 | 70 | 0 | 46 | 66 | 46 | filepath | [] | None | {"Expr": 5} | 9 | 21 | 9 | ["squish.type", "squish.waitForObject", "test.log", "test.compare", "str", "squish.waitForObjectExists", "test.log", "squish.clickButton", "squish.waitForObject"] | 0 | [] | The function (select_jobbundle) defined within the public class called public.The function start at line 46 and ends at 66. It contains 18 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, and It has 9.0 functions ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | load_different_job_bundle | def load_different_job_bundle():# click on job specific settings tab to navigate and ensure tests are on correct tabgui_submitter_helpers.navigate_job_specific_settings()# verify load different job bundle button exists and contains correct button texttest.compare(str(squish.waitForObjectExists(gui_submitter_locators.lo... | 1 | 32 | 0 | 114 | 0 | 69 | 105 | 69 | [] | None | {"Expr": 7} | 14 | 37 | 14 | ["gui_submitter_helpers.navigate_job_specific_settings", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.log", "squish.clickButton", "squish.waitForObject", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists"] | 0 | [] | The function (load_different_job_bundle) defined within the public class called public.The function start at line 69 and ends at 105. It contains 32 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 14.0 functions, and It has 14.... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | navigate_shared_job_settings | def navigate_shared_job_settings():# click on Shared job settings tabtest.log("Navigate to Shared job settings tab.")squish.clickTab(squish.waitForObject(gui_submitter_locators.shared_jobsettings_tab), "Shared job settings")# verify on shared job settings tabtest.compare(squish.waitForObjectExists(gui_submitter_locator... | 1 | 12 | 0 | 45 | 0 | 10 | 23 | 10 | [] | None | {"Expr": 3} | 5 | 14 | 5 | ["test.log", "squish.clickTab", "squish.waitForObject", "test.compare", "squish.waitForObjectExists"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.gui_submitter_helpers_py.verify_shared_job_settings"] | The function (navigate_shared_job_settings) defined within the public class called public.The function start at line 10 and ends at 23. 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 5.0 functions, It has 5.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | navigate_job_specific_settings | def navigate_job_specific_settings():# click on Job-specific settings tabtest.log("Navigate to Job-specific settings tab.")squish.clickTab(squish.waitForObject(gui_submitter_locators.job_specificsettings_tab),"Job-specific settings",)# verify on job specific settings tabtest.compare(squish.waitForObjectExists(gui_submi... | 1 | 11 | 0 | 46 | 0 | 26 | 38 | 26 | [] | None | {"Expr": 3} | 5 | 13 | 5 | ["test.log", "squish.clickTab", "squish.waitForObject", "test.compare", "squish.waitForObjectExists"] | 0 | [] | The function (navigate_job_specific_settings) defined within the public class called public.The function start at line 26 and ends at 38. It contains 11 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 5.0 functions, and It has ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | verify_shared_job_settings | def verify_shared_job_settings(job_name: str,):# click on shared job settings tab to navigate and ensure tests are on correct tabnavigate_shared_job_settings()# verify job name is set correctlytest.compare(str(squish.waitForObjectExists(gui_submitter_locators.job_properties_name_input).displayText),job_name,"Expect cor... | 1 | 11 | 1 | 34 | 0 | 41 | 53 | 41 | job_name | [] | None | {"Expr": 2} | 4 | 13 | 4 | ["navigate_shared_job_settings", "test.compare", "str", "squish.waitForObjectExists"] | 0 | [] | The function (verify_shared_job_settings) defined within the public class called public.The function start at line 41 and ends at 53. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | deadlinecloud_farmname_locator | def deadlinecloud_farmname_locator(farm_name):return {"container": deadline_cloud_settings_widget,"text": farm_name,"type": "QLabel","unnamed": 1,"visible": 1,} | 1 | 8 | 1 | 28 | 0 | 242 | 249 | 242 | farm_name | [] | Returns | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (deadlinecloud_farmname_locator) defined within the public class called public.The function start at line 242 and ends at 249. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | deadlinecloud_queuename_locator | def deadlinecloud_queuename_locator(queue_name):return {"container": deadline_cloud_settings_widget,"text": queue_name,"type": "QLabel","unnamed": 1,"visible": 1,} | 1 | 8 | 1 | 28 | 0 | 252 | 259 | 252 | queue_name | [] | Returns | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (deadlinecloud_queuename_locator) defined within the public class called public.The function start at line 252 and ends at 259. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | open_job_hist_directory | def open_job_hist_directory():# hit '...' button to open Choose Job history directory file browsersquish.clickButton(squish.waitForObject(workstation_config_locators.open_job_hist_dir_button))test.log("Opened job history directory dialogue.")# verify job history directory dialogue is opentest.compare(str(squish.waitFor... | 1 | 23 | 0 | 85 | 0 | 12 | 37 | 12 | [] | None | {"Expr": 6} | 11 | 26 | 11 | ["squish.clickButton", "squish.waitForObject", "test.log", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "squish.clickButton", "squish.waitForObject", "test.log"] | 0 | [] | The function (open_job_hist_directory) defined within the public class called public.The function start at line 12 and ends at 37. It contains 23 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has 11.0 f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.