project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
aws-deadline_deadline-cloud
public
public
0
0
enter_job_hist_dir_input
def enter_job_hist_dir_input(job_history_directory_path: str):# clear job history directory input fieldsquish.waitForObject(workstation_config_locators.job_hist_dir_input)job_hist_text_input = squish.findObject(workstation_config_locators.job_hist_dir_input)job_hist_text_input.clear()# enter custom file path in job history text inputsquish.type(workstation_config_locators.job_hist_dir_input, job_history_directory_path)test.log("Entered job history directory file path in text input.")
1
6
1
46
1
40
47
40
job_history_directory_path
['job_hist_text_input']
None
{"Assign": 1, "Expr": 4}
5
8
5
["squish.waitForObject", "squish.findObject", "job_hist_text_input.clear", "squish.type", "test.log"]
0
[]
The function (enter_job_hist_dir_input) defined within the public class called public.The function start at line 40 and ends at 47. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["squish.waitForObject", "squish.findObject", "job_hist_text_input.clear", "squish.type", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
verify_job_hist_dir_text_input
def verify_job_hist_dir_text_input(job_history_directory_path: str):# verify job history directory text input displays correct file path based on OS platform being testedif platform.system() == "Linux":test.log("Detected test running on Linux OS")test.compare(str(squish.waitForObjectExists(workstation_config_locators.job_hist_dir_input).displayText),job_history_directory_path,"Expect job history directory file path to be set correctly on Linux.",)elif platform.system() == "Windows":test.log("Detected test running on Windows OS")test.compare(str(squish.waitForObjectExists(workstation_config_locators.job_hist_dir_input).displayText),job_history_directory_path,"Expect job history directory file path to be set correctly on Windows.",)elif platform.system() == "Darwin":test.log("Detected test running on macOS")test.compare(str(squish.waitForObjectExists(workstation_config_locators.job_hist_dir_input).displayText),job_history_directory_path,"Expect job history directory file path to be set correctly on macOS.",)
4
34
1
121
0
50
84
50
job_history_directory_path
[]
None
{"Expr": 6, "If": 3}
15
35
15
["platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists"]
0
[]
The function (verify_job_hist_dir_text_input) defined within the public class called public.The function start at line 50 and ends at 84. It contains 34 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 15.0 functions, and It has 15.0 functions called inside which are ["platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists"].
aws-deadline_deadline-cloud
public
public
0
0
check_directory_exists
def check_directory_exists(job_history_directory_path: str):return os.path.exists(job_history_directory_path) and os.path.isdir(job_history_directory_path)
2
2
1
25
0
87
88
87
job_history_directory_path
[]
Returns
{"Return": 1}
2
2
2
["os.path.exists", "os.path.isdir"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.jobhistory_dir_helpers_py.delete_directory_if_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.jobhistory_dir_helpers_py.verify_directory_exists"]
The function (check_directory_exists) defined within the public class called public.The function start at line 87 and ends at 88. 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 declares 2.0 functions, It has 2.0 functions called inside which are ["os.path.exists", "os.path.isdir"], It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.jobhistory_dir_helpers_py.delete_directory_if_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.jobhistory_dir_helpers_py.verify_directory_exists"].
aws-deadline_deadline-cloud
public
public
0
0
verify_directory_exists
def verify_directory_exists(job_history_directory_path: str):if platform.system() == "Linux":test.log("Detected test running on Linux OS")# verify job history directory exists on user's systemif check_directory_exists(os.path.expanduser(job_history_directory_path)):test.passes(f"Job history directory '{job_history_directory_path}' exists on user's system.")else:test.fail("Job history directory not found on user's system")elif platform.system() == "Windows":test.log("Detected test running on Windows OS")# verify job history directory exists on user's systemif check_directory_exists(os.path.normcase(os.path.expanduser(job_history_directory_path))):test.passes(f"Job history directory '{job_history_directory_path}' exists on user's system.")else:test.fail("Job history directory not found on user's system")elif platform.system() == "Darwin":test.log("Detected test running on macOS")# verify job history directory exists on user's systemif check_directory_exists(os.path.expanduser(job_history_directory_path)):test.passes(f"Job history directory '{job_history_directory_path}' exists on user's system.")else:test.fail("Job history directory not found on user's system")
7
25
1
143
0
91
118
91
job_history_directory_path
[]
None
{"Expr": 9, "If": 6}
19
28
19
["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.passes", "test.fail"]
0
[]
The function (verify_directory_exists) defined within the public class called public.The function start at line 91 and ends at 118. It contains 25 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 19.0 functions, and It has 19.0 functions called inside which are ["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.passes", "test.fail"].
aws-deadline_deadline-cloud
public
public
0
0
delete_directory_if_exists
def delete_directory_if_exists(job_history_directory_path: str):if platform.system() == "Linux":test.log("Detected test running on Linux OS")# if folder exists, delete folderif check_directory_exists(os.path.expanduser(job_history_directory_path)):shutil.rmtree(os.path.expanduser(job_history_directory_path))test.log("Deleted job history directory folder from user's system for test cleanup")else:test.log("Job history directory not found on user's system")elif platform.system() == "Windows":test.log("Detected test running on Windows OS")# if folder exists, delete folderif check_directory_exists(os.path.normcase(os.path.expanduser(job_history_directory_path))):shutil.rmtree(os.path.normcase(os.path.expanduser(job_history_directory_path)))test.log("Deleted job history directory folder from user's system for test cleanup")else:test.log("Job history directory not found on user's system")elif platform.system() == "Darwin":test.log("Detected test running on macOS")# if folder exists, delete folderif check_directory_exists(os.path.expanduser(job_history_directory_path)):shutil.rmtree(os.path.expanduser(job_history_directory_path))test.log("Deleted job history directory folder from user's system for test cleanup")else:test.log("Job history directory not found on user's system")
7
22
1
186
0
121
145
121
job_history_directory_path
[]
None
{"Expr": 12, "If": 6}
26
25
26
["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "shutil.rmtree", "os.path.expanduser", "test.log", "test.log", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "shutil.rmtree", "os.path.normcase", "os.path.expanduser", "test.log", "test.log", "platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "shutil.rmtree", "os.path.expanduser", "test.log", "test.log"]
0
[]
The function (delete_directory_if_exists) defined within the public class called public.The function start at line 121 and ends at 145. It contains 22 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 26.0 functions, and It has 26.0 functions called inside which are ["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "shutil.rmtree", "os.path.expanduser", "test.log", "test.log", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "shutil.rmtree", "os.path.normcase", "os.path.expanduser", "test.log", "test.log", "platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "shutil.rmtree", "os.path.expanduser", "test.log", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
check_and_close_refresh_error_dialogues
def check_and_close_refresh_error_dialogues():"""When launching deadline config gui/settings dialogue, up to three refresh error dialogues can appear, and they appear in any order.These dialogues must be closed prior to being able to select the correct profile for authentication, or logging in.A scenario in which these dialogues appear is when a DCM-created profile is pre-selected (vs an aws profile) and the user has not logged in."""dialogue_names = {"Farms Refresh Error": (loginout_locators.refreshfarmslist_error_dialog,loginout_locators.refreshfarmslist_ok_button,),"Queues Refresh Error": (loginout_locators.refreshqueueslist_error_dialog,loginout_locators.refreshqueueslist_ok_button,),"Storage Profiles Refresh Error": (loginout_locators.refreshstorageprofiles_error_dialog,loginout_locators.refreshstorageprofiles_ok_button,),}timeout = 300# millisecondsfor _ in range(3):# three attempts are needed as the three dialogues may or may not appearfor name, (error_dialogue, ok_button) in dialogue_names.items():if error_dialogue:# only check if the dialogue hasn't been handled yettry:squish.waitForObject(error_dialogue, timeout)squish.mouseClick(ok_button)test.log(f"{name} appeared and was closed.")dialogue_names[name] = (None, None)# mark as handled by setting to Noneexcept LookupError:test.log(f"{name} was not present.")if all(d[0] is None for d in dialogue_names.values()):break
7
28
0
140
2
10
43
10
['timeout', 'dialogue_names']
None
{"Assign": 3, "Expr": 5, "For": 2, "If": 2, "Try": 1}
8
34
8
["range", "dialogue_names.items", "squish.waitForObject", "squish.mouseClick", "test.log", "test.log", "all", "dialogue_names.values"]
0
[]
The function (check_and_close_refresh_error_dialogues) defined within the public class called public.The function start at line 10 and ends at 43. It contains 28 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["range", "dialogue_names.items", "squish.waitForObject", "squish.mouseClick", "test.log", "test.log", "all", "dialogue_names.values"].
aws-deadline_deadline-cloud
public
public
0
0
set_aws_profile_name_and_verify_auth
def set_aws_profile_name_and_verify_auth(profile_name: str):# open AWS profile drop down menusquish.mouseClick(squish.waitForObjectExists(workstation_config_locators.globalsettings_awsprofile_dropdown),)test.log("Opened AWS profile drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.profile_name_locator(profile_name)).text,profile_name,"Expect AWS profile name to be present in drop down.",)# select AWS profilesquish.mouseClick(workstation_config_locators.profile_name_locator(profile_name))test.log("Selected AWS profile name.")# verify user is authenticated - confirm statuses appear and text is correcttest.log("Verifying user is authenticated...")test.compare(squish.waitForObjectExists(loginout_locators.credential_source_hostprovided_label).visible,True,"Expect `Credential source: HOST_PROVIDED` to be visible when selected aws profile.",)test.compare(str(squish.waitForObjectExists(loginout_locators.credential_source_hostprovided_label).text),"<b style='color:green;'>HOST_PROVIDED</b>","Expect `Credential source: HOST_PROVIDED` text to be correct when selected aws profile.",)test.compare(squish.waitForObjectExists(loginout_locators.authentication_status_authenticated_label).visible,True,"Expect `Authentication status: AUTHENTICATED` to be visible.",)test.compare(str(squish.waitForObjectExists(loginout_locators.authentication_status_authenticated_label).text),"<b style='color:green;'>AUTHENTICATED</b>","Expect `Authentication status: AUTHENTICATED` text to be correct.",)test.compare(squish.waitForObjectExists(loginout_locators.deadlinecloud_api_authorized_label).visible,True,"Expect `AWS Deadline Cloud API: AUTHORIZED` to be visible.",)test.compare(str(squish.waitForObjectExists(loginout_locators.deadlinecloud_api_authorized_label).text),"<b style='color:green;'>AUTHORIZED</b>","Expect `AWS Deadline Cloud API: AUTHORIZED` text to be correct.",)
1
53
1
202
0
46
101
46
profile_name
[]
None
{"Expr": 12}
25
56
25
["squish.mouseClick", "squish.waitForObjectExists", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.profile_name_locator", "squish.mouseClick", "workstation_config_locators.profile_name_locator", "test.log", "test.log", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists"]
0
[]
The function (set_aws_profile_name_and_verify_auth) defined within the public class called public.The function start at line 46 and ends at 101. It contains 53 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 25.0 functions, and It has 25.0 functions called inside which are ["squish.mouseClick", "squish.waitForObjectExists", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.profile_name_locator", "squish.mouseClick", "workstation_config_locators.profile_name_locator", "test.log", "test.log", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists"].
aws-deadline_deadline-cloud
public
public
0
0
launch_deadline_config_gui
def launch_deadline_config_gui():squish.startApplication("deadline config gui")test.log("Launched Deadline Workstation Config GUI.")test.log("Sleep for " + str(snooze_timeout) + " second(s) to allow authentication to fully load.")squish.snooze(snooze_timeout)test.compare(squish.waitForObjectExists(workstation_config_locators.deadline_config_dialog).visible,True,"Expect the Deadline Workstation Config GUI to be open.",)
1
12
0
55
0
15
26
15
[]
None
{"Expr": 5}
7
12
7
["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "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.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"]
The function (launch_deadline_config_gui) defined within the public class called public.The function start at line 15 and ends at 26. 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 7.0 functions, It has 7.0 functions called inside which are ["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "test.compare", "squish.waitForObjectExists"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"].
aws-deadline_deadline-cloud
public
public
0
0
launch_deadline_config_gui_windows_only
def launch_deadline_config_gui_windows_only():squish.startApplication(f"python {config.windows_deadline_path_envvar} config gui")test.log("Launched Deadline Workstation Config GUI on Windows.")test.log("Sleep for " + str(snooze_timeout) + " second(s) to allow authentication to fully load.")squish.snooze(snooze_timeout)test.compare(squish.waitForObjectExists(workstation_config_locators.deadline_config_dialog).visible,True,"Expect the Deadline Workstation Config GUI to be open.",)
1
12
0
56
0
30
41
30
[]
None
{"Expr": 5}
7
12
7
["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "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.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"]
The function (launch_deadline_config_gui_windows_only) defined within the public class called public.The function start at line 30 and ends at 41. 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 7.0 functions, It has 7.0 functions called inside which are ["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "test.compare", "squish.waitForObjectExists"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"].
aws-deadline_deadline-cloud
public
public
0
0
detect_platform_and_launch_deadline_config
def detect_platform_and_launch_deadline_config():if platform.system() == "Linux":test.log("Detected test running on Linux OS")test.log("Launching Deadline Workstation Config on Linux")launch_deadline_config_gui()elif platform.system() == "Windows":test.log("Detected test running on Windows OS")test.log("Launching Deadline Workstation Config on Windows")launch_deadline_config_gui_windows_only()elif platform.system() == "Darwin":test.log("Detected test running on macOS")test.log("Launching Deadline Workstation Config on macOS")launch_deadline_config_gui()else:test.log("Unknown operating system")
4
15
0
84
0
45
59
45
[]
None
{"Expr": 10, "If": 3}
13
15
13
["platform.system", "test.log", "test.log", "launch_deadline_config_gui", "platform.system", "test.log", "test.log", "launch_deadline_config_gui_windows_only", "platform.system", "test.log", "test.log", "launch_deadline_config_gui", "test.log"]
0
[]
The function (detect_platform_and_launch_deadline_config) defined within the public class called public.The function start at line 45 and ends at 59. 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 functions, and It has 13.0 functions called inside which are ["platform.system", "test.log", "test.log", "launch_deadline_config_gui", "platform.system", "test.log", "test.log", "launch_deadline_config_gui_windows_only", "platform.system", "test.log", "test.log", "launch_deadline_config_gui", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
close_deadline_config_gui
def close_deadline_config_gui():test.log("Hitting `OK` button to close Deadline Settings.")# hit 'OK' button to close Deadline Config GUIsquish.clickButton(squish.waitForObject(workstation_config_locators.deadlinedialog_ok_button))
1
3
0
23
0
62
65
62
[]
None
{"Expr": 2}
3
4
3
["test.log", "squish.clickButton", "squish.waitForObject"]
0
[]
The function (close_deadline_config_gui) defined within the public class called public.The function start at line 62 and ends at 65. 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 3.0 functions, and It has 3.0 functions called inside which are ["test.log", "squish.clickButton", "squish.waitForObject"].
aws-deadline_deadline-cloud
public
public
0
0
open_settings_dialogue
def open_settings_dialogue():test.log("Hitting `Settings` button to open Deadline Settings dialogue.")# click on Settings button to open Deadline Settings dialogue from Submittersquish.clickButton(squish.waitForObject(gui_submitter_locators.settings_button))test.log("Opened Deadline Workstation Settings dialogue.")# verify Settings dialogue is openedtest.compare(squish.waitForObjectExists(workstation_config_locators.deadline_config_dialog).visible,True,"Expect the Deadline Settings dialogue to be open.",)
1
9
0
49
0
68
78
68
[]
None
{"Expr": 4}
6
11
6
["test.log", "squish.clickButton", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists"]
0
[]
The function (open_settings_dialogue) defined within the public class called public.The function start at line 68 and ends at 78. 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 6.0 functions, and It has 6.0 functions called inside which are ["test.log", "squish.clickButton", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists"].
aws-deadline_deadline-cloud
public
public
0
0
hit_apply_button
def hit_apply_button():test.log("Hitting `Apply` button to apply selected settings.")# hit 'Apply' buttonsquish.clickButton(squish.waitForObject(workstation_config_locators.deadlinedialog_apply_button))test.log("Settings have been applied.")
1
6
0
29
0
81
87
81
[]
None
{"Expr": 3}
4
7
4
["test.log", "squish.clickButton", "squish.waitForObject", "test.log"]
0
[]
The function (hit_apply_button) defined within the public class called public.The function start at line 81 and ends at 87. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called inside which are ["test.log", "squish.clickButton", "squish.waitForObject", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_farm_name
def set_farm_name(farm_name: str):# open Default farm drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.profilesettings_defaultfarm_dropdown))test.log("Opened farm name drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.farm_name_locator(farm_name)).text,farm_name,"Expect farm name to be present in drop down.",)# select Default farmsquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.profilesettings_defaultfarm_dropdown, farm_name))test.log("Selected farm name.")
1
16
1
70
0
90
107
90
farm_name
[]
None
{"Expr": 5}
9
18
9
["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.farm_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"]
0
[]
The function (set_farm_name) defined within the public class called public.The function start at line 90 and ends at 107. It contains 16 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 called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.farm_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_queue_name
def set_queue_name(queue_name: str):# open Default queue drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_defaultqueue_dropdown))test.log("Opened queue name drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.queue_name_locator(queue_name)).text,queue_name,"Expect queue name to be present in drop down.",)# select Default queuesquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.farmsettings_defaultqueue_dropdown, queue_name))test.log("Selected queue name.")
1
16
1
70
0
110
127
110
queue_name
[]
None
{"Expr": 5}
9
18
9
["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.queue_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"]
0
[]
The function (set_queue_name) defined within the public class called public.The function start at line 110 and ends at 127. It contains 16 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 called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.queue_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_and_verify_os_storage_profile
def set_and_verify_os_storage_profile(linux_storage_profile: str, windows_storage_profile: str, macos_storage_profile: str):# open Default storage profile drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown))test.log("Opened storage profile drop down menu.")# select storage profile based on OS platform being testedif platform.system() == "Linux":test.log("Detected test running on Linux OS")test.compare(squish.waitForObjectExists(workstation_config_locators.storage_profile_locator(linux_storage_profile)).text,linux_storage_profile,"Expect Linux Storage Profile to be present in drop down.",)# select Linux Storage Profilesquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown,linux_storage_profile,))# verify correct storage profile name is settest.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown).currentText),linux_storage_profile,"Expect selected storage profile to be set.",)elif platform.system() == "Windows":test.log("Detected test running on Windows OS")test.compare(squish.waitForObjectExists(workstation_config_locators.storage_profile_locator(windows_storage_profile)).text,windows_storage_profile,"Expect Windows Storage Profile to be present in drop down.",)# select Windows Storage Profilesquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown,windows_storage_profile,))# verify correct storage profile name is settest.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown).currentText),windows_storage_profile,"Expect selected storage profile to be set.",)elif platform.system() == "Darwin":test.log("Detected test running on macOS")test.compare(squish.waitForObjectExists(workstation_config_locators.storage_profile_locator(macos_storage_profile)).text,macos_storage_profile,"Expect macOS Storage Profile to be present in drop down.",)# select macOS Storage Profilesquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown,macos_storage_profile,))# verify correct storage profile name is settest.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown).currentText),macos_storage_profile,"Expect selected storage profile to be set.",)test.log("Selected storage profile based on OS platform being tested.")
4
82
3
271
0
130
219
130
linux_storage_profile,windows_storage_profile,macos_storage_profile
[]
None
{"Expr": 15, "If": 3}
34
90
34
["squish.mouseClick", "squish.waitForObject", "test.log", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "test.log"]
0
[]
The function (set_and_verify_os_storage_profile) defined within the public class called public.The function start at line 130 and ends at 219. It contains 82 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [130.0] and does not return any value. It declares 34.0 functions, and It has 34.0 functions called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_job_attachments_filesystem_options
def set_job_attachments_filesystem_options(job_attachments: str):# open Job attachments filesystem options drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_jobattachmentsoptions_dropdown))test.log("Opened job attachments filesystem options drop down menu.")# select Job attachments filesystem optionssquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.farmsettings_jobattachmentsoptions_dropdown, job_attachments))test.log("Selected job attachments filesystem option.")
1
13
1
47
0
222
236
222
job_attachments
[]
None
{"Expr": 4}
6
15
6
["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"]
0
[]
The function (set_job_attachments_filesystem_options) defined within the public class called public.The function start at line 222 and ends at 236. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_conflict_resolution_option
def set_conflict_resolution_option(conflict_res_option: str):# open Conflict resolution option drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.conflictresolution_option_dropdown),)test.log("Opened conflict resolution option drop down menu.")# select Conflict resolution optionsquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.conflictresolution_option_dropdown, conflict_res_option),)test.log("Selected conflict resolution option.")
1
11
1
49
0
239
251
239
conflict_res_option
[]
None
{"Expr": 4}
6
13
6
["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"]
0
[]
The function (set_conflict_resolution_option) defined within the public class called public.The function start at line 239 and ends at 251. 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 6.0 functions, and It has 6.0 functions called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
set_current_logging_level
def set_current_logging_level(logging_level: str):# open Current logging level drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.currentlogging_level_dropdown),)test.log("Opened current logging level drop down menu.")# select Current logging levelsquish.mouseClick(squish.waitForObjectItem(workstation_config_locators.currentlogging_level_dropdown, logging_level),)test.log("Selected current logging level.")
1
11
1
49
0
254
266
254
logging_level
[]
None
{"Expr": 4}
6
13
6
["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"]
0
[]
The function (set_current_logging_level) defined within the public class called public.The function start at line 254 and ends at 266. 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 6.0 functions, and It has 6.0 functions called inside which are ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"].
aws-deadline_deadline-cloud
public
public
0
0
profile_name_locator
def profile_name_locator(profile_name):return {"container": globalsettings_awsprofile_dropdown,"text": profile_name,"type": "QModelIndex",}
1
6
1
20
0
222
227
222
profile_name
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (profile_name_locator) defined within the public class called public.The function start at line 222 and ends at 227. It contains 6 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
farm_name_locator
def farm_name_locator(farm_name):return {"container": profilesettings_defaultfarm_dropdown,"text": farm_name,"type": "QModelIndex",}
1
6
1
20
0
230
235
230
farm_name
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (farm_name_locator) defined within the public class called public.The function start at line 230 and ends at 235. It contains 6 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
queue_name_locator
def queue_name_locator(queue_name):return {"container": farmsettings_defaultqueue_dropdown,"text": queue_name,"type": "QModelIndex",}
1
6
1
20
0
238
243
238
queue_name
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (queue_name_locator) defined within the public class called public.The function start at line 238 and ends at 243. It contains 6 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
storage_profile_locator
def storage_profile_locator(storage_profile):return {"container": farmsettings_defaultstorageprofile_dropdown,"text": storage_profile,"type": "QModelIndex",}
1
6
1
20
0
246
251
246
storage_profile
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (storage_profile_locator) defined within the public class called public.The function start at line 246 and ends at 251. It contains 6 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
init
def init():# launch Choose Job Bundle GUI Submitter based on OS platform being testedchoose_jobbundledir_helpers.detect_platform_and_launch_jobbundle_guisubmitter()# verify Choose job bundle directory is opentest.compare(str(squish.waitForObjectExists(choose_jobbundledir_locators.choose_job_bundle_dir).windowTitle),"Choose job bundle directory","Expect Choose job bundle directory window title to be present.",)test.compare(squish.waitForObjectExists(choose_jobbundledir_locators.choose_job_bundle_dir).visible,True,"Expect Choose job bundle directory to be open.",)
1
16
0
52
0
14
31
14
[]
None
{"Expr": 3}
6
18
6
["choose_jobbundledir_helpers.detect_platform_and_launch_jobbundle_guisubmitter", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S3StructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.core.component_py.validated", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94654328_simonsobs_sotodlib.sotodlib.mapmaking.ml_mapmaker_py.PmatMultibeam.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95161836_lvgl_micropython_lvgl_micropython.api_drivers.common_api_drivers.display.axs15231b.axs15231b_py.AXS15231B.init"]
The function (init) defined within the public class called public.The function start at line 14 and ends at 31. It contains 16 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 6.0 functions, It has 6.0 functions called inside which are ["choose_jobbundledir_helpers.detect_platform_and_launch_jobbundle_guisubmitter", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists"], It has 5.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S3StructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.core.component_py.validated", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94654328_simonsobs_sotodlib.sotodlib.mapmaking.ml_mapmaker_py.PmatMultibeam.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95161836_lvgl_micropython_lvgl_micropython.api_drivers.common_api_drivers.display.axs15231b.axs15231b_py.AXS15231B.init"].
aws-deadline_deadline-cloud
public
public
0
0
main
def main():# select Simple UI with Job Attachments (simple_ui_with_ja) job bundlechoose_jobbundledir_helpers.select_jobbundle(config.simple_ui_with_ja)# verify GUI Submitter dialogue openstest.compare(str(squish.waitForObjectExists(gui_submitter_locators.aws_submitter_dialogue).windowTitle),"Submit to AWS Deadline Cloud","Expect AWS Deadline Cloud Submitter window title to be present.",)test.compare(squish.waitForObjectExists(gui_submitter_locators.aws_submitter_dialogue).visible,True,"Expect AWS Deadline Cloud Submitter to be open.",)# verify shared job settings tab for simple_ui_with_jatest.log("Start verifying Shared Job Settings tab for Simple UI with Job Attachments (simple_ui_with_ja) job bundle")gui_submitter_helpers.verify_shared_job_settings(config.simple_ui_with_ja_name,)# verify load different job bundle flowtest.log("Navigate to Job-Specific Settings tab and verify Load a different job bundle flow")choose_jobbundledir_helpers.load_different_job_bundle()# select Simple UI - No Job Attachments (simple_ui_no_ja) job bundlechoose_jobbundledir_helpers.select_jobbundle(config.simple_ui_no_ja)# verify shared job settings tab for simple_ui_no_jatest.log("Start verifying Shared Job Settings tab for Simple UI - No Job Attachments (simple_ui_no_ja) job bundle")gui_submitter_helpers.verify_shared_job_settings(config.simple_ui_no_ja_name,)
1
27
0
104
0
34
66
34
[]
None
{"Expr": 10}
13
33
13
["choose_jobbundledir_helpers.select_jobbundle", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.log", "gui_submitter_helpers.verify_shared_job_settings", "test.log", "choose_jobbundledir_helpers.load_different_job_bundle", "choose_jobbundledir_helpers.select_jobbundle", "test.log", "gui_submitter_helpers.verify_shared_job_settings"]
134
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_invalid_config_exits_with_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_valid_args_run_clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.__init___py.cli", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_before_run_sql_is_executed_upon_construction", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_existing_new_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_newer_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_older_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_full_table_replication", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__generative", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable__missing_from_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__pks__same_resulting_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config_with_messages_for_only_one_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__configuration__schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__default_null_value__non_nullable_column", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__nested", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid_column_name"]
The function (main) defined within the public class called public.The function start at line 34 and ends at 66. It contains 27 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 13.0 functions, It has 13.0 functions called inside which are ["choose_jobbundledir_helpers.select_jobbundle", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.log", "gui_submitter_helpers.verify_shared_job_settings", "test.log", "choose_jobbundledir_helpers.load_different_job_bundle", "choose_jobbundledir_helpers.select_jobbundle", "test.log", "gui_submitter_helpers.verify_shared_job_settings"], It has 134.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_invalid_config_exits_with_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_valid_args_run_clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.__init___py.cli", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_before_run_sql_is_executed_upon_construction", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_existing_new_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_newer_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_older_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_full_table_replication", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__generative", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable__missing_from_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__pks__same_resulting_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config_with_messages_for_only_one_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__configuration__schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__default_null_value__non_nullable_column", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__nested", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid_column_name"].
aws-deadline_deadline-cloud
public
public
0
0
cleanup
def cleanup():test.log("Closing AWS Submitter dialogue by sending QCloseEvent to 'x' button.")squish.sendEvent("QCloseEvent", squish.waitForObject(gui_submitter_locators.aws_submitter_dialogue))
1
5
0
25
0
69
73
69
[]
None
{"Expr": 2}
3
5
3
["test.log", "squish.sendEvent", "squish.waitForObject"]
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_proxy_off_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.simple_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.build_py.BuildBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.expose_py.expose.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.commit.commit_py.commit_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.CpBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.cp_symlink.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.volume_mount.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_py.create_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_remote_tag_py.create_remote_tag.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.deferred_deletion.deferred_deletion_py.deferred_deletion.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.diff.diff_py.diff_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.empty_py.empty.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.truncated_py.truncated.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerinspect.dockerinspect_py.inspect_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.events.events_py.events.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.history.history_py.history_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.images_all.images_all_py.images_all_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_export.import_export_py.import_export_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_url.import_url_py.base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.iptable.iptable_py.iptable_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill.kill_utils_py.kill_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_bad.kill_bad_py.kill_bad_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_stopped.kill_utils_py.kill_base.cleanup"]
The function (cleanup) defined within the public class called public.The function start at line 69 and ends at 73. 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 3.0 functions, It has 3.0 functions called inside which are ["test.log", "squish.sendEvent", "squish.waitForObject"], It has 45.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_proxy_off_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.simple_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.build_py.BuildBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.expose_py.expose.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.commit.commit_py.commit_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.CpBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.cp_symlink.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.volume_mount.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_py.create_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_remote_tag_py.create_remote_tag.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.deferred_deletion.deferred_deletion_py.deferred_deletion.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.diff.diff_py.diff_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.empty_py.empty.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.truncated_py.truncated.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerinspect.dockerinspect_py.inspect_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.events.events_py.events.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.history.history_py.history_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.images_all.images_all_py.images_all_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_export.import_export_py.import_export_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_url.import_url_py.base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.iptable.iptable_py.iptable_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill.kill_utils_py.kill_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_bad.kill_bad_py.kill_bad_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_stopped.kill_utils_py.kill_base.cleanup"].
aws-deadline_deadline-cloud
public
public
0
0
init
def init():# launch Deadline Workstation Config dialog based on OS platform being testedworkstation_config_helpers.detect_platform_and_launch_deadline_config()# clear and reset job history directory text inputjobhistory_dir_helpers.enter_job_hist_dir_input(config.default_job_hist_dir)# verify text input displays correct default job history directory path to be testedjobhistory_dir_helpers.verify_job_hist_dir_text_input(config.default_job_hist_dir)# delete/clean-up job history directory folder in user's systemjobhistory_dir_helpers.delete_directory_if_exists(config.custom_job_hist_dir)test.log("Reset job history directory for test setup.")# using aws credential/non-DCM profile, set aws profile name to `(default)`loginout_helpers.set_aws_profile_name_and_verify_auth(config.profile_name)# verify correct aws profile name is settest.compare(squish.waitForObjectExists(workstation_config_locators.globalsettings_awsprofile_dropdown).currentText,config.profile_name,"Expect selected AWS profile name to be set.",)
1
14
0
69
0
13
32
13
[]
None
{"Expr": 7}
8
20
8
["workstation_config_helpers.detect_platform_and_launch_deadline_config", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "loginout_helpers.set_aws_profile_name_and_verify_auth", "test.compare", "squish.waitForObjectExists"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S3StructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.core.component_py.validated", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94654328_simonsobs_sotodlib.sotodlib.mapmaking.ml_mapmaker_py.PmatMultibeam.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95161836_lvgl_micropython_lvgl_micropython.api_drivers.common_api_drivers.display.axs15231b.axs15231b_py.AXS15231B.init"]
The function (init) defined within the public class called public.The function start at line 13 and ends at 32. 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 8.0 functions, It has 8.0 functions called inside which are ["workstation_config_helpers.detect_platform_and_launch_deadline_config", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "loginout_helpers.set_aws_profile_name_and_verify_auth", "test.compare", "squish.waitForObjectExists"], It has 5.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S3StructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.core.component_py.validated", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94654328_simonsobs_sotodlib.sotodlib.mapmaking.ml_mapmaker_py.PmatMultibeam.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95161836_lvgl_micropython_lvgl_micropython.api_drivers.common_api_drivers.display.axs15231b.axs15231b_py.AXS15231B.init"].
aws-deadline_deadline-cloud
public
public
0
0
main
def main():# enter custom job history directory file pathjobhistory_dir_helpers.enter_job_hist_dir_input(config.custom_job_hist_dir)# open job history directory to set custom path and to create new directoryjobhistory_dir_helpers.open_job_hist_directory()# verify text input displays correct custom job history directory pathjobhistory_dir_helpers.verify_job_hist_dir_text_input(config.custom_job_hist_dir)# verify custom job history folder is created/exists in user's systemjobhistory_dir_helpers.verify_directory_exists(config.custom_job_hist_dir)# set farm nameworkstation_config_helpers.set_farm_name(config.farm_name)# verify correct farm name is settest.compare(str(squish.waitForObjectExists(workstation_config_locators.profilesettings_defaultfarm_dropdown).currentText),config.farm_name,"Expect selected farm name to be set.",)# set queue nameworkstation_config_helpers.set_queue_name(config.queue_name)# verify correct queue name is settest.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_defaultqueue_dropdown).currentText),config.queue_name,"Expect selected queue name to be set.",)# set and verify storage profile based on OS platform being testedworkstation_config_helpers.set_and_verify_os_storage_profile(config.storage_profile_linux, config.storage_profile_windows, config.storage_profile_macos)# set job attachments filesystem optionsworkstation_config_helpers.set_job_attachments_filesystem_options(config.job_attachments)# verify job attachments filesystem options is set to 'COPIED'test.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_jobattachmentsoptions_dropdown).currentText),config.job_attachments,"Expect selected job attachment filesystem option to be set.",)# verify 'COPIED' contains correct tooltip texttest.compare(str(squish.waitForObjectExists(workstation_config_locators.farmsettings_jobattachmentsoptions_dropdown).toolTip),config.tooltip_text_copied,"Expect COPIED to contain correct tooltip text.",)# verify job attachments filesystem options lightbulb icon contains correct tooltip texttest.compare(str(squish.waitForObjectExists(workstation_config_locators.jobattachments_filesystemoptions_lightbulb_icon).toolTip),config.tooltip_text_lightbulb,"Expect job attachments filesystem options lightbulb icon to contain correct tooltip text.",)# verify auto accept prompt defaults checkbox is checkabletest.compare(squish.waitForObjectExists(workstation_config_locators.autoaccept_promptdefaults_checkbox).checkable,True,"Expect auto accept prompt defaults checkbox to be checkable.",)# verify telemetry opt out checkbox is checkabletest.compare(squish.waitForObjectExists(workstation_config_locators.telemetry_optout_checkbox).checkable,True,"Expect telemetry opt out checkbox to be checkable.",)# set conflict resolution optionworkstation_config_helpers.set_conflict_resolution_option(config.conflict_res_option)# verify conflict resolution option is set to 'NOT_SELECTED'test.compare(str(squish.waitForObjectExists(workstation_config_locators.conflictresolution_option_dropdown).currentText),config.conflict_res_option_expected_text,"Expect selected conflict resolution option to be set.",)# set current logging level optionworkstation_config_helpers.set_current_logging_level(config.logging_level)# verify current logging level option is set to 'WARNING'test.compare(str(squish.waitForObjectExists(workstation_config_locators.currentlogging_level_dropdown).currentText),config.logging_level,"Expect selected current logging level to be set.",)test.log("All Deadline Workstation Config settings have been set.")
1
89
0
310
0
35
142
35
[]
None
{"Expr": 20}
36
108
36
["jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.open_job_hist_directory", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.verify_directory_exists", "workstation_config_helpers.set_farm_name", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_queue_name", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_and_verify_os_storage_profile", "workstation_config_helpers.set_job_attachments_filesystem_options", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "workstation_config_helpers.set_conflict_resolution_option", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_current_logging_level", "test.compare", "str", "squish.waitForObjectExists", "test.log"]
134
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_invalid_config_exits_with_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_valid_args_run_clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.__init___py.cli", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_before_run_sql_is_executed_upon_construction", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_existing_new_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_newer_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_older_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_full_table_replication", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__generative", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable__missing_from_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__pks__same_resulting_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config_with_messages_for_only_one_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__configuration__schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__default_null_value__non_nullable_column", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__nested", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid_column_name"]
The function (main) defined within the public class called public.The function start at line 35 and ends at 142. It contains 89 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 36.0 functions, It has 36.0 functions called inside which are ["jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.open_job_hist_directory", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.verify_directory_exists", "workstation_config_helpers.set_farm_name", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_queue_name", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_and_verify_os_storage_profile", "workstation_config_helpers.set_job_attachments_filesystem_options", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "workstation_config_helpers.set_conflict_resolution_option", "test.compare", "str", "squish.waitForObjectExists", "workstation_config_helpers.set_current_logging_level", "test.compare", "str", "squish.waitForObjectExists", "test.log"], It has 134.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_invalid_config_exits_with_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_valid_args_run_clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.__init___py.cli", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_before_run_sql_is_executed_upon_construction", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_existing_new_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_newer_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_deduplication_older_rows", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_full_table_replication", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__generative", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__nullable__missing_from_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__column_type_change__pks__same_resulting_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__empty__enabled_config_with_messages_for_only_one_stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__column_type_change__pks__nullable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__configuration__schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__default_null_value__non_nullable_column", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__nested", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid__table_name__stream", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.tests.unit.test_postgres_py.test_loading__invalid_column_name"].
aws-deadline_deadline-cloud
public
public
0
0
cleanup
def cleanup():# reset aws profile name to `(default)`loginout_helpers.set_aws_profile_name_and_verify_auth(config.profile_name)test.log("Reset aws profile name to `(default)` for test cleanup.")# reset job history directory settingjobhistory_dir_helpers.enter_job_hist_dir_input(config.default_job_hist_dir)# verify text input displays correct default job history directory path to be testedjobhistory_dir_helpers.verify_job_hist_dir_text_input(config.default_job_hist_dir)# delete/clean-up custom job history directory folder in user's systemjobhistory_dir_helpers.delete_directory_if_exists(config.custom_job_hist_dir)test.log("Reset job history directory back to default for test cleanup.")# close Deadline Workstation Configworkstation_config_helpers.close_deadline_config_gui()
1
8
0
53
0
145
157
145
[]
None
{"Expr": 7}
7
13
7
["loginout_helpers.set_aws_profile_name_and_verify_auth", "test.log", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "workstation_config_helpers.close_deadline_config_gui"]
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_proxy_off_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.simple_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.build_py.BuildBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.expose_py.expose.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.commit.commit_py.commit_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.CpBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.cp_symlink.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.volume_mount.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_py.create_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_remote_tag_py.create_remote_tag.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.deferred_deletion.deferred_deletion_py.deferred_deletion.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.diff.diff_py.diff_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.empty_py.empty.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.truncated_py.truncated.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerinspect.dockerinspect_py.inspect_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.events.events_py.events.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.history.history_py.history_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.images_all.images_all_py.images_all_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_export.import_export_py.import_export_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_url.import_url_py.base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.iptable.iptable_py.iptable_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill.kill_utils_py.kill_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_bad.kill_bad_py.kill_bad_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_stopped.kill_utils_py.kill_base.cleanup"]
The function (cleanup) defined within the public class called public.The function start at line 145 and ends at 157. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functions called inside which are ["loginout_helpers.set_aws_profile_name_and_verify_auth", "test.log", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "workstation_config_helpers.close_deadline_config_gui"], It has 45.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_proxy_off_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.simple_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.build_py.BuildBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.build.expose_py.expose.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.commit.commit_py.commit_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.CpBase.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.cp_symlink.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.cp.cp_py.volume_mount.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_py.create_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.create.create_remote_tag_py.create_remote_tag.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.deferred_deletion.deferred_deletion_py.deferred_deletion.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.diff.diff_py.diff_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.empty_py.empty.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerimport.truncated_py.truncated.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.dockerinspect.dockerinspect_py.inspect_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.events.events_py.events.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.history.history_py.history_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.images_all.images_all_py.images_all_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_export.import_export_py.import_export_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.import_url.import_url_py.base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.iptable.iptable_py.iptable_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill.kill_utils_py.kill_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_bad.kill_bad_py.kill_bad_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.kill_stopped.kill_utils_py.kill_base.cleanup"].
aws-deadline_deadline-cloud
public
public
0
0
fresh_deadline_config
def fresh_deadline_config():"""Fixture to start with a blank AWS Deadline Cloud config file."""# Clear the session cache. Importing the cache invalidator at runtime is necessary# to make sure the import order doesn't bypass moto mocking in other areas.from deadline.client.api._session import invalidate_boto3_session_cacheinvalidate_boto3_session_cache()try:# Create an empty temp file to set as the AWS Deadline Cloud configtemp_dir = tempfile.TemporaryDirectory()temp_dir_path = Path(temp_dir.name)temp_file_path = temp_dir_path / "config"with open(temp_file_path, "w+t", encoding="utf8") as temp_file:temp_file.write("")# Yield the temp file name with it patched in as the# AWS Deadline Cloud config filewith patch.object(config_file, "CONFIG_FILE_PATH", str(temp_file_path)):# Write a telemetry id to force it getting saved to the config file. If we don't, then# an ID will get generated and force a save of the config file in the middle of a test.# Writing the config file may be undesirable in the middle of a test.config_file.set_setting("telemetry.identifier", "00000000-0000-0000-0000-000000000000")yield str(temp_file_path)finally:temp_dir.cleanup()
2
14
0
95
3
16
46
16
['temp_dir_path', 'temp_file_path', 'temp_dir']
None
{"Assign": 3, "Expr": 6, "Try": 1, "With": 2}
11
31
11
["invalidate_boto3_session_cache", "tempfile.TemporaryDirectory", "Path", "open", "temp_file.write", "patch.object", "str", "config_file.set_setting", "str", "temp_dir.cleanup", "pytest.fixture"]
0
[]
The function (fresh_deadline_config) defined within the public class called public.The function start at line 16 and ends at 46. It contains 14 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 11.0 functions, and It has 11.0 functions called inside which are ["invalidate_boto3_session_cache", "tempfile.TemporaryDirectory", "Path", "open", "temp_file.write", "patch.object", "str", "config_file.set_setting", "str", "temp_dir.cleanup", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
aws_config
def aws_config(monkeypatch):"""Fixture to set the AWS_CONFIG_FILE environment variable to a temporary file.This fixture sanitizes the environment, otherwise it's easy to write a test that only works whena AWS config file exists(even if it isn't used) that then fails on machines where no such config file existsThis fixture yields the AWS config file path, so that tests can write to this file if necessary for testing"""try:temp_dir = tempfile.TemporaryDirectory()temp_dir_path = Path(temp_dir.name)temp_file_path = temp_dir_path / "aws_config"monkeypatch.setenv("AWS_CONFIG_FILE", str(temp_file_path))monkeypatch.delenv("AWS_DEFAULT_PROFILE", raising=False)monkeypatch.delenv("AWS_PROFILE", raising=False)yield temp_file_pathfinally:temp_dir.cleanup()monkeypatch.delenv("AWS_CONFIG_FILE", raising=False)
2
12
1
78
3
50
71
50
monkeypatch
['temp_dir_path', 'temp_file_path', 'temp_dir']
None
{"Assign": 3, "Expr": 7, "Try": 1}
9
22
9
["tempfile.TemporaryDirectory", "Path", "monkeypatch.setenv", "str", "monkeypatch.delenv", "monkeypatch.delenv", "temp_dir.cleanup", "monkeypatch.delenv", "pytest.fixture"]
0
[]
The function (aws_config) defined within the public class called public.The function start at line 50 and ends at 71. It contains 12 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 9.0 functions, and It has 9.0 functions called inside which are ["tempfile.TemporaryDirectory", "Path", "monkeypatch.setenv", "str", "monkeypatch.delenv", "monkeypatch.delenv", "temp_dir.cleanup", "monkeypatch.delenv", "pytest.fixture"].
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
74
75
74
[]
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.test.unit.deadline_client.job_bundle.test_job_bundle_loader_py.test_validate_directory_symlink_containment_success", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_asset_sync_py.TestAssetSync.test_is_file_within_directory_with_symlink", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_OutputDownloader_set_root_path_with_symlinks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_upload_py.TestUpload.test_manage_assets_with_symlinks"]
The function (is_windows_non_admin) defined within the public class called public.The function start at line 74 and ends at 75. 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 called inside which is ["getpass.getuser"], It has 5.0 functions calling this function which are ["_.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.test.unit.deadline_client.job_bundle.test_job_bundle_loader_py.test_validate_directory_symlink_containment_success", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_asset_sync_py.TestAssetSync.test_is_file_within_directory_with_symlink", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_OutputDownloader_set_root_path_with_symlinks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_upload_py.TestUpload.test_manage_assets_with_symlinks"].
aws-deadline_deadline-cloud
FileMissingCopyRight
public
0
1
__init__
def __init__(self, message, filepath):super().__init__(message)self.filepath = filepath
1
3
3
22
0
16
18
16
self,message,filepath
[]
None
{"Assign": 1, "Expr": 1}
2
3
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_py.TgScheduler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.CalculatedAmountDiscrepancyError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.ExchangeRateMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.InvalidTransactionError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.ParsingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.PriceMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.QuantityNotPositiveError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.SymbolMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.UnexpectedColumnCountError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.UnexpectedRowCountError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.raw_py.RawTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.schwab_equity_award_json_py.SchwabTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.schwab_py.SchwabTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.trading212_py.Trading212Transaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.vanguard_py.VanguardTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.ExporterError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.FritzPasswordFileDoesNotExistError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.FritzPasswordTooLongError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.DeviceInfo.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HomeAutomation.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HostInfo.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HostNumberOfEntries.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.LanInterfaceConfig.__init__"]
The function (__init__) defined within the public class called FileMissingCopyRight, that inherit another class.The function start at line 16 and ends at 18. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["__init__", "super"], It has 4993.0 functions calling this function which are ["_.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_py.TgScheduler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.CalculatedAmountDiscrepancyError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.ExchangeRateMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.InvalidTransactionError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.ParsingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.PriceMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.QuantityNotPositiveError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.SymbolMissingError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.UnexpectedColumnCountError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.UnexpectedRowCountError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.raw_py.RawTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.schwab_equity_award_json_py.SchwabTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.schwab_py.SchwabTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.trading212_py.Trading212Transaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.parsers.vanguard_py.VanguardTransaction.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.ExporterError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.FritzPasswordFileDoesNotExistError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.config.exceptions_py.FritzPasswordTooLongError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.DeviceInfo.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HomeAutomation.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HostInfo.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.HostNumberOfEntries.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.fritzexporter.fritzcapabilities_py.LanInterfaceConfig.__init__"].
aws-deadline_deadline-cloud
public
public
0
0
_check_file
def _check_file(filename: Path) -> None:with open(filename, encoding="utf8") as infile:lines_read = 0for line in infile:if _copyright_header_re.search(line):return# successlines_read += 1if lines_read > 10:raise FileMissingCopyRight(f"Could not find a valid Amazon.com copyright header in the top of {filename}."" Please add one.",Path(filename),)else:# __init__.py files are usually empty, this is to catch that.raise FileMissingCopyRight(f"Could not find a valid Amazon.com copyright header in the top of {filename}."" Please add one.",Path(filename),)
4
19
1
74
1
21
40
21
filename
['lines_read']
None
{"Assign": 1, "AugAssign": 1, "For": 1, "If": 2, "Return": 1, "With": 1}
6
20
6
["open", "_copyright_header_re.search", "FileMissingCopyRight", "Path", "FileMissingCopyRight", "Path"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"]
The function (_check_file) defined within the public class called public.The function start at line 21 and ends at 40. It contains 19 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 6.0 functions, It has 6.0 functions called inside which are ["open", "_copyright_header_re.search", "FileMissingCopyRight", "Path", "FileMissingCopyRight", "Path"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"].
aws-deadline_deadline-cloud
public
public
0
0
_is_version_file
def _is_version_file(filename: Path) -> bool:if filename.name != "_version.py":return Falsewith open(filename) as infile:lines_read = 0for line in infile:if _generated_by_scm.search(line):return Truelines_read += 1if lines_read > 10:breakreturn False
5
12
1
55
1
43
54
43
filename
['lines_read']
bool
{"Assign": 1, "AugAssign": 1, "For": 1, "If": 3, "Return": 3, "With": 1}
2
12
2
["open", "_generated_by_scm.search"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"]
The function (_is_version_file) defined within the public class called public.The function start at line 43 and ends at 54. It contains 12 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["open", "_generated_by_scm.search"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"].
aws-deadline_deadline-cloud
public
public
0
0
test_copyright_headers
def test_copyright_headers():"""Verifies every .py file has an Amazon copyright header."""root_project_dir = Path(__file__)# The root of the project is the directory that contains the test directory.while not (root_project_dir / "test").exists():root_project_dir = root_project_dir.parent# Call out every directory & extension we expect to see copyright headers in; non-exhaustive but best-efforttop_level_dirs = ["src", "test", "scripts", "testing_containers", "scripted_tests", "pipeline"]file_count = 0failed_files = set()for top_level_dir in top_level_dirs:for glob_pattern in ("**/*.py", "**/*.sh", "**/Dockerfile", "**/*.ps1", "**/*.xml"):for path in Path(root_project_dir / top_level_dir).glob(glob_pattern):print(path)if not _is_version_file(path):try:_check_file(path)except FileMissingCopyRight as e:failed_files.add(e.filepath)file_count += 1if failed_files:formatted_failed_files = "\n\t".join(str(filepath) for filepath in failed_files)raise Exception(f"Found {len(failed_files)} files without copyright headers:\n\t{formatted_failed_files}")print(f"test_copyright_headers checked {file_count} files successfully.")
9
23
0
148
5
57
84
57
['file_count', 'formatted_failed_files', 'failed_files', 'root_project_dir', 'top_level_dirs']
None
{"Assign": 6, "AugAssign": 1, "Expr": 5, "For": 3, "If": 2, "Try": 1, "While": 1}
14
28
14
["Path", "exists", "set", "glob", "Path", "print", "_is_version_file", "_check_file", "failed_files.add", "join", "str", "Exception", "len", "print"]
0
[]
The function (test_copyright_headers) defined within the public class called public.The function start at line 57 and ends at 84. It contains 23 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 14.0 functions, and It has 14.0 functions called inside which are ["Path", "exists", "set", "glob", "Path", "print", "_is_version_file", "_check_file", "failed_files.add", "join", "str", "Exception", "len", "print"].
aws-deadline_deadline-cloud
public
public
0
0
temp_job_bundle_dir
def temp_job_bundle_dir():"""Fixture to provide a temporary job bundle directory."""with tempfile.TemporaryDirectory() as job_bundle_dir:yield job_bundle_dir
1
3
0
16
0
25
31
25
[]
None
{"Expr": 2, "With": 1}
2
7
2
["tempfile.TemporaryDirectory", "pytest.fixture"]
0
[]
The function (temp_job_bundle_dir) defined within the public class called public.The function start at line 25 and ends at 31. 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, and It has 2.0 functions called inside which are ["tempfile.TemporaryDirectory", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
temp_assets_dir
def temp_assets_dir():"""Fixture to provide a temporary directory for asset files."""with tempfile.TemporaryDirectory() as assets_dir:yield assets_dir
1
3
0
16
0
35
41
35
[]
None
{"Expr": 2, "With": 1}
2
7
2
["tempfile.TemporaryDirectory", "pytest.fixture"]
0
[]
The function (temp_assets_dir) defined within the public class called public.The function start at line 35 and ends at 41. 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, and It has 2.0 functions called inside which are ["tempfile.TemporaryDirectory", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
temp_cwd
def temp_cwd():"""Fixture to provide a temporary current working directory."""with tempfile.TemporaryDirectory() as cwd:# Change the current working directory to the temporary directoryoriginal_cwd = os.getcwd()try:os.chdir(cwd)yield cwdfinally:# Restore the original current working directoryos.chdir(original_cwd)
2
8
0
39
1
45
58
45
['original_cwd']
None
{"Assign": 1, "Expr": 4, "Try": 1, "With": 1}
5
14
5
["tempfile.TemporaryDirectory", "os.getcwd", "os.chdir", "os.chdir", "pytest.fixture"]
0
[]
The function (temp_cwd) defined within the public class called public.The function start at line 45 and ends at 58. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["tempfile.TemporaryDirectory", "os.getcwd", "os.chdir", "os.chdir", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
mock_telemetry
def mock_telemetry():"""Fixture to avoid calling telemetry code in unrelated unit tests."""with patch.object(TelemetryClient, "record_event") as mock_telemetry:yield mock_telemetry
1
3
0
19
0
62
68
62
[]
None
{"Expr": 2, "With": 1}
2
7
2
["patch.object", "pytest.fixture"]
0
[]
The function (mock_telemetry) defined within the public class called public.The function start at line 62 and ends at 68. 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, and It has 2.0 functions called inside which are ["patch.object", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
deadline_mock.mock_make_api_call
def mock_make_api_call(self, operation_name, kwarg):service_name = self._service_model.service_nameif service_name == "deadline":# Send the "GetQueue" operation, i.e. the get_queue call, to# deadline_magicmock.get_queue()operation_words = re.findall("[A-Z][a-z]+", operation_name)snake_operation = "_".join(word.lower() for word in operation_words)return getattr(deadline_magicmock, snake_operation)(**kwarg)# If we don't want to patch the API callreturn original_make_api_call(self, operation_name, kwarg)
3
7
3
67
0
95
106
95
null
[]
None
null
0
0
0
null
0
null
The function (deadline_mock.mock_make_api_call) defined within the public class called public.The function start at line 95 and ends at 106. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [95.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
deadline_mock
def deadline_mock():"""Uses the moto library to create a mock boto3 session for all tests to use.Mocks Deadline Cloud via the approach moto recommends for services that itlacks an implementation for.As a special case, deadline.client.api.get_deadline_cloud_library_telemetry_clientis also redirected to deadline_mock.get_deadline_cloud_library_telemetry_clientReturns a MagicMock that handles all the deadline client operations."""os.environ["AWS_ACCESS_KEY_ID"] = "ACCESSKEY"os.environ["AWS_SECRET_ACCESS_KEY"] = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"os.environ["AWS_SECURITY_TOKEN"] = "testing"os.environ["AWS_SESSION_TOKEN"] = "testing"os.environ["AWS_DEFAULT_REGION"] = "us-west-2"with mock_aws():deadline_magicmock = MagicMock()# See https://docs.getmoto.org/en/latest/docs/services/patching_other_services.htmloriginal_make_api_call = botocore.client.BaseClient._make_api_calldef mock_make_api_call(self, operation_name, kwarg):service_name = self._service_model.service_nameif service_name == "deadline":# Send the "GetQueue" operation, i.e. the get_queue call, to# deadline_magicmock.get_queue()operation_words = re.findall("[A-Z][a-z]+", operation_name)snake_operation = "_".join(word.lower() for word in operation_words)return getattr(deadline_magicmock, snake_operation)(**kwarg)# If we don't want to patch the API callreturn original_make_api_call(self, operation_name, kwarg)# Create a moto mock S3 bucket for job attachments on the queueboto3_session = boto3.Session(region_name="us-west-2")s3_client = boto3_session.client("s3", region_name="us-west-2")s3_client.create_bucket(Bucket=MOCK_BUCKET_NAME, CreateBucketConfiguration={"LocationConstraint": "us-west-2"})# Mock some defaults into the Deadline Cloud API callsdeadline_magicmock.get_farm.return_value = {"farmId": MOCK_FARM_ID,"displayName": "Mock Farm","description": "Farm for mock testing","kmsKeyArn": "","createdAt": datetime.fromisoformat("2024-08-01T01:01:44+00:00"),"createdBy": "mock-user-id",}deadline_magicmock.get_queue.return_value = {"queueId": MOCK_QUEUE_ID,"displayName": "Mock Queue","jobAttachmentSettings": {"rootPrefix": "MockRootPrefix","s3BucketName": MOCK_BUCKET_NAME,},}deadline_magicmock.list_sessions.return_value = {"sessions": []}deadline_magicmock.list_session_actions.return_value = {"sessionActions": []}deadline_magicmock.assume_queue_role_for_user.return_value = {"credentials": {"accessKeyId": "ACCESSKEY","secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY","sessionToken": "testing","expiration": datetime.fromisoformat("2125-08-07T01:01:44+00:00"),}}with patch("botocore.client.BaseClient._make_api_call", new=mock_make_api_call), patch.object(deadline.client.api,"get_deadline_cloud_library_telemetry_client",new=deadline_magicmock.get_deadline_cloud_library_telemetry_client,), patch.object(_submit_job_bundle.api,"get_deadline_cloud_library_telemetry_client",new=deadline_magicmock.get_deadline_cloud_library_telemetry_client,):yield deadline_magicmock
1
53
0
277
7
72
154
72
['operation_words', 'original_make_api_call', 'snake_operation', 's3_client', 'deadline_magicmock', 'boto3_session', 'service_name']
Returns
{"Assign": 17, "Expr": 3, "If": 1, "Return": 2, "With": 2}
15
83
15
["mock_aws", "MagicMock", "re.findall", "join", "word.lower", "getattr", "original_make_api_call", "boto3.Session", "boto3_session.client", "s3_client.create_bucket", "datetime.fromisoformat", "datetime.fromisoformat", "patch", "patch.object", "patch.object"]
0
[]
The function (deadline_mock) defined within the public class called public.The function start at line 72 and ends at 154. It contains 53 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 15.0 functions, and It has 15.0 functions called inside which are ["mock_aws", "MagicMock", "re.findall", "join", "word.lower", "getattr", "original_make_api_call", "boto3.Session", "boto3_session.client", "s3_client.create_bucket", "datetime.fromisoformat", "datetime.fromisoformat", "patch", "patch.object", "patch.object"].
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function._filter_function
def _filter_function(job) -> bool:return field_name in job and job[field_name] == value
2
2
1
18
0
58
59
58
null
[]
None
null
0
0
0
null
0
null
The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 58 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function._filter_function
def _filter_function(job) -> bool:return field_name in job and job[field_name] == value
2
2
1
18
0
62
63
58
null
[]
None
null
0
0
0
null
0
null
The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 62 and ends at 63. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function._filter_function
def _filter_function(job) -> bool:return field_name in job and job[field_name] == value
2
2
1
18
0
78
79
58
null
[]
None
null
0
0
0
null
0
null
The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 78 and ends at 79. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function._filter_function
def _filter_function(job) -> bool:return field_name in job and job[field_name] == value
2
2
1
18
0
82
83
58
null
[]
None
null
0
0
0
null
0
null
The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 82 and ends at 83. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function
def _build_filter_function(filter) -> Callable[[dict], bool]:try:# This only supports the subset of filters used in the functions we're testing.# You can extend it to support more, to be able to test more cases!if "stringFilter" in filter:filter = filter["stringFilter"]field_name = snake_to_camel(filter["name"].lower())operator = filter["operator"]value = filter["value"]assert isinstance(value, str)if operator == "EQUAL":def _filter_function(job) -> bool:return field_name in job and job[field_name] == valueelif operator == "GREATER_THAN_EQUAL_TO":def _filter_function(job) -> bool:return field_name in job and job[field_name] >= valueelse:raise ValueError(f"fake SearchJobs filter has not implemented operator {operator}")elif "dateTimeFilter" in filter:filter = filter["dateTimeFilter"]assert filter["name"] in ["CREATED_AT", "ENDED_AT", "STARTED_AT", "UPDATED_AT"]field_name = snake_to_camel(filter["name"].lower())operator = filter["operator"]value = filter["dateTime"]assert isinstance(value, datetime)if operator == "EQUAL":def _filter_function(job) -> bool:return field_name in job and job[field_name] == valueelif operator == "GREATER_THAN_EQUAL_TO":def _filter_function(job) -> bool:return field_name in job and job[field_name] >= valueelse:raise ValueError(f"fake SearchJobs filter has not implemented operator {operator}")elif "groupFilter" in filter:return _build_filter_function_from_group(filter["groupFilter"])else:raise ValueError(f"fake SearchJobs filter not implemented for {filter}")return _filter_functionexcept KeyError as e:raise ValueError(f"fake SearchJobs filter not implemented for {filter} - {e}")
9
34
1
195
4
43
93
43
filter
['field_name', 'value', 'filter', 'operator']
Callable[[dict], bool]
{"Assign": 8, "If": 7, "Return": 6, "Try": 1}
11
51
11
["snake_to_camel", "lower", "isinstance", "ValueError", "snake_to_camel", "lower", "isinstance", "ValueError", "_build_filter_function_from_group", "ValueError", "ValueError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"]
The function (_build_filter_function) defined within the public class called public.The function start at line 43 and ends at 93. It contains 34 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 11.0 functions, It has 11.0 functions called inside which are ["snake_to_camel", "lower", "isinstance", "ValueError", "snake_to_camel", "lower", "isinstance", "ValueError", "_build_filter_function_from_group", "ValueError", "ValueError"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"].
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function_from_reduction._filter_function
def _filter_function(job) -> bool:return all_or_any(filter(job) for filter in filter_list)
2
2
1
19
0
97
98
97
null
[]
None
null
0
0
0
null
0
null
The function (_build_filter_function_from_reduction._filter_function) defined within the public class called public.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function_from_reduction
def _build_filter_function_from_reduction(filter_list, all_or_any) -> Callable[[dict], bool]:def _filter_function(job) -> bool:return all_or_any(filter(job) for filter in filter_list)return _filter_function
1
3
2
20
0
96
100
96
filter_list,all_or_any
[]
Callable[[dict], bool]
{"Return": 2}
2
5
2
["all_or_any", "filter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"]
The function (_build_filter_function_from_reduction) defined within the public class called public.The function start at line 96 and ends at 100. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [96.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["all_or_any", "filter"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"].
aws-deadline_deadline-cloud
public
public
0
0
_build_filter_function_from_group
def _build_filter_function_from_group(filter_expressions) -> Callable[[dict], bool]:"""Given a filterExpressions parameter value for deadline:SearchJobs, constructs a Pythoncallable that returns True/False depending on whether the job matches the filter."""filters = [_build_filter_function(filter) for filter in filter_expressions["filters"]]if len(filters) == 1:# If there's just a single filterreturn filters[0]operator = filter_expressions["operator"]if operator == "OR":all_or_any = anyelif operator == "AND":all_or_any = allelse:raise ValueError(f"filter expressions operator value {operator} is incorrect")return _build_filter_function_from_reduction(filters, all_or_any)
5
12
1
80
3
103
121
103
filter_expressions
['all_or_any', 'operator', 'filters']
Callable[[dict], bool]
{"Assign": 4, "Expr": 1, "If": 3, "Return": 2}
4
19
4
["_build_filter_function", "len", "ValueError", "_build_filter_function_from_reduction"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py.mock_search_jobs_for_set"]
The function (_build_filter_function_from_group) defined within the public class called public.The function start at line 103 and ends at 121. It contains 12 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside which are ["_build_filter_function", "len", "ValueError", "_build_filter_function_from_reduction"], It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py.mock_search_jobs_for_set"].
aws-deadline_deadline-cloud
public
public
0
0
mock_search_jobs_for_set._fake_search_jobs
def _fake_search_jobs(farmId, queueIds, itemOffset, pageSize=100, filterExpressions={}, sortExpressions=[]):# Make deep copies of these parameters so we can destructively assert about themfilterExpressions = deepcopy(filterExpressions)sortExpressions = deepcopy(sortExpressions)assert farmId == farmIdForJobsassert queueIdForJobs in queueIds# We're only implementing ascending order by one of the timestamp fieldsfield_sort_name = sortExpressions[0]["fieldSort"].pop("name")assert field_sort_name in ["CREATED_AT", "ENDED_AT", "STARTED_AT", "UPDATED_AT"]assert sortExpressions == [{"fieldSort": {"sortOrder": "ASCENDING"}}]filter = _build_filter_function_from_group(filterExpressions)# Sort the jobsresult_jobs = sorted(jobs, key=lambda j: j[field_sort_name.lower().replace("_a", "A")])# Filter the jobsresult_jobs = [j for j in result_jobs if filter(j)]# Construct the API responsenextItemOffset = min(len(result_jobs), itemOffset + pageSize)response_jobs = deepcopy(result_jobs[itemOffset:nextItemOffset])# Remove all "attachments" properties from the response, they are not returned by deadline:SearchJobsfor job in response_jobs:if "attachments" in job:del job["attachments"]response = {"jobs": response_jobs,"totalResults": len(result_jobs),}if nextItemOffset < len(result_jobs):response["nextItemOffset"] = nextItemOffsetreturn response
6
25
6
200
0
131
166
131
null
[]
None
null
0
0
0
null
0
null
The function (mock_search_jobs_for_set._fake_search_jobs) defined within the public class called public.The function start at line 131 and ends at 166. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [131.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
mock_search_jobs_for_set
def mock_search_jobs_for_set(farmIdForJobs, queueIdForJobs, jobs):"""Returns a fake "search_jobs" API that emulates a subset of Deadline Cloud'sSearchJobs on the provided set of jobs.See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_SearchJobs.html"""def _fake_search_jobs(farmId, queueIds, itemOffset, pageSize=100, filterExpressions={}, sortExpressions=[]):# Make deep copies of these parameters so we can destructively assert about themfilterExpressions = deepcopy(filterExpressions)sortExpressions = deepcopy(sortExpressions)assert farmId == farmIdForJobsassert queueIdForJobs in queueIds# We're only implementing ascending order by one of the timestamp fieldsfield_sort_name = sortExpressions[0]["fieldSort"].pop("name")assert field_sort_name in ["CREATED_AT", "ENDED_AT", "STARTED_AT", "UPDATED_AT"]assert sortExpressions == [{"fieldSort": {"sortOrder": "ASCENDING"}}]filter = _build_filter_function_from_group(filterExpressions)# Sort the jobsresult_jobs = sorted(jobs, key=lambda j: j[field_sort_name.lower().replace("_a", "A")])# Filter the jobsresult_jobs = [j for j in result_jobs if filter(j)]# Construct the API responsenextItemOffset = min(len(result_jobs), itemOffset + pageSize)response_jobs = deepcopy(result_jobs[itemOffset:nextItemOffset])# Remove all "attachments" properties from the response, they are not returned by deadline:SearchJobsfor job in response_jobs:if "attachments" in job:del job["attachments"]response = {"jobs": response_jobs,"totalResults": len(result_jobs),}if nextItemOffset < len(result_jobs):response["nextItemOffset"] = nextItemOffsetreturn responsereturn _fake_search_jobs
1
3
3
14
8
124
168
124
farmIdForJobs,queueIdForJobs,jobs
['filter', 'field_sort_name', 'nextItemOffset', 'filterExpressions', 'response_jobs', 'response', 'result_jobs', 'sortExpressions']
Returns
{"Assign": 10, "Expr": 1, "For": 1, "If": 2, "Return": 2}
13
45
13
["deepcopy", "deepcopy", "pop", "_build_filter_function_from_group", "sorted", "replace", "field_sort_name.lower", "filter", "min", "len", "deepcopy", "len", "len"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_edge_case_many_equal_timestamps", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp_partial_jobs_return", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"]
The function (mock_search_jobs_for_set) defined within the public class called public.The function start at line 124 and ends at 168. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [124.0], and this function return a value. It declares 13.0 functions, It has 13.0 functions called inside which are ["deepcopy", "deepcopy", "pop", "_build_filter_function_from_group", "sorted", "replace", "field_sort_name.lower", "filter", "min", "len", "deepcopy", "len", "len"], It has 12.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_edge_case_many_equal_timestamps", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp_partial_jobs_return", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"].
aws-deadline_deadline-cloud
public
public
0
0
mock_get_job_for_set._fake_get_job
def _fake_get_job(farmId, queueId, jobId):assert farmId == farmIdForJobsassert queueId == queueIdForJobsmatching_jobs = [job for job in jobs if job["jobId"] == jobId]if matching_jobs:return matching_jobs[0]else:error_class = botocore.exceptions.from_code(404)raise error_class(f"Resource of type job with id {jobId} does not exist.", "GetJob")
4
9
3
61
0
178
188
178
null
[]
None
null
0
0
0
null
0
null
The function (mock_get_job_for_set._fake_get_job) defined within the public class called public.The function start at line 178 and ends at 188. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [178.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
mock_get_job_for_set
def mock_get_job_for_set(farmIdForJobs, queueIdForJobs, jobs):"""Returns a fake "get_job" API that emulates a subset of Deadline Cloud'sGetJob on the provided set of jobs.See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_GetJob.html"""def _fake_get_job(farmId, queueId, jobId):assert farmId == farmIdForJobsassert queueId == queueIdForJobsmatching_jobs = [job for job in jobs if job["jobId"] == jobId]if matching_jobs:return matching_jobs[0]else:error_class = botocore.exceptions.from_code(404)raise error_class(f"Resource of type job with id {jobId} does not exist.", "GetJob")return _fake_get_job
1
3
3
14
2
171
190
171
farmIdForJobs,queueIdForJobs,jobs
['matching_jobs', 'error_class']
Returns
{"Assign": 2, "Expr": 1, "If": 1, "Return": 2}
2
20
2
["botocore.exceptions.from_code", "error_class"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"]
The function (mock_get_job_for_set) defined within the public class called public.The function start at line 171 and ends at 190. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [171.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called inside which are ["botocore.exceptions.from_code", "error_class"], It has 8.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"].
aws-deadline_deadline-cloud
public
public
0
0
create_fake_job_list
def create_fake_job_list(job_count: int,timestamp_min: Optional[datetime] = None,timestamp_max: Optional[datetime] = None,):"""See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_JobSearchSummary.htmlThe list_jobs_recently_updated function only uses jobId and timestamps, so we're only populatingthose values."""if timestamp_min is None:timestamp_min = datetime(2025, 1, 1, tzinfo=timezone.utc)if timestamp_max is None:timestamp_max = datetime(2025, 1, 1, 23, tzinfo=timezone.utc)jobs: list[dict[str, Any]] = [{"jobId": f"job-{str(uuid.uuid4()).replace('-', '')}"} for _ in range(job_count)]updated_at_micros_range = int((timestamp_max - timestamp_min).total_seconds() * 1000000)# Populate all the various timestamp fieldsfor timestamp_field_name in ["createdAt", "endedAt", "startedAt", "updatedAt"]:for job in jobs:random_micros = (randrange(0, updated_at_micros_range) if updated_at_micros_range > 0 else 0)job[timestamp_field_name] = timestamp_min + timedelta(microseconds=random_micros)if job_count >= 2:# Ensure two randomly-selected jobs have the min and max valuesjobs[randrange(0, job_count // 2)][timestamp_field_name] = timestamp_minjobs[randrange(job_count // 2, job_count)][timestamp_field_name] = timestamp_maxfor job in jobs:job["taskRunStatus"] = choice(TASK_RUN_STATUS_VALUES)return jobs
9
25
3
196
4
193
229
193
job_count,timestamp_min,timestamp_max
['timestamp_min', 'random_micros', 'updated_at_micros_range', 'timestamp_max']
Returns
{"AnnAssign": 1, "Assign": 8, "Expr": 1, "For": 3, "If": 3, "Return": 1}
13
37
13
["datetime", "datetime", "replace", "str", "uuid.uuid4", "range", "int", "total_seconds", "randrange", "timedelta", "randrange", "randrange", "choice"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_edge_case_many_equal_timestamps", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp_partial_jobs_return", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"]
The function (create_fake_job_list) defined within the public class called public.The function start at line 193 and ends at 229. It contains 25 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [193.0], and this function return a value. It declares 13.0 functions, It has 13.0 functions called inside which are ["datetime", "datetime", "replace", "str", "uuid.uuid4", "range", "int", "total_seconds", "randrange", "timedelta", "randrange", "randrange", "choice"], It has 12.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_edge_case_many_equal_timestamps", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_recent_jobs_timestamp_partial_jobs_return", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_bootstrap_retire_job_without_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_dry_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_canceled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_completed_then_requeued", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_job_unchanged", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_storage_profile_path_mapping"].
aws-deadline_deadline-cloud
public
public
0
0
_batfile_quote
def _batfile_quote(s: str) -> str:"""Quotes the string so it can be echoed in a batfile script."""for replacement in [("%", "%%"),('"', '""'),("^", "^^"),("&", "^&"),("<", "^<"),(">", "^>"),("|", "^|"),]:s = s.replace(*replacement)return f"{s}"
2
12
1
70
0
33
45
33
null
[]
None
null
0
0
0
null
0
null
The function (_batfile_quote) defined within the public class called public.The function start at line 33 and ends at 45. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_sleep
def _format_sleep(seconds: float) -> str:return f'powershell -nop -c "{{sleep {seconds}}}" > nul\n'
1
2
1
12
0
50
51
50
null
[]
None
null
0
0
0
null
0
null
The function (_format_sleep) defined within the public class called public.The function start at line 50 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_line
def _format_line(line: str) -> str:return f"echo.{line}\n"
1
2
1
12
0
53
54
53
null
[]
None
null
0
0
0
null
0
null
The function (_format_line) defined within the public class called public.The function start at line 53 and ends at 54. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_exit
def _format_exit(exit_code: int) -> str:return f"exit {exit_code}\n"
1
2
1
12
0
56
57
56
null
[]
None
null
0
0
0
null
0
null
The function (_format_exit) defined within the public class called public.The function start at line 56 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_args_check
def _format_args_check(args: Tuple[str], args_index: int) -> str:result = ["set MATCHED=YES\n"]for i, arg in enumerate(args, start=1):result.append(f'if not "%{i}" == "{_batfile_quote(arg)}" set MATCHED=NO\n')result.append(f'if not "%{len(args) + 1}" == "" set MATCHED=NO\n')result.append(f"if %MATCHED% == NO goto no_match_{args_index}\n")return "".join(result)
2
7
2
63
0
59
65
59
null
[]
None
null
0
0
0
null
0
null
The function (_format_args_check) defined within the public class called public.The function start at line 59 and ends at 65. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [59.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_end_args_check
def _format_end_args_check(args_index: int) -> str:return f":no_match_{args_index}\n"
1
2
1
12
0
67
68
67
null
[]
None
null
0
0
0
null
0
null
The function (_format_end_args_check) defined within the public class called public.The function start at line 67 and ends at 68. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_sleep
def _format_sleep(seconds: float) -> str:return f'powershell -nop -c "{{sleep {seconds}}}" > nul\n'
1
2
1
12
0
76
77
50
null
[]
None
null
0
0
0
null
0
null
The function (_format_sleep) defined within the public class called public.The function start at line 76 and ends at 77. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_line
def _format_line(line: str) -> str:return f"echo.{line}\n"
1
2
1
12
0
79
80
53
null
[]
None
null
0
0
0
null
0
null
The function (_format_line) defined within the public class called public.The function start at line 79 and ends at 80. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_exit
def _format_exit(exit_code: int) -> str:return f"exit {exit_code}\n"
1
2
1
12
0
82
83
56
null
[]
None
null
0
0
0
null
0
null
The function (_format_exit) defined within the public class called public.The function start at line 82 and ends at 83. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_args_check
def _format_args_check(args: Tuple[str], args_index: int) -> str:result = [f"if [ $# == {len(args)} ] "]for i, arg in enumerate(args, start=1):result.append(f'&& [ "${i}" == {shlex.quote(arg)} ] ')result.append("; then ")# lack of \n here puts the next commend with the `then`return "".join(result)
2
6
2
56
0
85
90
85
null
[]
None
null
0
0
0
null
0
null
The function (_format_args_check) defined within the public class called public.The function start at line 85 and ends at 90. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [85.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_format_end_args_check
def _format_end_args_check(args_index: int) -> str:return "fi\n"
1
2
1
11
0
92
93
92
null
[]
None
null
0
0
0
null
0
null
The function (_format_end_args_check) defined within the public class called public.The function start at line 92 and ends at 93. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
snake_to_camel
def snake_to_camel(value: str) -> str:"""Convertes snake_case_val to snakeCaseVal"""return re.sub(r"_\S", lambda s: s[0][1].upper(), value)
1
2
1
35
0
96
98
96
value
[]
str
{"Expr": 1, "Return": 1}
2
3
2
["re.sub", "upper"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556496_BerriAI_litellm.litellm.llms.vertex_ai.image_generation.image_generation_handler_py.VertexImageGeneration.transform_optional_params", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function"]
The function (snake_to_camel) defined within the public class called public.The function start at line 96 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["re.sub", "upper"], It has 2.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556496_BerriAI_litellm.litellm.llms.vertex_ai.image_generation.image_generation_handler_py.VertexImageGeneration.transform_optional_params", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function"].
aws-deadline_deadline-cloud
public
public
0
0
_format_output_and_exit
def _format_output_and_exit(program_output: str, exit_code: int) -> str:result = []for line in program_output.splitlines():result.append(_format_line(line))result.append(_format_exit(exit_code))return "".join(result)
2
6
2
51
1
101
106
101
program_output,exit_code
['result']
str
{"Assign": 1, "Expr": 2, "For": 1, "Return": 1}
6
6
6
["program_output.splitlines", "result.append", "_format_line", "result.append", "_format_exit", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.testing_utilities_py.program_that_prints_output"]
The function (_format_output_and_exit) defined within the public class called public.The function start at line 101 and ends at 106. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [101.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called inside which are ["program_output.splitlines", "result.append", "_format_line", "result.append", "_format_exit", "join"], It has 1.0 function calling this function which is ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.testing_utilities_py.program_that_prints_output"].
aws-deadline_deadline-cloud
public
public
0
0
program_that_prints_output
def program_that_prints_output(program_output: str,exit_code: int,*,sleep_seconds=0.1,conditional_outputs: Optional[Dict[Tuple[str], Tuple[str, int]]] = None,):"""This context manager creates a program that prints the specified output, then returnsthe specified exit code.By default, the program sleeps for 0.1 seconds, so tests that check for a thread or processimmediately after launching can do so.If conditional outputs are provided, they change the output and exit code for the specified args."""try:with tempfile.NamedTemporaryFile(mode="w+t", suffix=_file_extension, encoding="utf8", delete=False) as temp:temp.write(_header)if sleep_seconds > 0:temp.write(_format_sleep(sleep_seconds))# Handle each conditional outputif conditional_outputs:for args_index, (args,(conditional_program_output, conditional_exit_code),) in enumerate(conditional_outputs.items()):temp.write(_format_args_check(args, args_index))temp.write(_format_output_and_exit(conditional_program_output, conditional_exit_code))temp.write(_format_end_args_check(args_index))# Handle the default outputtemp.write(_format_output_and_exit(program_output, exit_code))temp.flush()if os.name != "nt":os.chmod(temp.name, 0o500)yield temp.namefinally:os.remove(temp.name)
6
31
5
193
0
110
152
110
program_output,exit_code,sleep_seconds,conditional_outputs
[]
None
{"Expr": 11, "For": 1, "If": 3, "Try": 1, "With": 1}
17
43
17
["tempfile.NamedTemporaryFile", "temp.write", "temp.write", "_format_sleep", "enumerate", "conditional_outputs.items", "temp.write", "_format_args_check", "temp.write", "_format_output_and_exit", "temp.write", "_format_end_args_check", "temp.write", "_format_output_and_exit", "temp.flush", "os.chmod", "os.remove"]
0
[]
The function (program_that_prints_output) defined within the public class called public.The function start at line 110 and ends at 152. It contains 31 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [110.0] and does not return any value. It declares 17.0 functions, and It has 17.0 functions called inside which are ["tempfile.NamedTemporaryFile", "temp.write", "temp.write", "_format_sleep", "enumerate", "conditional_outputs.items", "temp.write", "_format_args_check", "temp.write", "_format_output_and_exit", "temp.write", "_format_end_args_check", "temp.write", "_format_output_and_exit", "temp.flush", "os.chmod", "os.remove"].
aws-deadline_deadline-cloud
public
public
0
0
write_test_asset_files
def write_test_asset_files(assets_dir: str, asset_contents: Dict[str, str]):"""Write a set of asset contents files to the provided assets directory.Each key of asset_contents is a relative path from assets_dir, andeach value is what to write to the file."""for rel_path, contents in asset_contents.items():path = os.path.join(assets_dir, rel_path)if not os.path.isdir(os.path.dirname(path)):os.makedirs(os.path.dirname(path))if isinstance(contents, str):with open(path, "w", encoding="utf8") as f:f.write(contents)elif isinstance(contents, bytes):with open(path, "wb") as f:f.write(contents)else:raise ValueError("The contents provided in asset_contents must be either str or bytes.")
5
13
2
130
1
155
172
155
assets_dir,asset_contents
['path']
None
{"Assign": 1, "Expr": 4, "For": 1, "If": 3, "With": 2}
13
18
13
["asset_contents.items", "os.path.join", "os.path.isdir", "os.path.dirname", "os.makedirs", "os.path.dirname", "isinstance", "open", "f.write", "isinstance", "open", "f.write", "ValueError"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_asset_refs_py.test_create_job_from_job_bundle_with_all_asset_ref_variants", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_empty_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_single_asset_file"]
The function (write_test_asset_files) defined within the public class called public.The function start at line 155 and ends at 172. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [155.0] and does not return any value. It declares 13.0 functions, It has 13.0 functions called inside which are ["asset_contents.items", "os.path.join", "os.path.isdir", "os.path.dirname", "os.makedirs", "os.path.dirname", "isinstance", "open", "f.write", "isinstance", "open", "f.write", "ValueError"], It has 4.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_asset_refs_py.test_create_job_from_job_bundle_with_all_asset_ref_variants", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_empty_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_single_asset_file"].
aws-deadline_deadline-cloud
public
public
0
0
patch_calls_for_create_job_from_job_bundle
def patch_calls_for_create_job_from_job_bundle(*,create_job_return=MOCK_CREATE_JOB_RESPONSE,get_job_return=MOCK_GET_JOB_RESPONSE,get_queue_return={"displayName": "Test Queue","jobAttachmentSettings": {"s3BucketName": "mock", "rootPrefix": "root"},},queue_paramdefs=[],upload_assets_return=[SummaryStatistics(),Attachments([ManifestProperties(rootPath="/mnt/root/path1",rootPathFormat=PathFormat.POSIX,inputManifestPath="mock-manifest",inputManifestHash="mock-manifest-hash",outputRelativeDirectories=["."],),],),
1
22
5
80
0
176
197
176
create_job_return,get_job_return,get_queue_return,queue_paramdefs,upload_assets_return
[]
None
{"Assign": 15, "Expr": 2, "With": 1}
19
74
19
["SummaryStatistics", "Attachments", "ManifestProperties", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch", "patch.object", "patch.object", "patch.object", "Mock", "boto3_session_mock", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client"]
16
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_empty_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_duplicate_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_duplicate_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_missing_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_misconfigured_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_misconfigured_input_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_partially_empty_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_empty_asset_references", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_single_asset_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_target_task_run_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_without_target_task_run_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_known_paths_combine", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_storage_profile_known_paths", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_warning_suppression"]
The function (patch_calls_for_create_job_from_job_bundle) defined within the public class called public.The function start at line 176 and ends at 197. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [176.0] and does not return any value. It declares 19.0 functions, It has 19.0 functions called inside which are ["SummaryStatistics", "Attachments", "ManifestProperties", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch", "patch.object", "patch.object", "patch.object", "Mock", "boto3_session_mock", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client"], It has 16.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_empty_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_duplicate_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_duplicate_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_error_missing_template", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_job_attachments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_misconfigured_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_misconfigured_input_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_partially_empty_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_empty_asset_references", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_single_asset_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_with_target_task_run_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle_without_target_task_run_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_known_paths_combine", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_storage_profile_known_paths", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_bundle_submit_known_paths_py.test_cli_bundle_warning_suppression"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_farms_paginated
def test_list_farms_paginated(fresh_deadline_config):"""Confirm api.list_farms concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = [{"farms": FARMS_LIST[:2], "nextToken": "abc"},{"farms": FARMS_LIST[2:3], "nextToken": "def"},{"farms": FARMS_LIST[3:]},]# Call the APIfarms = api.list_farms()assert farms["farms"] == FARMS_LIST
1
9
1
88
1
42
54
42
fresh_deadline_config
['farms']
None
{"Assign": 2, "Expr": 1, "With": 1}
4
13
4
["patch.object", "client", "session_mock", "api.list_farms"]
0
[]
The function (test_list_farms_paginated) defined within the public class called public.The function start at line 42 and ends at 54. 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, and It has 4.0 functions called inside which are ["patch.object", "client", "session_mock", "api.list_farms"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_farms_principal_id
def test_list_farms_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_farms sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = [{"farms": FARMS_LIST},]session_mock()._session.get_scoped_config().get.return_value = "some-monitor-id"if user_identities:session_mock()._session.get_scoped_config.return_value = {"monitor_id": "some-monitor-id","user_id": "userid","identity_store_id": "idstoreid",}# Call the APIif pass_principal_id_filter:farms = api.list_farms(principalId="otheruserid")else:farms = api.list_farms()assert farms["farms"] == FARMS_LISTif pass_principal_id_filter:session_mock().client("deadline").list_farms.assert_called_once_with(principalId="otheruserid")elif user_identities:session_mock().client("deadline").list_farms.assert_called_once_with(principalId="userid")else:session_mock().client("deadline").list_farms.assert_called_once_with()
5
27
3
172
1
59
92
59
fresh_deadline_config,pass_principal_id_filter,user_identities
['farms']
None
{"Assign": 5, "Expr": 4, "If": 4, "With": 1}
19
34
19
["patch.object", "client", "session_mock", "_session.get_scoped_config", "session_mock", "session_mock", "api.list_farms", "api.list_farms", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_list_farms_principal_id) defined within the public class called public.The function start at line 59 and ends at 92. It contains 27 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 19.0 functions, and It has 19.0 functions called inside which are ["patch.object", "client", "session_mock", "_session.get_scoped_config", "session_mock", "session_mock", "api.list_farms", "api.list_farms", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_jobs_paginated
def test_list_jobs_paginated(fresh_deadline_config):"""Confirm api.list_jobs concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_jobs.side_effect = [{"jobs": JOBS_LIST[:2], "nextToken": "abc"},{"jobs": JOBS_LIST[2:3], "nextToken": "def"},{"jobs": JOBS_LIST[3:]},]# Call the APIjobs = api.list_jobs()assert jobs["jobs"] == JOBS_LIST
1
9
1
88
1
37
49
37
fresh_deadline_config
['jobs']
None
{"Assign": 2, "Expr": 1, "With": 1}
4
13
4
["patch.object", "client", "session_mock", "api.list_jobs"]
0
[]
The function (test_list_jobs_paginated) defined within the public class called public.The function start at line 37 and ends at 49. 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, and It has 4.0 functions called inside which are ["patch.object", "client", "session_mock", "api.list_jobs"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_jobs_principal_id
def test_list_jobs_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_jobs sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_jobs.side_effect = [{"jobs": JOBS_LIST},]if user_identities:session_mock()._session.get_scoped_config.return_value = {"monitor_id": "monitor-amonitorid","user_id": "userid","identity_store_id": "idstoreid",}# Call the APIif pass_principal_id_filter:jobs = api.list_jobs(principalId="otheruserid")else:jobs = api.list_jobs()assert jobs["jobs"] == JOBS_LISTif pass_principal_id_filter:session_mock().client("deadline").list_jobs.assert_called_once_with(principalId="otheruserid")elif user_identities:session_mock().client("deadline").list_jobs.assert_called_once_with(principalId="userid")else:session_mock().client("deadline").list_jobs.assert_called_once_with()
5
26
3
157
1
54
85
54
fresh_deadline_config,pass_principal_id_filter,user_identities
['jobs']
None
{"Assign": 4, "Expr": 4, "If": 4, "With": 1}
17
32
17
["patch.object", "client", "session_mock", "session_mock", "api.list_jobs", "api.list_jobs", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_list_jobs_principal_id) defined within the public class called public.The function start at line 54 and ends at 85. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [54.0] and does not return any value. It declares 17.0 functions, and It has 17.0 functions called inside which are ["patch.object", "client", "session_mock", "session_mock", "api.list_jobs", "api.list_jobs", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_queues_paginated
def test_list_queues_paginated(fresh_deadline_config):"""Confirm api.list_queues concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.side_effect = [{"queues": QUEUES_LIST[:2], "nextToken": "abc"},{"queues": QUEUES_LIST[2:3], "nextToken": "def"},{"queues": QUEUES_LIST[3:]},]# Call the APIqueues = api.list_queues()assert queues["queues"] == QUEUES_LIST
1
9
1
88
1
42
54
42
fresh_deadline_config
['queues']
None
{"Assign": 2, "Expr": 1, "With": 1}
4
13
4
["patch.object", "client", "session_mock", "api.list_queues"]
0
[]
The function (test_list_queues_paginated) defined within the public class called public.The function start at line 42 and ends at 54. 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, and It has 4.0 functions called inside which are ["patch.object", "client", "session_mock", "api.list_queues"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_queues_principal_id
def test_list_queues_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_queues sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.side_effect = [{"queues": QUEUES_LIST},]if user_identities:session_mock()._session.get_scoped_config.return_value = {"monitor_id": "monitorid","user_id": "userid","identity_store_id": "idstoreid",}# Call the APIif pass_principal_id_filter:queues = api.list_queues(principalId="otheruserid")else:queues = api.list_queues()assert queues["queues"] == QUEUES_LISTif pass_principal_id_filter:session_mock().client("deadline").list_queues.assert_called_once_with(principalId="otheruserid")elif user_identities:session_mock().client("deadline").list_queues.assert_called_once_with(principalId="userid")else:session_mock().client("deadline").list_queues.assert_called_once_with()
5
26
3
157
1
59
90
59
fresh_deadline_config,pass_principal_id_filter,user_identities
['queues']
None
{"Assign": 4, "Expr": 4, "If": 4, "With": 1}
17
32
17
["patch.object", "client", "session_mock", "session_mock", "api.list_queues", "api.list_queues", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_list_queues_principal_id) defined within the public class called public.The function start at line 59 and ends at 90. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 17.0 functions, and It has 17.0 functions called inside which are ["patch.object", "client", "session_mock", "session_mock", "api.list_queues", "api.list_queues", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mark.parametrize"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_boto3_session
def test_get_boto3_session(fresh_deadline_config):"""Confirm that api.get_boto3_session gets a session for the configured profile"""config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")mock_session = MagicMock()with patch.object(boto3, "Session", return_value=mock_session) as boto3_session:# Testing this functionresult = api.get_boto3_session()# Confirm it returned the mocked value, and was called with the correct argsassert result == mock_sessionboto3_session.assert_called_once_with(profile_name="SomeRandomProfileName")
1
7
1
54
2
15
26
15
fresh_deadline_config
['result', 'mock_session']
None
{"Assign": 2, "Expr": 3, "With": 1}
5
12
5
["config.set_setting", "MagicMock", "patch.object", "api.get_boto3_session", "boto3_session.assert_called_once_with"]
0
[]
The function (test_get_boto3_session) defined within the public class called public.The function start at line 15 and ends at 26. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["config.set_setting", "MagicMock", "patch.object", "api.get_boto3_session", "boto3_session.assert_called_once_with"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_boto3_session_caching_behavior.mock_create_session
def mock_create_session(profile_name: Optional[str]):session = MagicMock()session._profile_name = profile_namereturn session
1
4
1
22
0
36
39
36
null
[]
None
null
0
0
0
null
0
null
The function (test_get_boto3_session_caching_behavior.mock_create_session) defined within the public class called public.The function start at line 36 and ends at 39. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
test_get_boto3_session_caching_behavior
def test_get_boto3_session_caching_behavior(fresh_deadline_config):"""Confirm that api.get_boto3_session caches the session, and refreshes ifthe configured profile name changes"""# mock boto3.Session to return a fresh object based on the input profile namedef mock_create_session(profile_name: Optional[str]):session = MagicMock()session._profile_name = profile_namereturn sessionwith patch.object(boto3, "Session", side_effect=mock_create_session) as boto3_session:# This is a session with the default profile namesession0 = api.get_boto3_session()assert session0._profile_name is None# This should return the cached object, and not call boto3.Sessionsession1 = api.get_boto3_session()assert session1 is session0# Configuring a new session name should result in a new Session objectconfig.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")session2 = api.get_boto3_session()assert session2 is not session0assert session2._profile_name == "SomeRandomProfileName"# This should return the cached object, and not call boto3.Sessionsession3 = api.get_boto3_session()assert session3 is session2# boto3.Session should have been called exactly twice, once for each# value of AWS profile name that was configured.boto3_session.assert_has_calls([call(profile_name=None),call(profile_name="SomeRandomProfileName"),])
1
19
1
106
5
29
71
29
fresh_deadline_config
['session2', 'session3', 'session0', 'session1', 'session']
Returns
{"Assign": 6, "Expr": 3, "Return": 1, "With": 1}
10
43
10
["MagicMock", "patch.object", "api.get_boto3_session", "api.get_boto3_session", "config.set_setting", "api.get_boto3_session", "api.get_boto3_session", "boto3_session.assert_has_calls", "call", "call"]
0
[]
The function (test_get_boto3_session_caching_behavior) defined within the public class called public.The function start at line 29 and ends at 71. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["MagicMock", "patch.object", "api.get_boto3_session", "api.get_boto3_session", "config.set_setting", "api.get_boto3_session", "api.get_boto3_session", "boto3_session.assert_has_calls", "call", "call"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_check_authentication_status_authenticated
def test_get_check_authentication_status_authenticated(fresh_deadline_config):"""Confirm that check_authentication_status returns AUTHENTICATED"""with patch.object(api._session, "get_boto3_session") as session_mock, patch.object(api, "get_boto3_session", new=session_mock):config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")session_mock().client("sts").get_caller_identity.return_value = {}assert api.check_authentication_status() == api.AwsAuthenticationStatus.AUTHENTICATED
1
7
1
68
0
74
82
74
fresh_deadline_config
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
6
9
6
["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "api.check_authentication_status"]
0
[]
The function (test_get_check_authentication_status_authenticated) defined within the public class called public.The function start at line 74 and ends at 82. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "api.check_authentication_status"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_check_authentication_status_configuration_error
def test_get_check_authentication_status_configuration_error(fresh_deadline_config):"""Confirm that check_authentication_status returns CONFIGURATION_ERROR"""with patch.object(api._session, "get_boto3_session") as session_mock, patch.object(api, "get_boto3_session", new=session_mock):config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")session_mock().client("sts").get_caller_identity.side_effect = Exception("some uncaught exception")assert api.check_authentication_status() == api.AwsAuthenticationStatus.CONFIGURATION_ERROR
1
9
1
70
0
85
95
85
fresh_deadline_config
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
7
11
7
["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "Exception", "api.check_authentication_status"]
0
[]
The function (test_get_check_authentication_status_configuration_error) defined within the public class called public.The function start at line 85 and ends at 95. 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 7.0 functions, and It has 7.0 functions called inside which are ["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "Exception", "api.check_authentication_status"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_queue_user_boto3_session_no_profile
def test_get_queue_user_boto3_session_no_profile(fresh_deadline_config):"""Make sure that boto3.Session gets called with profile_name=None for the default profile."""session_mock = MagicMock()# The value returned when no profile was selected is "default"session_mock.profile_name = "default"session_mock.region_name = "us-west-2"deadline_mock = MagicMock()mock_botocore_session = MagicMock()mock_botocore_session.get_config_variable = lambda name: ("default" if name == "profile" else None)with patch.object(api._session, "get_boto3_session", return_value=session_mock), patch("botocore.session.Session", return_value=mock_botocore_session), patch("boto3.Session") as boto3_session_mock:api.get_queue_user_boto3_session(deadline_mock, farm_id="farm-1234", queue_id="queue-1234", queue_display_name="queue")boto3_session_mock.assert_called_once_with(botocore_session=ANY, profile_name=None, region_name="us-west-2")
2
18
1
113
3
98
118
98
fresh_deadline_config
['session_mock', 'mock_botocore_session', 'deadline_mock']
None
{"Assign": 6, "Expr": 3, "With": 1}
8
21
8
["MagicMock", "MagicMock", "MagicMock", "patch.object", "patch", "patch", "api.get_queue_user_boto3_session", "boto3_session_mock.assert_called_once_with"]
0
[]
The function (test_get_queue_user_boto3_session_no_profile) defined within the public class called public.The function start at line 98 and ends at 118. It contains 18 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 8.0 functions, and It has 8.0 functions called inside which are ["MagicMock", "MagicMock", "MagicMock", "patch.object", "patch", "patch", "api.get_queue_user_boto3_session", "boto3_session_mock.assert_called_once_with"].
aws-deadline_deadline-cloud
public
public
0
0
test_check_deadline_api_available
def test_check_deadline_api_available(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.return_value = {"farms": []}# Call the function under testresult = api.check_deadline_api_available()assert result is True# It should have called list_farms to check the APIsession_mock().client("deadline").list_farms.assert_called_once_with(maxResults=1)
1
6
1
66
1
121
130
121
fresh_deadline_config
['result']
None
{"Assign": 2, "Expr": 1, "With": 1}
7
10
7
["patch.object", "client", "session_mock", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"]
0
[]
The function (test_check_deadline_api_available) defined within the public class called public.The function start at line 121 and ends at 130. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside which are ["patch.object", "client", "session_mock", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"].
aws-deadline_deadline-cloud
public
public
0
0
test_check_deadline_api_available_fails
def test_check_deadline_api_available_fails(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = Exception()# Call the function under testresult = api.check_deadline_api_available()assert result is False# It should have called list_farms with to check the APIsession_mock().client("deadline").list_farms.assert_called_once_with(maxResults=1)
1
6
1
63
1
133
142
133
fresh_deadline_config
['result']
None
{"Assign": 2, "Expr": 1, "With": 1}
8
10
8
["patch.object", "client", "session_mock", "Exception", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"]
0
[]
The function (test_check_deadline_api_available_fails) defined within the public class called public.The function start at line 133 and ends at 142. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["patch.object", "client", "session_mock", "Exception", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_session_client_caching
def test_get_session_client_caching():"""Test that get_session_client properly caches clients."""# Create a real boto3 session for testing the cachesession = boto3.Session()# First call should create a new clientclient1 = get_session_client(session, "s3")# Second call with same session should return the same clientclient2 = get_session_client(session, "s3")# Verify they're the same objectassert client1 is client2# Different service should create a new clientclient3 = get_session_client(session, "sts")assert client1 is not client3# Create a new session with the same parameters# This should create a new client since it's a different objectnew_session = boto3.Session()client4 = get_session_client(new_session, "s3")assert client1 is not client4
1
10
0
65
6
145
167
145
['client2', 'client3', 'session', 'new_session', 'client4', 'client1']
None
{"Assign": 6, "Expr": 1}
6
23
6
["boto3.Session", "get_session_client", "get_session_client", "get_session_client", "boto3.Session", "get_session_client"]
0
[]
The function (test_get_session_client_caching) defined within the public class called public.The function start at line 145 and ends at 167. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["boto3.Session", "get_session_client", "get_session_client", "get_session_client", "boto3.Session", "get_session_client"].
aws-deadline_deadline-cloud
public
public
0
0
test_precache_clients
def test_precache_clients(mock_get_boto3_client, mock_get_queue_user_session, mock_get_s3_client):"""Test that precache_clients calls the right functions."""# Setup mocksmock_deadline_client = MagicMock()mock_deadline_client.get_queue.return_value = {"displayName": "test-queue"}mock_get_boto3_client.return_value = mock_deadline_clientmock_session = MagicMock()mock_get_queue_user_session.return_value = mock_session# Call the functionprecache_clients()# Verify the right calls were mademock_get_boto3_client.assert_called_once_with("deadline", config=None)mock_deadline_client.get_queue.assert_called_once()mock_get_queue_user_session.assert_called_once()mock_get_s3_client.assert_called_once_with(mock_session)
1
11
3
72
2
173
190
173
mock_get_boto3_client,mock_get_queue_user_session,mock_get_s3_client
['mock_deadline_client', 'mock_session']
None
{"Assign": 5, "Expr": 6}
10
18
10
["MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_called_once_with", "mock_deadline_client.get_queue.assert_called_once", "mock_get_queue_user_session.assert_called_once", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"]
0
[]
The function (test_precache_clients) defined within the public class called public.The function start at line 173 and ends at 190. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [173.0] and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_called_once_with", "mock_deadline_client.get_queue.assert_called_once", "mock_get_queue_user_session.assert_called_once", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"].
aws-deadline_deadline-cloud
public
public
0
0
test_precache_clients_with_params
def test_precache_clients_with_params(mock_get_boto3_client, mock_get_queue_user_session, mock_get_s3_client):"""Test that precache_clients uses provided parameters correctly."""# Setup mocksmock_deadline_client = MagicMock()mock_session = MagicMock()mock_config = MagicMock()mock_get_queue_user_session.return_value = mock_session# Call the function with all parameters specifiedprecache_clients(deadline=mock_deadline_client,config=mock_config,farm_id="test-farm",queue_id="test-queue",queue_display_name="Test Queue",)# Verify the right calls were mademock_get_boto3_client.assert_not_called()# Should not be called since we provided a clientmock_deadline_client.get_queue.assert_not_called()# Should not be called since we provided queue_display_name# Verify queue user session was created with correct parametersmock_get_queue_user_session.assert_called_once_with(deadline=mock_deadline_client,config=mock_config,farm_id="test-farm",queue_id="test-queue",queue_display_name="Test Queue",)# Verify S3 client was initialized with the sessionmock_get_s3_client.assert_called_once_with(mock_session)
1
24
3
96
3
196
229
196
mock_get_boto3_client,mock_get_queue_user_session,mock_get_s3_client
['mock_deadline_client', 'mock_config', 'mock_session']
None
{"Assign": 4, "Expr": 6}
11
34
11
["MagicMock", "MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_not_called", "mock_deadline_client.get_queue.assert_not_called", "mock_get_queue_user_session.assert_called_once_with", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"]
0
[]
The function (test_precache_clients_with_params) defined within the public class called public.The function start at line 196 and ends at 229. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [196.0] and does not return any value. It declares 11.0 functions, and It has 11.0 functions called inside which are ["MagicMock", "MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_not_called", "mock_deadline_client.get_queue.assert_not_called", "mock_get_queue_user_session.assert_called_once_with", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"].
aws-deadline_deadline-cloud
public
public
0
0
test_precache_clients_warms_asset_uploader_client
def test_precache_clients_warms_asset_uploader_client(fresh_deadline_config):"""Test that initializing the deadline and S3 client with precache_clientsproperly pre-warms the cache for subsequent job submissions."""# Setup mocksmock_deadline_client = MagicMock()mock_deadline_client.get_queue.return_value = {"displayName": "test-queue","jobAttachmentSettings": {"s3BucketName": "test-bucket", "rootPrefix": "test-prefix"},}# Use a real boto3 session for proper hashabilityreal_session = boto3.Session()# First, initialize the S3 clientwith patch("deadline.client.api._session.get_boto3_client", return_value=mock_deadline_client), patch("deadline.client.api._session.get_queue_user_boto3_session", return_value=real_session):# Get the client from initialization_, s3_client1 = precache_clients(farm_id="test-farm", queue_id="test-queue")# Now create an S3AssetUploader with the same sessionfrom deadline.job_attachments.upload import S3AssetUploader# Create the uploader with the same sessionuploader = S3AssetUploader(session=real_session)# Get the client from the uploaders3_client2 = uploader._s3# Verify that both clients are the same object (cached)assert s3_client1 is s3_client2
1
17
1
100
4
232
266
232
fresh_deadline_config
['uploader', 'real_session', 'mock_deadline_client', 's3_client2']
None
{"Assign": 6, "Expr": 1, "With": 1}
6
35
6
["MagicMock", "boto3.Session", "patch", "patch", "precache_clients", "S3AssetUploader"]
0
[]
The function (test_precache_clients_warms_asset_uploader_client) defined within the public class called public.The function start at line 232 and ends at 266. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["MagicMock", "boto3.Session", "patch", "patch", "precache_clients", "S3AssetUploader"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_storage_profiles_for_queue_paginated
def test_list_storage_profiles_for_queue_paginated(fresh_deadline_config):"""Confirm api.list_storage_profiles_for_queue concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_storage_profiles_for_queue.side_effect = [{"storageProfiles": STORAGE_PROFILES_LIST[:2], "nextToken": "abc"},{"storageProfiles": STORAGE_PROFILES_LIST[2:3], "nextToken": "def"},{"storageProfiles": STORAGE_PROFILES_LIST[3:]},]# Call the APIstorage_profiles = api.list_storage_profiles_for_queue()assert storage_profiles["storageProfiles"] == STORAGE_PROFILES_LIST
1
9
1
88
1
42
54
42
fresh_deadline_config
['storage_profiles']
None
{"Assign": 2, "Expr": 1, "With": 1}
4
13
4
["patch.object", "client", "session_mock", "api.list_storage_profiles_for_queue"]
0
[]
The function (test_list_storage_profiles_for_queue_paginated) defined within the public class called public.The function start at line 42 and ends at 54. 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, and It has 4.0 functions called inside which are ["patch.object", "client", "session_mock", "api.list_storage_profiles_for_queue"].
aws-deadline_deadline-cloud
public
public
0
0
test_list_storage_profiles_for_queue
def test_list_storage_profiles_for_queue(fresh_deadline_config, user_identities):"""Confirm api.list_storage_profiles_for_queue sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_storage_profiles_for_queue.side_effect = [{"storageProfiles": STORAGE_PROFILES_LIST},]if user_identities:session_mock()._session.get_scoped_config.return_value = {"monitor_id": "monitorid","user_id": "userid","identity_store_id": "idstoreid",}storage_profiles = api.list_storage_profiles_for_queue()assert storage_profiles["storageProfiles"] == STORAGE_PROFILES_LISTsession_mock().client("deadline").list_storage_profiles_for_queue.assert_called_once_with()
2
14
2
98
1
58
76
58
fresh_deadline_config,user_identities
['storage_profiles']
None
{"Assign": 3, "Expr": 2, "If": 1, "With": 1}
9
19
9
["patch.object", "client", "session_mock", "session_mock", "api.list_storage_profiles_for_queue", "list_storage_profiles_for_queue.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize"]
0
[]
The function (test_list_storage_profiles_for_queue) defined within the public class called public.The function start at line 58 and ends at 76. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["patch.object", "client", "session_mock", "session_mock", "api.list_storage_profiles_for_queue", "list_storage_profiles_for_queue.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize"].
aws-deadline_deadline-cloud
public
public
0
0
fixture_telemetry_client
def fixture_telemetry_client(fresh_deadline_config):config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")with patch.object(api.TelemetryClient, "_start_threads"), patch.object(api._telemetry, "get_monitor_id", side_effect=["monitor-id"]), patch.object(api._telemetry, "get_monitor_id", side_effect=[None]), patch.object(api._telemetry,"get_user_and_identity_store_id",side_effect=[("user-id", "identity-store-id")],), patch.object(api._telemetry, "get_deadline_endpoint_url", side_effect=["https://fake-endpoint-url"]):client = TelemetryClient(package_name="deadline-cloud-library",package_ver="0.1.2.1234",config=config.config_file.read_config(),)assert client.is_initializedreturn client
1
18
1
127
1
24
41
24
fresh_deadline_config
['client']
Returns
{"Assign": 1, "Expr": 1, "Return": 1, "With": 1}
9
18
9
["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "TelemetryClient", "config.config_file.read_config", "pytest.fixture"]
0
[]
The function (fixture_telemetry_client) defined within the public class called public.The function start at line 24 and ends at 41. It contains 18 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 9.0 functions, and It has 9.0 functions called inside which are ["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "TelemetryClient", "config.config_file.read_config", "pytest.fixture"].
aws-deadline_deadline-cloud
public
public
0
0
test_opt_out_config
def test_opt_out_config(fresh_deadline_config):"""Ensures the telemetry client doesn't fully initialize if the opt out config setting is set"""# GIVENconfig.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")config.set_setting("telemetry.opt_out", "true")# WHENclient = TelemetryClient("deadline-cloud-library", "test-version", config=config.config_file.read_config())# THENassert not client.is_initializedassert not hasattr(client, "endpoint")assert not hasattr(client, "event_queue")assert not hasattr(client, "processing_thread")# Ensure nothing blows up if we try recording telemetry after we've opted outclient.record_hashing_summary(SummaryStatistics(), from_gui=True)client.record_upload_summary(SummaryStatistics(), from_gui=False)client.record_error({}, str(type(Exception)))
1
13
1
108
1
44
61
44
fresh_deadline_config
['client']
None
{"Assign": 1, "Expr": 6}
14
18
14
["config.set_setting", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type"]
0
[]
The function (test_opt_out_config) defined within the public class called public.The function start at line 44 and ends at 61. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 14.0 functions, and It has 14.0 functions called inside which are ["config.set_setting", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type"].
aws-deadline_deadline-cloud
public
public
0
0
test_opt_out_env_var
def test_opt_out_env_var(fresh_deadline_config, monkeypatch, env_var_value):"""Ensures the telemetry client doesn't fully initialize if the opt out env var is set"""# GIVENconfig.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")monkeypatch.setenv("DEADLINE_CLOUD_TELEMETRY_OPT_OUT", env_var_value)config.set_setting("telemetry.opt_out", "false")# Ensure we ignore the config file if env var is set# WHENclient = TelemetryClient("deadline-cloud-library", "test-version", config=config.config_file.read_config())# THENassert not client.is_initializedassert not hasattr(client, "endpoint")assert not hasattr(client, "event_queue")assert not hasattr(client, "processing_thread")# Ensure nothing blows up if we try recording telemetry after we've opted outclient.record_hashing_summary(SummaryStatistics(), from_gui=True)client.record_upload_summary(SummaryStatistics(), from_gui=False)client.record_error({}, str(type(Exception)))
1
16
3
120
1
73
93
73
fresh_deadline_config,monkeypatch,env_var_value
['client']
None
{"Assign": 1, "Expr": 7}
20
21
20
["config.set_setting", "monkeypatch.setenv", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type", "pytest.mark.parametrize", "pytest.param", "pytest.param", "pytest.param", "pytest.param"]
0
[]
The function (test_opt_out_env_var) defined within the public class called public.The function start at line 73 and ends at 93. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [73.0] and does not return any value. It declares 20.0 functions, and It has 20.0 functions called inside which are ["config.set_setting", "monkeypatch.setenv", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type", "pytest.mark.parametrize", "pytest.param", "pytest.param", "pytest.param", "pytest.param"].
aws-deadline_deadline-cloud
public
public
0
0
test_initialize_failure_then_success
def test_initialize_failure_then_success(fresh_deadline_config):"""Tests that a failure in initializing set keeps the property as false, but trying againwithout an exception initializes everything successfully."""config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")with patch.object(api.TelemetryClient, "_start_threads"), patch.object(api._telemetry, "get_monitor_id", side_effect=["monitor-id"]), patch.object(api._telemetry,"get_user_and_identity_store_id",side_effect=[("user-id", "identity-store-id")],), patch.object(api._telemetry,"get_deadline_endpoint_url",side_effect=[Exception("Boto3 blew up!"), "https://fake-endpoint-url"],):client = TelemetryClient(package_name="deadline-cloud-library",package_ver="0.1.2.1234",config=config.config_file.read_config(),)assert not client.is_initializedassert not hasattr(client, "endpoint")assert not hasattr(client, "event_queue")assert not hasattr(client, "processing_thread")client.initialize(config=config.config_file.read_config())assert client.is_initializedassert client.endpoint == "https://management.fake-endpoint-url/2023-10-12/telemetry"assert client._system_metadata["user_id"] == "user-id"assert client._system_metadata["monitor_id"] == "monitor-id"
1
27
1
182
1
96
128
96
fresh_deadline_config
['client']
None
{"Assign": 1, "Expr": 3, "With": 1}
13
33
13
["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "Exception", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.initialize", "config.config_file.read_config"]
0
[]
The function (test_initialize_failure_then_success) defined within the public class called public.The function start at line 96 and ends at 128. It contains 27 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 13.0 functions, and It has 13.0 functions called inside which are ["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "Exception", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.initialize", "config.config_file.read_config"].
aws-deadline_deadline-cloud
public
public
0
0
test_get_telemetry_identifier
def test_get_telemetry_identifier(fresh_deadline_config, mock_telemetry_client):"""Ensures that getting the local-user-id handles empty/malformed strings"""# Confirm that we generate a new UUID if the setting doesn't exist, and write to configuuid.UUID(mock_telemetry_client.telemetry_id, version=4)# Should not raise ValueErrorassert config.get_setting("telemetry.identifier") == mock_telemetry_client.telemetry_id# Confirm we generate a new UUID if the local_user_id is not a valid UUIDconfig.set_setting("telemetry.identifier", "bad-id")telemetry_id = mock_telemetry_client._get_telemetry_identifier()assert telemetry_id != "bad-id"uuid.UUID(telemetry_id, version=4)# Should not raise ValueError# Confirm the new user id was saved and is retrieved properlyassert config.get_setting("telemetry.identifier") == telemetry_idassert mock_telemetry_client._get_telemetry_identifier() == telemetry_id
1
9
2
77
1
131
145
131
fresh_deadline_config,mock_telemetry_client
['telemetry_id']
None
{"Assign": 1, "Expr": 4}
7
15
7
["uuid.UUID", "config.get_setting", "config.set_setting", "mock_telemetry_client._get_telemetry_identifier", "uuid.UUID", "config.get_setting", "mock_telemetry_client._get_telemetry_identifier"]
0
[]
The function (test_get_telemetry_identifier) defined within the public class called public.The function start at line 131 and ends at 145. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside which are ["uuid.UUID", "config.get_setting", "config.set_setting", "mock_telemetry_client._get_telemetry_identifier", "uuid.UUID", "config.get_setting", "mock_telemetry_client._get_telemetry_identifier"].
aws-deadline_deadline-cloud
public
public
0
0
test_process_event_queue_thread
def test_process_event_queue_thread(fresh_deadline_config, mock_telemetry_client):"""Test that the queue processing thread function exits cleanly after getting None"""# GIVENqueue_mock = MagicMock()queue_mock.get.side_effect = [TelemetryEvent(), None]mock_telemetry_client.event_queue = queue_mock# WHENwith patch.object(request, "urlopen") as urlopen_mock:mock_telemetry_client._process_event_queue_thread()urlopen_mock.assert_called_once()# THENassert queue_mock.get.call_count == 2
1
8
2
61
1
149
160
149
fresh_deadline_config,mock_telemetry_client
['queue_mock']
None
{"Assign": 3, "Expr": 3, "With": 1}
6
12
6
["MagicMock", "TelemetryEvent", "patch.object", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"]
0
[]
The function (test_process_event_queue_thread) defined within the public class called public.The function start at line 149 and ends at 160. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [149.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["MagicMock", "TelemetryEvent", "patch.object", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"].
aws-deadline_deadline-cloud
public
public
0
0
test_process_event_queue_thread_retries_and_exits
def test_process_event_queue_thread_retries_and_exits(fresh_deadline_config, mock_telemetry_client, http_code, attempt_count):"""Test that the thread exits cleanly after getting an unexpected exception"""# GIVENhttp_error = request.HTTPError("http://test.com", http_code, "Http Error", {}, None)# type: ignorequeue_mock = MagicMock()queue_mock.get.side_effect = [TelemetryEvent(), None]mock_telemetry_client.event_queue = queue_mock# WHENwith patch.object(request, "urlopen", side_effect=http_error) as urlopen_mock, patch.object(time, "sleep") as sleep_mock:mock_telemetry_client._process_event_queue_thread()urlopen_mock.call_count = attempt_countsleep_mock.call_count = attempt_count# THENassert queue_mock.get.call_count == 1
1
14
4
102
2
172
189
172
fresh_deadline_config,mock_telemetry_client,http_code,attempt_count
['queue_mock', 'http_error']
None
{"Assign": 6, "Expr": 2, "With": 1}
8
18
8
["request.HTTPError", "MagicMock", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client._process_event_queue_thread", "pytest.mark.parametrize", "pytest.mark.timeout"]
0
[]
The function (test_process_event_queue_thread_retries_and_exits) defined within the public class called public.The function start at line 172 and ends at 189. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [172.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["request.HTTPError", "MagicMock", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client._process_event_queue_thread", "pytest.mark.parametrize", "pytest.mark.timeout"].
aws-deadline_deadline-cloud
public
public
0
0
test_process_event_queue_thread_handles_unexpected_error
def test_process_event_queue_thread_handles_unexpected_error(fresh_deadline_config, mock_telemetry_client):"""Test that the thread exits cleanly after getting an unexpected exception"""# GIVENqueue_mock = MagicMock()queue_mock.get.side_effect = [TelemetryEvent(), None]mock_telemetry_client.event_queue = queue_mock# WHENwith patch.object(request, "urlopen", side_effect=Exception("Some error")) as urlopen_mock:mock_telemetry_client._process_event_queue_thread()urlopen_mock.assert_called_once()# THENassert queue_mock.get.call_count == 1
1
10
2
68
1
193
206
193
fresh_deadline_config,mock_telemetry_client
['queue_mock']
None
{"Assign": 3, "Expr": 3, "With": 1}
7
14
7
["MagicMock", "TelemetryEvent", "patch.object", "Exception", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"]
0
[]
The function (test_process_event_queue_thread_handles_unexpected_error) defined within the public class called public.The function start at line 193 and ends at 206. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [193.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside which are ["MagicMock", "TelemetryEvent", "patch.object", "Exception", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"].
aws-deadline_deadline-cloud
public
public
0
0
test_record_hashing_summary
def test_record_hashing_summary(fresh_deadline_config, mock_telemetry_client):"""Tests that recording a hashing summary sends the expected TelemetryEvent to the thread queue"""# GIVENqueue_mock = MagicMock()test_summary = SummaryStatistics(total_bytes=123, total_files=12, total_time=12345)expected_summary = asdict(test_summary)expected_summary["usage_mode"] = "CLI"expected_summary["accountId"] = "111122223333"expected_event = TelemetryEvent(event_type="com.amazon.rum.deadline.job_attachments.hashing_summary",event_details=expected_summary,)mock_telemetry_client.event_queue = queue_mock# WHENwith patch.object(mock_telemetry_client, "get_account_id", return_value="111122223333"), patch.object(api._telemetry, "get_boto3_session"):mock_telemetry_client.record_hashing_summary(test_summary)# THENqueue_mock.put_nowait.assert_called_once_with(expected_event)
1
16
2
104
4
209
230
209
fresh_deadline_config,mock_telemetry_client
['expected_event', 'queue_mock', 'expected_summary', 'test_summary']
None
{"Assign": 7, "Expr": 3, "With": 1}
8
22
8
["MagicMock", "SummaryStatistics", "asdict", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client.record_hashing_summary", "queue_mock.put_nowait.assert_called_once_with"]
0
[]
The function (test_record_hashing_summary) defined within the public class called public.The function start at line 209 and ends at 230. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [209.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["MagicMock", "SummaryStatistics", "asdict", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client.record_hashing_summary", "queue_mock.put_nowait.assert_called_once_with"].