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
_save_debug_snapshot.sh_line
def sh_line(val: str = ""):sh_fh.write(val.encode("utf-8"))# type: ignoresh_fh.write(b"\n")# type: ignore
1
3
1
27
0
332
334
332
null
[]
None
null
0
0
0
null
0
null
The function (_save_debug_snapshot.sh_line) defined within the public class called public.The function start at line 332 and ends at 334. 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..
aws-deadline_deadline-cloud
public
public
0
0
_save_debug_snapshot.bat_line
def bat_line(val: str = ""):bat_fh.write(val.encode("utf-8"))# type: ignorebat_fh.write(b"\r\n")# type: ignore
1
3
1
27
0
346
348
346
null
[]
None
null
0
0
0
null
0
null
The function (_save_debug_snapshot.bat_line) defined within the public class called public.The function start at line 346 and ends at 348. 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..
aws-deadline_deadline-cloud
public
public
0
0
_save_debug_snapshot
def _save_debug_snapshot(debug_snapshot_dir: str,create_job_args: dict,asset_manager: S3AssetManager,queue: dict,storage_profile_id: str,storage_profile: Optional[StorageProfile],):# Save the full set of arguments for passing to the deadline.create_job APIwith open(os.path.join(debug_snapshot_dir, "create_job_args.json...
11
54
6
446
4
282
366
282
debug_snapshot_dir,create_job_args,asset_manager,queue,storage_profile_id,storage_profile
['queue_with_str', 'kebab_name', 'words', 'param_file']
Returns
{"AnnAssign": 1, "Assign": 5, "Expr": 30, "For": 3, "If": 4, "Return": 1, "With": 7}
59
85
59
["open", "os.path.join", "json.dump", "create_job_args.items", "re.findall", "join", "word.lower", "isinstance", "open", "os.path.join", "json.dump", "cli_args.append", "isinstance", "open", "os.path.join", "fh.write", "cli_args.append", "cli_args.append", "str", "write_line", "write_line", "write_line", "write_line", ...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._submit_job_bundle_py.create_job_from_job_bundle"]
The function (_save_debug_snapshot) defined within the public class called public.The function start at line 282 and ends at 366. It contains 54 lines of code and it has a cyclomatic complexity of 11. It takes 6 parameters, represented as [282.0], and this function return a value. It declares 59.0 functions, It has 59....
aws-deadline_deadline-cloud
public
public
0
0
create_job_from_job_bundle._default_create_job_result_callback
def _default_create_job_result_callback() -> bool:return True
1
2
0
8
0
808
809
808
null
[]
None
null
0
0
0
null
0
null
The function (create_job_from_job_bundle._default_create_job_result_callback) defined within the public class called public.The function start at line 808 and ends at 809. 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
create_job_from_job_bundle
def create_job_from_job_bundle(job_bundle_dir: str,job_parameters: list[dict[str, Any]] = [],*,name: Optional[str] = None,queue_parameter_definitions: Optional[list[JobParameter]] = None,job_attachments_file_system: Optional[str] = None,config: Optional[ConfigParser] = None,priority: Optional[int] = None,max_failed_tas...
53
305
26
1,525
30
370
837
370
job_bundle_dir,job_parameters,name,queue_parameter_definitions,job_attachments_file_system,config,priority,max_failed_tasks_count,max_retries_per_task,max_worker_count,target_task_run_status,require_paths_exist,submitter_name,known_asset_paths,debug_snapshot_dir,from_gui,print_function_callback,interactive_confirmation...
['attachment_settings', 'asset_references_obj', 'storage_profile', 'farm_id', 'job_attachments_file_system', 'storage_profile_id', 'upload_group', 'file_contents', 'is_dir_empty', 'asset_manager', 'queue', 'queue_parameter_definitions', 'known_asset_paths', 'parameters', 'job_param_value', 'deadline', 'configured_known...
Optional[str]
{"AnnAssign": 2, "Assign": 52, "Expr": 34, "For": 3, "If": 42, "Return": 3}
103
468
103
["validate_directory_symlink_containment", "read_yaml_or_json", "parse_yaml_or_json_content", "deadline_yaml_dump", "json.dumps", "api.get_boto3_client", "get_setting", "get_setting", "get_setting", "deadline.get_queue", "print_function_callback", "print_function_callback", "get_setting", "api.get_storage_profile_for_q...
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline._mcp.tools.job_py.submit_job", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.job_templates_py.submit_job_bundle"]
The function (create_job_from_job_bundle) defined within the public class called public.The function start at line 370 and ends at 837. It contains 305 lines of code and it has a cyclomatic complexity of 53. It takes 26 parameters, represented as [370.0] and does not return any value. It declares 103.0 functions, It ha...
aws-deadline_deadline-cloud
public
public
0
0
wait_for_create_job_to_complete
def wait_for_create_job_to_complete(farm_id: str,queue_id: str,job_id: str,deadline_client: BaseClient,continue_callback: Callable,) -> Tuple[bool, str]:"""Wait until a job exits the CREATE_IN_PROGRESS state."""initial_delay = 0.3max_delay = 5.0timeout_seconds = 300creating_statuses = {"CREATE_IN_PROGRESS",}failure_sta...
6
32
5
174
9
840
882
840
farm_id,queue_id,job_id,deadline_client,continue_callback
['creating_statuses', 'timeout_seconds', 'initial_delay', 'delay', 'start_time', 'failure_statuses', 'max_delay', 'job', 'current_status']
Tuple[bool, str]
{"Assign": 10, "Expr": 3, "If": 3, "Return": 2, "While": 1}
9
43
9
["time.time", "time.sleep", "time.time", "continue_callback", "CreateJobWaiterCanceled", "deadline_client.get_job", "time.sleep", "min", "TimeoutError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._submit_job_bundle_py.create_job_from_job_bundle"]
The function (wait_for_create_job_to_complete) defined within the public class called public.The function start at line 840 and ends at 882. It contains 32 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [840.0] and does not return any value. It declares 9.0 functions, It ha...
aws-deadline_deadline-cloud
public
public
0
0
get_deadline_endpoint_url
def get_deadline_endpoint_url(config: Optional[ConfigParser] = None,) -> str:# Use boto3's built-in logic to get the correct endpoint URLclient = get_boto3_client("deadline", config=config)return client.meta.endpoint_url
1
5
1
31
1
43
48
43
config
['client']
str
{"Assign": 1, "Return": 1}
1
6
1
["get_boto3_client"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._telemetry_py.TelemetryClient.initialize"]
The function (get_deadline_endpoint_url) defined within the public class called public.The function start at line 43 and ends at 48. 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 declare 1.0 function, It has 1.0 function ...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
__init__
def __init__(self,package_name: str,package_ver: str,config: Optional[ConfigParser] = None,):self._initialized: bool = Falseself.package_name = package_nameself.package_ver = ".".join(package_ver.split(".")[:3])# IDs for this sessionself.session_id: str = str(uuid.uuid4())self.telemetry_id: str = self._get_telemetry_id...
2
16
4
123
0
93
111
93
self,package_name,package_ver,config
[]
None
{"AnnAssign": 3, "Assign": 4, "Expr": 2, "If": 1}
8
19
8
["join", "package_ver.split", "str", "uuid.uuid4", "self._get_telemetry_identifier", "self._get_system_metadata", "self.set_opt_out", "self.initialize"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called TelemetryClient.The function start at line 93 and ends at 111. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [93.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
set_opt_out
def set_opt_out(self, config: Optional[ConfigParser] = None) -> None:"""Checks whether telemetry has been opted out by checking the DEADLINE_CLOUD_TELEMETRY_OPT_OUTenvironment variable and the 'telemetry.opt_out' config file setting.Note the environment variable supersedes the config file setting."""env_var_value = os....
3
12
2
76
0
113
129
113
self,config
[]
None
{"Assign": 3, "Expr": 2, "If": 1}
4
17
4
["os.environ.get", "config_file.str2bool", "config_file.get_setting", "logger.info"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.ui.dialogs.deadline_config_dialog_py.DeadlineWorkstationConfigWidget.apply"]
The function (set_opt_out) defined within the public class called TelemetryClient.The function start at line 113 and ends at 129. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [113.0] and does not return any value. It declares 4.0 functions, It has 4.0 funct...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
initialize
def initialize(self, config: Optional[ConfigParser] = None) -> None:"""Starts up the telemetry background thread after getting settings from the boto3 client.Note that if this is called before boto3 is successfully configured / initialized,an error can be raised. In that case we silently fail and don't mark the client ...
5
21
2
130
0
131
165
131
self,config
[]
None
{"AnnAssign": 2, "Assign": 5, "Expr": 3, "If": 3, "Return": 2, "Try": 1}
8
35
8
["self._get_prefixed_endpoint", "get_deadline_endpoint_url", "create_urllib3_context", "self._urllib3_context.load_verify_locations", "get_cert_path", "get_user_and_identity_store_id", "get_monitor_id", "self._start_threads"]
89
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.intratests.garbage_check.garbage_check_py.Base.initialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.intratests.garbage_check.garbage_check_py.g...
The function (initialize) defined within the public class called TelemetryClient.The function start at line 131 and ends at 165. It contains 21 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 8.0 functions, It has 8.0 functi...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
is_initialized
def is_initialized(self) -> bool:return self._initialized
1
2
1
11
0
168
169
168
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_initialized) defined within the public class called TelemetryClient.The function start at line 168 and ends at 169. 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
TelemetryClient
public
0
0
_get_prefixed_endpoint
def _get_prefixed_endpoint(self, endpoint: str, prefix: str) -> str:"""Insert the prefix right after 'https://'"""if endpoint.startswith("https://"):prefixed_endpoint = endpoint[:8] + prefix + endpoint[8:]return prefixed_endpointreturn endpoint
2
5
3
43
0
171
176
171
self,endpoint,prefix
[]
str
{"Assign": 1, "Expr": 1, "If": 1, "Return": 2}
1
6
1
["endpoint.startswith"]
0
[]
The function (_get_prefixed_endpoint) defined within the public class called TelemetryClient.The function start at line 171 and ends at 176. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [171.0] and does not return any value. It declare 1.0 function, and It ...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_get_telemetry_identifier
def _get_telemetry_identifier(self, config: Optional[ConfigParser] = None):identifier = config_file.get_setting("telemetry.identifier", config=config)try:uuid.UUID(identifier, version=4)except ValueError:# Thrown if the user_id isn't in UUID4 formatidentifier = str(uuid.uuid4())config_file.set_setting("telemetry.identi...
2
8
2
61
0
178
185
178
self,config
[]
Returns
{"Assign": 2, "Expr": 2, "Return": 1, "Try": 1}
5
8
5
["config_file.get_setting", "uuid.UUID", "str", "uuid.uuid4", "config_file.set_setting"]
0
[]
The function (_get_telemetry_identifier) defined within the public class called TelemetryClient.The function start at line 178 and ends at 185. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [178.0], and this function return a value. It declares 5.0 functions,...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_start_threads
def _start_threads(self) -> None:"""Set up background threads for shutdown checking and request sending"""self.event_queue: Queue[Optional[TelemetryEvent]] = Queue(maxsize=TelemetryClient.MAX_QUEUE_SIZE)atexit.register(self._exit_cleanly)self.processing_thread: Thread = Thread(target=self._process_event_queue_thread, d...
1
9
1
61
0
187
196
187
self
[]
None
{"AnnAssign": 2, "Expr": 3}
4
10
4
["Queue", "atexit.register", "Thread", "self.processing_thread.start"]
0
[]
The function (_start_threads) defined within the public class called TelemetryClient.The function start at line 187 and ends at 196. 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 fu...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_get_system_metadata
def _get_system_metadata(self, config: Optional[ConfigParser]) -> Dict[str, Any]:"""Builds up a dict of non-identifiable metadata about the system environment.This will be used in the Rum event metadata, which has a limit of 10 unique values."""platform_info = platform.uname()metadata: Dict[str, Any] = {"service": self...
2
10
2
80
0
198
213
198
self,config
[]
Dict[str, Any]
{"AnnAssign": 1, "Assign": 1, "Expr": 1, "Return": 1}
2
16
2
["platform.uname", "platform.python_version"]
0
[]
The function (_get_system_metadata) defined within the public class called TelemetryClient.The function start at line 198 and ends at 213. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [198.0] and does not return any value. It declares 2.0 functions, and It...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_exit_cleanly
def _exit_cleanly(self):self.event_queue.put(None)self.processing_thread.join()
1
3
1
20
0
215
217
215
self
[]
None
{"Expr": 2}
2
3
2
["self.event_queue.put", "self.processing_thread.join"]
0
[]
The function (_exit_cleanly) defined within the public class called TelemetryClient.The function start at line 215 and ends at 217. 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 fun...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_send_request
def _send_request(self, req: request.Request) -> None:attempts = 0success = Falsewhile not success:try:with request.urlopen(req, context=self._urllib3_context):logger.debug("Successfully sent telemetry.")success = Trueexcept error.HTTPError as httpe:if httpe.code == 429 or httpe.code == 500:logger.debug(f"Error receive...
6
24
2
124
0
219
244
219
self,req
[]
None
{"Assign": 4, "AugAssign": 1, "Expr": 3, "If": 2, "Try": 1, "While": 1, "With": 1}
8
26
8
["request.urlopen", "logger.debug", "logger.debug", "str", "Exception", "random.uniform", "min", "time.sleep"]
0
[]
The function (_send_request) defined within the public class called TelemetryClient.The function start at line 219 and ends at 244. It contains 24 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [219.0] and does not return any value. It declares 8.0 functions, and It has 8....
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_process_event_queue_thread
def _process_event_queue_thread(self):"""Background thread for processing the telemetry event data queue and sending telemetry requests."""while True:# Blocks until we get a new entry in the queueevent_data: Optional[TelemetryEvent] = self.event_queue.get()# We've received the shutdown signalif event_data is None:retur...
5
32
1
226
0
246
283
246
self
[]
None
{"AnnAssign": 1, "Assign": 4, "Expr": 6, "If": 1, "Return": 2, "Try": 2, "While": 1}
23
38
23
["self.event_queue.get", "str", "uuid.uuid4", "str", "json.dumps", "str", "uuid.uuid4", "str", "json.dumps", "int", "timestamp", "datetime.now", "encode", "str", "json.dumps", "logger.debug", "str", "request.Request", "logger.debug", "self._send_request", "logger.debug", "str", "self.event_queue.task_done"]
0
[]
The function (_process_event_queue_thread) defined within the public class called TelemetryClient.The function start at line 246 and ends at 283. It contains 32 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 23.0 functions, and...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_put_telemetry_record
def _put_telemetry_record(self, event: TelemetryEvent) -> None:if not self._initialized or self.telemetry_opted_out:returntry:self.event_queue.put_nowait(event)except Full:# Silently swallow the error if the event queue is full (due to throttling of the service)pass
4
7
2
36
0
285
292
285
self,event
[]
None
{"Expr": 1, "If": 1, "Return": 1, "Try": 1}
1
8
1
["self.event_queue.put_nowait"]
0
[]
The function (_put_telemetry_record) defined within the public class called TelemetryClient.The function start at line 285 and ends at 292. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [285.0] and does not return any value. It declare 1.0 function, and It h...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
_record_summary_statistics
def _record_summary_statistics(self, event_type: str, summary: SummaryStatistics, from_gui: bool):details: Dict[str, Any] = asdict(summary)self.record_event(event_type=event_type, event_details=details, from_gui=from_gui)
1
5
4
46
0
294
298
294
self,event_type,summary,from_gui
[]
None
{"AnnAssign": 1, "Expr": 1}
2
5
2
["asdict", "self.record_event"]
0
[]
The function (_record_summary_statistics) defined within the public class called TelemetryClient.The function start at line 294 and ends at 298. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [294.0] and does not return any value. It declares 2.0 functions, an...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
record_hashing_summary
def record_hashing_summary(self, summary: SummaryStatistics, *, from_gui: bool = False):self._record_summary_statistics("com.amazon.rum.deadline.job_attachments.hashing_summary", summary, from_gui)
1
4
3
27
0
300
303
300
self,summary,from_gui
[]
None
{"Expr": 1}
1
4
1
["self._record_summary_statistics"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._job_attachment_py._hash_attachments"]
The function (record_hashing_summary) defined within the public class called TelemetryClient.The function start at line 300 and ends at 303. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [300.0] and does not return any value. It declare 1.0 function, It has 1...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
record_upload_summary
def record_upload_summary(self, summary: SummaryStatistics, *, from_gui: bool = False):self._record_summary_statistics("com.amazon.rum.deadline.job_attachments.upload_summary", summary, from_gui)
1
4
3
27
0
305
308
305
self,summary,from_gui
[]
None
{"Expr": 1}
1
4
1
["self._record_summary_statistics"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._submit_job_bundle_py._upload_attachments"]
The function (record_upload_summary) defined within the public class called TelemetryClient.The function start at line 305 and ends at 308. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [305.0] and does not return any value. It declare 1.0 function, It has 1....
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
record_error
def record_error(self, event_details: Dict[str, Any], exception_type: str, from_gui: bool = False):event_details["exception_type"] = exception_type# Possibility to add stack trace hereself.record_event("com.amazon.rum.deadline.error", event_details, from_gui=from_gui)
1
5
4
42
0
310
315
310
self,event_details,exception_type,from_gui
[]
None
{"Assign": 1, "Expr": 1}
1
6
1
["self.record_event"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.bundle_group_py.bundle_submit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.ui.dialogs....
The function (record_error) defined within the public class called TelemetryClient.The function start at line 310 and ends at 315. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [310.0] and does not return any value. It declare 1.0 function, It has 1.0 functio...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
record_event
def record_event(self, event_type: str, event_details: Dict[str, Any], *, from_gui: bool = False):try:self.update_common_details({"accountId": self.get_account_id(get_boto3_session())})except Exception as e:# Print any errors when getting the boto3 session, then proceedlogger.debug(f"Could not add account ID to telemet...
3
15
4
91
0
317
333
317
self,event_type,event_details,from_gui
[]
None
{"Assign": 1, "Expr": 4, "Try": 1}
8
17
8
["self.update_common_details", "self.get_account_id", "get_boto3_session", "logger.debug", "str", "event_details.update", "self._put_telemetry_record", "TelemetryEvent"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._submit_job_bundle_py.create_job_from_job_bundle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client....
The function (record_event) defined within the public class called TelemetryClient.The function start at line 317 and ends at 333. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [317.0] and does not return any value. It declares 8.0 functions, It has 8.0 func...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
get_account_id
def get_account_id(self, boto3_session) -> Optional[str]:"""Retrieves the AWS account ID for the current user.If the user is not authenticated, print an error message"""try:return boto3_session.client("sts").get_caller_identity()["Account"]except (ClientError, NoCredentialsError) as e:print(f"Could not add account ID t...
2
6
2
45
0
336
346
336
self,boto3_session
[]
Optional[str]
{"Expr": 2, "Return": 2, "Try": 1}
4
11
4
["get_caller_identity", "boto3_session.client", "print", "str"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments._aws.aws_clients_py.get_s3_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments._...
The function (get_account_id) defined within the public class called TelemetryClient.The function start at line 336 and ends at 346. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [336.0] and does not return any value. It declares 4.0 functions, It has 4.0 fun...
aws-deadline_deadline-cloud
TelemetryClient
public
0
0
update_common_details
def update_common_details(self, details: Dict[str, Any]):"""Updates the dict of common data that is included in every telemetry request."""self._common_details.update(details)
1
2
2
23
0
348
350
348
self,details
[]
None
{"Expr": 2}
1
3
1
["self._common_details.update"]
0
[]
The function (update_common_details) defined within the public class called TelemetryClient.The function start at line 348 and ends at 350. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [348.0] and does not return any value. It declare 1.0 function, and It h...
aws-deadline_deadline-cloud
public
public
0
0
get_telemetry_client
def get_telemetry_client(package_name: str, package_ver: str, config: Optional[ConfigParser] = None) -> TelemetryClient:"""Retrieves the cached telemetry client, lazy-loading the first time this is called.:param package_name: Base package name to associate data by.:param package_ver: Base package version to associate d...
3
13
3
62
1
353
373
353
package_name,package_ver,config
['__cached_telemetry_client']
TelemetryClient
{"Assign": 1, "Expr": 2, "If": 2, "Return": 1}
2
21
2
["TelemetryClient", "__cached_telemetry_client.initialize"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._telemetry_py.get_deadline_cloud_library_telemetry_client"]
The function (get_telemetry_client) defined within the public class called public.The function start at line 353 and ends at 373. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [353.0] and does not return any value. It declares 2.0 functions, It has 2.0 funct...
aws-deadline_deadline-cloud
public
public
0
0
get_deadline_cloud_library_telemetry_client
def get_deadline_cloud_library_telemetry_client(config: Optional[ConfigParser] = None,) -> TelemetryClient:"""Retrieves the cached telemetry client, specifying the Deadline Cloud Client Library's package information.:param config: Optional configuration to use for the client. Loads defaults if not given.:return: Teleme...
1
4
1
27
0
376
384
376
config
[]
TelemetryClient
{"Expr": 1, "Return": 1}
1
9
1
["get_telemetry_client"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline._mcp.utils_py._create_wrapper", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._telemetry_py.record_funct...
The function (get_deadline_cloud_library_telemetry_client) defined within the public class called public.The function start at line 376 and ends at 384. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, ...
aws-deadline_deadline-cloud
public
public
0
0
record_success_fail_telemetry_event.record_success_fail_telemetry_event.inner.wrapper
def wrapper(*args: Any, **kwargs: Any) -> Any:"""Wrapper to try-catch a function for telemetry:param * Python variable argument. See https://docs.python.org/3/glossary.html#term-parameter:param ** Python variable argument. See https://docs.python.org/3/glossary.html#term-parameter"""success: bool = Falsetry:result = fu...
3
17
2
114
0
394
417
394
null
[]
None
null
0
0
0
null
0
null
The function (record_success_fail_telemetry_event.record_success_fail_telemetry_event.inner.wrapper) defined within the public class called public.The function start at line 394 and ends at 417. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [394.0] and does ...
aws-deadline_deadline-cloud
public
public
0
0
record_success_fail_telemetry_event.inner
def inner(function: F) -> F:def wrapper(*args: Any, **kwargs: Any) -> Any:"""Wrapper to try-catch a function for telemetry:param * Python variable argument. See https://docs.python.org/3/glossary.html#term-parameter:param ** Python variable argument. See https://docs.python.org/3/glossary.html#term-parameter"""success:...
1
4
1
25
0
393
420
393
null
[]
None
null
0
0
0
null
0
null
The function (record_success_fail_telemetry_event.inner) defined within the public class called public.The function start at line 393 and ends at 420. 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
record_success_fail_telemetry_event
def record_success_fail_telemetry_event(**decorator_kwargs: Any) -> Callable[[F], F]:"""Decorator to try catch a function. Sends a success / fail telemetry event.:param ** Python variable arguments. See https://docs.python.org/3/glossary.html#term-parameter."""def inner(function: F) -> F:def wrapper(*args: Any, **kwarg...
1
3
1
22
4
387
422
387
**decorator_kwargs
['success', 'result', 'event_name', 'raised_exception']
Callable[[F], F]
{"AnnAssign": 2, "Assign": 7, "Expr": 3, "If": 1, "Return": 3, "Try": 1}
8
36
8
["function", "decorator_kwargs.get", "decorator_kwargs.get", "sys.exc_info", "type", "record_event", "get_deadline_cloud_library_telemetry_client", "cast"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_api_telemetry_py.test_record_decorator_fails", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.dea...
The function (record_success_fail_telemetry_event) defined within the public class called public.The function start at line 387 and ends at 422. 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 8.0 functions, It has...
aws-deadline_deadline-cloud
public
public
0
0
record_function_latency_telemetry_event.record_function_latency_telemetry_event.inner.wrapper
def wrapper(*args: Any, **kwargs: Any) -> Any:start_t = time.perf_counter_ns()ret_val = function(*args, **kwargs)end_t = time.perf_counter_ns()latency = end_t - start_tevent_name = decorator_kwargs.get("metric_name", function.__name__)get_deadline_cloud_library_telemetry_client().record_event(event_type="com.amazon.rum...
1
11
2
81
0
433
446
433
null
[]
None
null
0
0
0
null
0
null
The function (record_function_latency_telemetry_event.record_function_latency_telemetry_event.inner.wrapper) defined within the public class called public.The function start at line 433 and ends at 446. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [433.0] a...
aws-deadline_deadline-cloud
public
public
0
0
record_function_latency_telemetry_event.inner
def inner(function: F) -> F:@wraps(function)def wrapper(*args: Any, **kwargs: Any) -> Any:start_t = time.perf_counter_ns()ret_val = function(*args, **kwargs)end_t = time.perf_counter_ns()latency = end_t - start_tevent_name = decorator_kwargs.get("metric_name", function.__name__)get_deadline_cloud_library_telemetry_clie...
1
4
1
23
0
431
448
431
null
[]
None
null
0
0
0
null
0
null
The function (record_function_latency_telemetry_event.inner) defined within the public class called public.The function start at line 431 and ends at 448. 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
record_function_latency_telemetry_event
def record_function_latency_telemetry_event(**decorator_kwargs: Any) -> Callable[[F], F]:"""Decorator to time a function. Sends a latency telemetry event.:param ** Python variable arguments. See https://docs.python.org/3/glossary.html#term-parameter."""def inner(function: F) -> F:@wraps(function)def wrapper(*args: Any,...
1
3
1
22
5
425
450
425
**decorator_kwargs
['end_t', 'event_name', 'ret_val', 'latency', 'start_t']
Callable[[F], F]
{"Assign": 5, "Expr": 2, "Return": 3}
8
26
8
["time.perf_counter_ns", "function", "time.perf_counter_ns", "decorator_kwargs.get", "record_event", "get_deadline_cloud_library_telemetry_client", "wraps", "cast"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_api_telemetry_py.test_latency_decorator"]
The function (record_function_latency_telemetry_event) defined within the public class called public.The function start at line 425 and ends at 450. 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 8.0 functions, It...
aws-deadline_deadline-cloud
public
public
0
0
_prompt_at_completion
def _prompt_at_completion(ctx: click.Context):"""If the click context has PROMPT_WHEN_COMPLETE set to True,prints out a prompt and waits for keyboard input."""if ctx.obj[_PROMPT_WHEN_COMPLETE]:click.prompt("Press Enter To Exit", prompt_suffix="", show_default=False, hide_input=True, default="")
2
5
1
40
0
39
47
39
ctx
[]
None
{"Expr": 2, "If": 1}
1
9
1
["click.prompt"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._common_py._handle_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.handle_web_u...
The function (_prompt_at_completion) defined within the public class called public.The function start at line 39 and ends at 47. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function call...
aws-deadline_deadline-cloud
public
public
0
0
_handle_error.wraps
def wraps(ctx: click.Context, *args, **kwargs):try:func(*args, **kwargs)except DeadlineOperationError as e:# The message from DeadlineOperationError is printed# out verbatim.click.echo(str(e))_prompt_at_completion(ctx)sys.exit(1)except click.ClickException:# Let click exceptions fall throughraiseexcept Exception:# Log ...
4
14
3
84
0
57
75
57
null
[]
None
null
0
0
0
null
0
null
The function (_handle_error.wraps) defined within the public class called public.The function start at line 57 and ends at 75. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [57.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_handle_error
def _handle_error(func: Callable) -> Callable:"""Decorator that catches any exceptions raised in the passed in function,and handles their default printout."""@click.pass_contextdef wraps(ctx: click.Context, *args, **kwargs):try:func(*args, **kwargs)except DeadlineOperationError as e:# The message from DeadlineOperation...
1
5
1
25
0
50
78
50
func
[]
Callable
{"Assign": 1, "Expr": 9, "Return": 1, "Try": 1}
10
29
10
["func", "click.echo", "str", "_prompt_at_completion", "sys.exit", "click.echo", "click.echo", "traceback.format_exc", "_prompt_at_completion", "sys.exit"]
0
[]
The function (_handle_error) defined within the public class called public.The function start at line 50 and ends at 78. 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 10.0 functions, and It has 10.0 functions ca...
aws-deadline_deadline-cloud
public
public
0
0
_apply_cli_options_to_config
def _apply_cli_options_to_config(*, config: Optional[ConfigParser] = None, required_options: Set[str] = set(), **args) -> Optional[ConfigParser]:"""Modifies an AWS Deadline Cloud config object to apply standard option names to it, such asthe AWS profile, AWS Deadline Cloud Farm, or AWS Deadline Cloud Queue to use.Args:...
20
55
2
376
8
81
159
81
config,required_options,**args
['config', 'farm_id', 'auto_accept', 'storage_profile_id', 'conflict_resolution', 'job_id', 'aws_profile_name', 'queue_id']
Optional[ConfigParser]
{"Assign": 8, "Expr": 12, "For": 1, "If": 17, "Return": 1}
32
79
32
["set", "any", "args.values", "config_file.read_config", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_setting", "args.pop", "config_file.set_...
25
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.attachment_group_py.attachment_download", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.c...
The function (_apply_cli_options_to_config) defined within the public class called public.The function start at line 81 and ends at 159. It contains 55 lines of code and it has a cyclomatic complexity of 20. It takes 2 parameters, represented as [81.0] and does not return any value. It declares 32.0 functions, It has 3...
aws-deadline_deadline-cloud
public
public
0
0
_fix_multiline_strings
def _fix_multiline_strings(obj: Any) -> Any:"""Fixes the multi-line strings in `obj` to end with "\n".Returns a new object that has been modified."""if isinstance(obj, str):if "\n" in obj and not obj.endswith("\n"):return obj + "\n"else:return objelif isinstance(obj, list):return [_fix_multiline_strings(item) for item ...
12
16
1
128
0
162
181
162
obj
[]
Any
{"Expr": 1, "If": 6, "Return": 7}
12
20
12
["isinstance", "obj.endswith", "isinstance", "_fix_multiline_strings", "isinstance", "tuple", "_fix_multiline_strings", "isinstance", "_fix_multiline_strings", "obj.items", "isinstance", "_fix_multiline_strings"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._common_py._cli_object_repr", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._common_py._fix_m...
The function (_fix_multiline_strings) defined within the public class called public.The function start at line 162 and ends at 181. It contains 16 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters and does not return any value. It declares 12.0 functions, It has 12.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_cli_object_repr
def _cli_object_repr(obj: Any) -> str:"""Transforms an API response object into a string, for printing asCLI output. This formats the output as YAML, using the "|"-stylefor multi-line strings."""# If a multi-line string does not end with an "\n", the formatting# will not use the "|"-style yaml. We fix that up be modify...
1
3
1
21
1
184
194
184
obj
['obj']
str
{"Assign": 1, "Expr": 1, "Return": 1}
2
11
2
["_fix_multiline_strings", "deadline_yaml_dump"]
17
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.farm_group_py.farm_get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.farm_g...
The function (_cli_object_repr) defined within the public class called public.The function start at line 184 and ends at 194. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions call...
aws-deadline_deadline-cloud
_ProgressBarCallbackManager
protected
0
0
__init__
def __init__(self, length: int, label: str):self._length = lengthself._label = labelself._bar_status = self.BAR_NOT_CREATEDself._exit_stack = ExitStack()
1
5
3
37
0
207
211
207
self,length,label
[]
None
{"Assign": 4}
1
5
1
["ExitStack"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the protected class called _ProgressBarCallbackManager.The function start at line 207 and ends at 211. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [207.0] and does not return any value. It declare 1.0 function, It has ...
aws-deadline_deadline-cloud
_ProgressBarCallbackManager
protected
0
0
callback
def callback(self, upload_metadata: ProgressReportMetadata) -> bool:if self._bar_status == self.BAR_CLOSED:# from multithreaded execution this can be called after completion somtimes.return sigint_handler.continue_operationelif self._bar_status == self.BAR_NOT_CREATED:# Note: click doesn't export the return type of pro...
6
15
2
130
0
213
233
213
self,upload_metadata
[]
bool
{"Assign": 5, "Expr": 3, "If": 4, "Return": 2}
5
21
5
["click.progressbar", "self._exit_stack.enter_context", "int", "self._upload_progress.update", "self._exit_stack.close"]
42
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3596930_mengskysama_shadowsocks_rm.shadowsocks.asyncdns_py.DNSResolver._call_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3596930_mengskysama_shadowsocks_rm.shadowsocks.asyncdns_py.DNSResolver.resolve", ...
The function (callback) defined within the protected class called _ProgressBarCallbackManager.The function start at line 213 and ends at 233. It contains 15 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [213.0] and does not return any value. It declares 5.0 functions, It h...
aws-deadline_deadline-cloud
public
public
0
0
parse_query_string
def parse_query_string(query_string: str, parameter_names: List[str], required_parameter_names: List[str]) -> Dict[str, str]:"""Parses the URL query string into {"parameter": "value"} form.Any "-" in the parameter names are switched to "_" in the result.Args:query_string (str): The query string from a parsed web URL.""...
7
26
3
141
3
29
70
29
query_string,parameter_names,required_parameter_names
['parsed_qs', 'missing_required_parameters', 'values']
Dict[str, str]
{"AnnAssign": 1, "Assign": 5, "Expr": 1, "For": 1, "If": 5, "Return": 1}
12
42
12
["urllib.parse.parse_qs", "set", "set", "parsed_qs.keys", "DeadlineOperationError", "list", "parsed_qs.pop", "len", "DeadlineOperationError", "name.replace", "DeadlineOperationError", "parsed_qs.keys"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.handle_web_url_command_py.cli_handle_web_url", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadli...
The function (parse_query_string) defined within the public class called public.The function start at line 29 and ends at 70. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [29.0] and does not return any value. It declares 12.0 functions, It has 12.0 function...
aws-deadline_deadline-cloud
public
public
0
0
validate_resource_ids
def validate_resource_ids(ids: Dict[str, str]) -> None:"""Validates that the resource IDs are all valid.i.e. "<name of resource>-<a hexadecimal string of length 32>"for Task ID: "task-<a hexadecimal string of length 32>-<0 or a number up to 10 digits long>"Args:ids (Dict[str, str]): The resource IDs to validate.Expecte...
4
7
1
60
1
73
88
73
ids
['resource_type']
None
{"Assign": 1, "Expr": 1, "For": 1, "If": 1}
5
16
5
["ids.items", "id_str.split", "id_name.startswith", "validate_id_format", "DeadlineOperationError"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.handle_web_url_command_py.cli_handle_web_url", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadli...
The function (validate_resource_ids) defined within the public class called public.The function start at line 73 and ends at 88. It contains 7 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 5.0 functions, It has 5.0 functions c...
aws-deadline_deadline-cloud
public
public
0
0
validate_id_format
def validate_id_format(resource_type: str, full_id_str: str) -> bool:"""Validates if the ID is in correct format. The ID must- start with one of the resource names, and followed by a hyphen ("-"), and- the string that follows must be a hexadecimal string of length 32.- Additional for "task": followed by another hyphen ...
5
13
2
84
2
91
117
91
resource_type,full_id_str
['id_str', 'prefix']
bool
{"Assign": 2, "Expr": 1, "If": 4, "Return": 5}
7
27
7
["full_id_str.startswith", "len", "bool", "DEADLINE_TASK_ID_PATTERN.fullmatch", "len", "bool", "DEADLINE_ID_PATTERN.fullmatch"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._deadline_web_url_py.validate_resource_ids", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client....
The function (validate_id_format) defined within the public class called public.The function start at line 91 and ends at 117. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [91.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
install_deadline_web_url_handler
def install_deadline_web_url_handler(all_users: bool) -> None:"""Installs the called AWS Deadline Cloud CLI command as the deadline:// web URL handler."""if sys.platform == "win32":import winreg# Get the CLI program path, either an .exe or a .py with the Python interpreterdeadline_cli_program = os.path.abspath(sys.argv...
16
82
1
418
9
120
230
120
all_users
['deadline_cli_prefix', 'mimeapps_file_content', 'hkey_command', 'entry_dir', 'desktop_file_path', 'desktop_file_content', 'deadline_cli_program', 'mimeapps_list_file_path', 'hkey']
None
{"AnnAssign": 2, "Assign": 15, "Expr": 11, "If": 10, "Try": 3, "With": 2}
30
111
30
["os.path.abspath", "deadline_cli_program.endswith", "os.path.isfile", "DeadlineOperationError", "logger.info", "winreg.CreateKeyEx", "winreg.CreateKeyEx", "winreg.SetValueEx", "winreg.SetValueEx", "winreg.CreateKeyEx", "winreg.SetValueEx", "DeadlineOperationError", "DeadlineOperationError", "winreg.CloseKey", "winreg....
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.handle_web_url_command_py.cli_handle_web_url"]
The function (install_deadline_web_url_handler) defined within the public class called public.The function start at line 120 and ends at 230. It contains 82 lines of code and it has a cyclomatic complexity of 16. The function does not take any parameters and does not return any value. It declares 30.0 functions, It has...
aws-deadline_deadline-cloud
public
public
0
0
uninstall_deadline_web_url_handler
def uninstall_deadline_web_url_handler(all_users: bool) -> None:"""Uninstalls the called AWS Deadline Cloud CLI command as the deadline:// web URL handler."""if sys.platform == "win32":import winreglogger.info(f"Unstalling the handler for {DEADLINE_URL_SCHEME_NAME} URLs")try:hkey: Any = Noneif all_users:hkey = winreg.H...
13
54
1
250
3
233
298
233
all_users
['entry_dir', 'desktop_file_path', 'hkey']
None
{"AnnAssign": 1, "Assign": 5, "Expr": 13, "If": 7, "Try": 3}
19
66
19
["logger.info", "winreg.OpenKeyEx", "winreg.DeleteKeyEx", "winreg.DeleteKeyEx", "winreg.DeleteKeyEx", "winreg.DeleteKeyEx", "click.echo", "DeadlineOperationError", "winreg.CloseKey", "shutil.which", "DeadlineOperationError", "logger.info", "os.path.expanduser", "os.remove", "print", "print", "subprocess.run", "Deadline...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.handle_web_url_command_py.cli_handle_web_url"]
The function (uninstall_deadline_web_url_handler) defined within the public class called public.The function start at line 233 and ends at 298. It contains 54 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value. It declares 19.0 functions, It h...
aws-deadline_deadline-cloud
public
public
0
0
_get_download_candidate_jobs
def _get_download_candidate_jobs(boto3_session: boto3.Session,farm_id: str,queue_id: str,starting_timestamp: datetime,print_function_callback: Callable[[str], None] = lambda msg: None,) -> dict[str, dict[str, Any]]:"""Uses deadline:SearchJobs queries to get a dict {job_id: job} of download candidates for the queue.This...
10
92
6
351
4
70
188
70
boto3_session,farm_id,queue_id,starting_timestamp,print_function_callback
['start_time', 'duration', 'download_candidate_jobs', 'recently_ended_jobs']
dict[str, dict[str, Any]]
{"Assign": 6, "Expr": 9, "Return": 1}
22
119
22
["print_function_callback", "datetime.now", "_list_jobs_by_filter_expression", "download_candidate_jobs.update", "_list_jobs_by_filter_expression", "print", "len", "_datetimes_to_str", "download_candidate_jobs.items", "print", "len", "_list_jobs_by_filter_expression", "print", "len", "isoformat", "starting_timestamp.as...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_get_download_candidate_jobs) defined within the public class called public.The function start at line 70 and ends at 188. It contains 92 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [70.0] and does not return any value. It declares 22.0 functions, It has 2...
aws-deadline_deadline-cloud
public
public
0
0
_categorize_jobs_in_checkpoint
def _categorize_jobs_in_checkpoint(boto3_session: boto3.Session,farm_id: str,queue_id: str,checkpoint: IncrementalDownloadState,download_candidate_jobs: dict[str, dict[str, Any]],new_completed_timestamp: datetime,print_function_callback: Callable[[str], None] = lambda msg: None,) -> CategorizedJobIds:"""Categorizes the...
33
154
8
931
21
219
439
219
boto3_session,farm_id,queue_id,checkpoint,download_candidate_jobs,new_completed_timestamp,print_function_callback
['dc_job', 'new_job_ids', 'checkpoint_jobs', 'ip_job', 'ip_succeeded_task_count', 'checkpoint_job_ids', 'start_time', 'dc_total_task_count', 'attachments_free_job_ids', 'completed_job_ids', 'updated_job_ids', 'duration', 'deadline', 'unchanged_job_ids', 'result', 'download_candidate_job_ids', 'missing_storage_profile',...
CategorizedJobIds
{"AnnAssign": 2, "Assign": 47, "Expr": 34, "For": 7, "If": 12, "Return": 1}
74
221
74
["get_session_client", "set", "checkpoint_jobs.keys", "set", "download_candidate_jobs.keys", "print_function_callback", "len", "len", "datetime.now", "checkpoint_job_ids.difference", "checkpoint_job_ids.intersection", "download_candidate_job_ids.difference", "set", "set", "set", "set", "set", "ip_job.keys", "new_job_id...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_categorize_jobs_in_checkpoint) defined within the public class called public.The function start at line 219 and ends at 439. It contains 154 lines of code and it has a cyclomatic complexity of 33. It takes 8 parameters, represented as [219.0] and does not return any value. It declares 74.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
_retrieve_sessions_for_job
def _retrieve_sessions_for_job(deadline_client: BaseClient,farm_id: str,queue_id: str,job_id: str,session_ended_threshold: datetime,output_job_sessions: dict[str, list],):"""Uses deadline.list_sessions to get all sessions of the specified job that are still running orthat ended after session_ended_threshold.Places the ...
6
18
6
117
1
442
474
442
deadline_client,farm_id,queue_id,job_id,session_ended_threshold,output_job_sessions
['sessions_paginator']
None
{"AnnAssign": 1, "Assign": 2, "Expr": 2, "For": 2, "If": 2}
4
33
4
["deadline_client.get_paginator", "sessions_paginator.paginate", "sessions_page.get", "session_list.append"]
0
[]
The function (_retrieve_sessions_for_job) defined within the public class called public.The function start at line 442 and ends at 474. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [442.0] and does not return any value. It declares 4.0 functions, and It ha...
aws-deadline_deadline-cloud
public
public
0
0
_retrieve_session_actions_for_session
def _retrieve_session_actions_for_session(deadline_client: BaseClient,checkpoint_job_session_completed_indexes: dict[str, dict[str, int]],farm_id: str,queue_id: str,job_id: str,output_session: dict[str, Any],):"""Args:deadline_client: A boto3 client for accessing Deadline.checkpoint_job_session_completed_indexes: All t...
11
36
6
230
5
477
530
477
deadline_client,checkpoint_job_session_completed_indexes,farm_id,queue_id,job_id,output_session
['succeeded', 'session_actions_paginator', 'session_action_list', 'session_action_index', 'is_task_run']
None
{"AnnAssign": 2, "Assign": 7, "Expr": 2, "For": 3, "If": 4}
10
54
10
["deadline_client.get_paginator", "session_actions_paginator.paginate", "session_actions_page.get", "session_action.get", "session_action.get", "session_action_list.append", "int", "rsplit", "get", "checkpoint_job_session_completed_indexes.get"]
0
[]
The function (_retrieve_session_actions_for_session) defined within the public class called public.The function start at line 477 and ends at 530. It contains 36 lines of code and it has a cyclomatic complexity of 11. It takes 6 parameters, represented as [477.0] and does not return any value. It declares 10.0 function...
aws-deadline_deadline-cloud
public
public
0
0
_get_job_sessions
def _get_job_sessions(boto3_session: boto3.Session,boto3_session_for_s3: boto3.Session,farm_id: str,queue: dict[str, Any],checkpoint_job_session_completed_indexes: dict[str, dict[str, int]],categorized_job_ids: CategorizedJobIds,checkpoint: IncrementalDownloadState,download_candidate_jobs: dict[str, dict[str, Any]],pri...
10
90
10
495
7
533
687
533
boto3_session,boto3_session_for_s3,farm_id,queue,checkpoint_job_session_completed_indexes,categorized_job_ids,checkpoint,download_candidate_jobs,print_function_callback
['futures', 'duration', 'deadline', 'session_ended_threshold', 'job_ids', 'max_workers', 'start_time']
dict[str, list]
{"AnnAssign": 2, "Assign": 15, "Expr": 17, "For": 5, "If": 2, "Return": 1, "With": 2}
38
155
38
["union", "categorized_job_ids.completed.union", "print_function_callback", "len", "datetime.now", "get_session_client", "print_function_callback", "concurrent.futures.ThreadPoolExecutor", "job_session_ended_timestamp.get", "timedelta", "futures.append", "executor.submit", "concurrent.futures.as_completed", "future.res...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_get_job_sessions) defined within the public class called public.The function start at line 533 and ends at 687. It contains 90 lines of code and it has a cyclomatic complexity of 10. It takes 10 parameters, represented as [533.0] and does not return any value. It declares 38.0 functions, It has 38.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_get_storage_profiles
def _get_storage_profiles(deadline: BaseClient,farm_id: str,queue: dict[str, Any],job_sessions: dict[str, list],checkpoint: IncrementalDownloadState,download_candidate_jobs: dict[str, dict[str, Any]],) -> dict[str, dict[str, Any]]:"""Retrieves all the needed storage profiles. To call this function,checkpoint.local_stor...
4
22
6
138
1
690
730
690
deadline,farm_id,queue,job_sessions,checkpoint,download_candidate_jobs
['storage_profiles']
dict[str, dict[str, Any]]
{"AnnAssign": 1, "Assign": 1, "Expr": 2, "For": 1, "If": 1, "Return": 1}
4
41
4
["ValueError", "job_sessions.keys", "storage_profile_ids.add", "deadline.get_storage_profile_for_queue"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_get_storage_profiles) defined within the public class called public.The function start at line 690 and ends at 730. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 6 parameters, represented as [690.0] and does not return any value. It declares 4.0 functions, It has 4.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_create_path_mapping_rule_appliers
def _create_path_mapping_rule_appliers(storage_profiles: dict[str, dict[str, Any]],checkpoint: IncrementalDownloadState,download_candidate_jobs: dict[str, dict[str, Any]],print_function_callback: Callable[[str], None] = lambda msg: None,) -> dict[str, Optional[_PathMappingRuleApplier]]:"""Retrieves all the needed stora...
8
51
5
237
5
733
801
733
storage_profiles,checkpoint,download_candidate_jobs,print_function_callback
['local_storage_profile_name', 'local_storage_profile', 'storage_profile_name', 'job_count', 'rules']
dict[str, Optional[_PathMappingRuleApplier]]
{"AnnAssign": 1, "Assign": 7, "Expr": 11, "For": 2, "If": 3, "Return": 1}
20
69
20
["ValueError", "print_function_callback", "print_function_callback", "print_function_callback", "len", "download_candidate_jobs.values", "job.get", "storage_profiles.items", "_generate_path_mapping_rules", "_PathMappingRuleApplier", "print_function_callback", "len", "download_candidate_jobs.values", "job.get", "print_f...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_create_path_mapping_rule_appliers) defined within the public class called public.The function start at line 733 and ends at 801. It contains 51 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [733.0] and does not return any value. It declares 20.0 functions, I...
aws-deadline_deadline-cloud
public
public
0
0
_add_missing_output_manifests_to_job_sessions
def _add_missing_output_manifests_to_job_sessions(boto3_session_for_s3: boto3.Session,farm_id: str,queue: dict[str, Any],job_sessions: dict[str, list],download_candidate_jobs: dict[str, dict[str, Any]],):"""Args:boto3_session_for_s3: The boto3.Session to use for accessing S3.farm_id: The farm id for the operation.queue...
4
17
5
97
2
804
830
804
boto3_session_for_s3,farm_id,queue,job_sessions,download_candidate_jobs
['session_action_list', 'job']
None
{"Assign": 2, "Expr": 2, "For": 1}
3
27
3
["job_sessions.items", "session.get", "_add_output_manifests_from_s3"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._get_job_sessions"]
The function (_add_missing_output_manifests_to_job_sessions) defined within the public class called public.The function start at line 804 and ends at 830. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [804.0] and does not return any value. It declares 3.0 fu...
aws-deadline_deadline-cloud
public
public
0
0
_filter_session_actions_without_manifests_from_job_sessions
def _filter_session_actions_without_manifests_from_job_sessions(job_sessions: dict[str, list],download_candidate_jobs: dict[str, dict[str, Any]],print_function_callback: Callable[[str], None] = lambda msg: None,):"""Modify job_sessions in place to filter out any session actions that lack any output manifests.Print a wa...
8
26
4
149
4
833
870
833
job_sessions,download_candidate_jobs,print_function_callback
['total_count', 'filtered_session_action_list', 'job', 'filtered_count']
None
{"Assign": 5, "AugAssign": 2, "Expr": 3, "For": 2, "If": 2}
8
38
8
["job_sessions.items", "len", "session.get", "session.get", "any", "len", "print_function_callback", "print_function_callback"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._get_job_sessions"]
The function (_filter_session_actions_without_manifests_from_job_sessions) defined within the public class called public.The function start at line 833 and ends at 870. It contains 26 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [833.0] and does not return any value. It d...
aws-deadline_deadline-cloud
public
public
0
0
_update_checkpoint_jobs_list
def _update_checkpoint_jobs_list(checkpoint: IncrementalDownloadState,download_candidate_jobs: dict[str, dict[str, Any]],categorized_job_ids: CategorizedJobIds,job_sessions: dict[str, list],):"""Update the jobs list in the checkpoint object.Args:checkpoint: The checkpoint for the incremental download.download_candidate...
18
84
4
445
3
873
987
873
checkpoint,download_candidate_jobs,categorized_job_ids,job_sessions
['session_ended_timestamp', 'session_actions', 'max_session_ended_timestamp']
None
{"AnnAssign": 3, "Assign": 9, "Expr": 6, "For": 9, "If": 4}
21
115
21
["job_sessions.items", "max", "job_sessions.items", "session.get", "job_session_completed_indexes.setdefault", "max", "updated_jobs.append", "IncrementalDownloadJob", "job_session_ended_timestamps.get", "job_session_completed_indexes.get", "updated_jobs.append", "IncrementalDownloadJob", "updated_jobs.append", "Increme...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._incremental_output_download"]
The function (_update_checkpoint_jobs_list) defined within the public class called public.The function start at line 873 and ends at 987. It contains 84 lines of code and it has a cyclomatic complexity of 18. It takes 4 parameters, represented as [873.0] and does not return any value. It declares 21.0 functions, It has...
aws-deadline_deadline-cloud
public
public
0
0
_incremental_output_download._update_download_progress
def _update_download_progress(download_metadata: ProgressReportMetadata,) -> bool:nonlocal last_call_time, printed_100_percentif not printed_100_percent and download_metadata.progress == 100:print_function_callback(f"{download_metadata.progressMessage}")last_call_time = time.time()printed_100_percent = Trueelif (not pr...
5
15
1
71
0
1,202
1,218
1,202
null
[]
None
null
0
0
0
null
0
null
The function (_incremental_output_download._update_download_progress) defined within the public class called public.The function start at line 1202 and ends at 1218. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_incremental_output_download
def _incremental_output_download(farm_id: str,queue: dict[str, Any],boto3_session: boto3.Session,checkpoint: IncrementalDownloadState,file_conflict_resolution: FileConflictResolution,config: Optional[ConfigParser] = None,print_function_callback: Callable[[str], None] = lambda msg: None,*,dry_run: bool = False,) -> Incr...
15
223
9
1,063
20
991
1,295
991
farm_id,queue,boto3_session,checkpoint,file_conflict_resolution,config,print_function_callback,dry_run
['paths_summary', 'path_mapping_rule_appliers', 'boto3_session_for_s3', 'update_length', 'printed_100_percent', 'path_format', 'last_call_time', 'storage_profile', 'current_timestamp', 'eventual_consistency_delta', 'start_time', 'MIN_DELAY_BETWEEN_PRINTOUTS', 'local_path_list', 'duration', 'deadline', 'new_completed_ti...
IncrementalDownloadState
{"AnnAssign": 9, "Assign": 37, "Expr": 42, "For": 1, "If": 8, "Return": 2}
103
305
103
["DeadlineOperationError", "IncrementalOutputDownloadLatencies", "get_session_client", "datetime.now", "max", "timedelta", "api.get_queue_user_boto3_session", "print_function_callback", "print_function_callback", "isoformat", "checkpoint.downloads_completed_timestamp.astimezone", "print_function_callback", "isoformat",...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.queue_group_py.sync_output"]
The function (_incremental_output_download) defined within the public class called public.The function start at line 991 and ends at 1295. It contains 223 lines of code and it has a cyclomatic complexity of 15. It takes 9 parameters, represented as [991.0] and does not return any value. It declares 103.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
_get_default_log_level
def _get_default_log_level() -> str:"""Get the default log level from the config file."""# Set the default log level based on the setting, must do here so we can pass into the click option_SETTING_LOG_LEVEL = get_setting("settings.log_level").upper()_DEFAULT_LOG_LEVEL = get_setting_default("settings.log_level")_CLI_DEF...
2
11
0
46
3
30
44
30
['_SETTING_LOG_LEVEL', '_DEFAULT_LOG_LEVEL', '_CLI_DEFAULT_LOG_LEVEL']
str
{"Assign": 4, "Expr": 2, "If": 1, "Return": 1}
4
15
4
["upper", "get_setting", "get_setting_default", "logger.warning"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._main_py.main"]
The function (_get_default_log_level) defined within the public class called public.The function start at line 30 and ends at 44. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions...
aws-deadline_deadline-cloud
ContextTrackingCommand
public
0
1
invoke
def invoke(self, ctx: click.Context):# This is a global variable used to modify User Agent header in the default boto configsession_context["cli-command-name"] = ctx.command_path.replace(" ", ".")return super().invoke(ctx)
1
3
2
35
0
52
55
52
self,ctx
[]
Returns
{"Assign": 1, "Return": 1}
3
4
3
["ctx.command_path.replace", "invoke", "super"]
26
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.tests.cli.test_help_py.test_help_in_root", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.tests.cli.test_help_py.test_help_in_subcommand", "_.content.gdri...
The function (invoke) defined within the public class called ContextTrackingCommand, that inherit another class.The function start at line 52 and ends at 55. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [52.0], and this function return a value. It declares 3...
aws-deadline_deadline-cloud
public
public
0
0
main
def main(ctx: click.Context, log_level: Optional[str], redirect_output: str, redirect_mode: str):"""The AWS Deadline Cloud CLI provides functionality to interact with the AWS Deadline Cloudservice."""if redirect_output:# Set both stdout and stderr to write to the specified file, writing in line buffering modeif redirec...
5
14
4
106
2
92
113
92
ctx,log_level,redirect_output,redirect_mode
['log_level', 'open_mode']
None
{"Assign": 5, "Expr": 4, "If": 4}
12
22
12
["open", "_get_default_log_level", "logging.basicConfig", "logger.debug", "ctx.ensure_object", "click.group", "click.version_option", "click.option", "click.Choice", "click.option", "click.option", "click.Choice"]
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", "...
The function (main) defined within the public class called public.The function start at line 92 and ends at 113. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [92.0] and does not return any value. It declares 12.0 functions, It has 12.0 functions called insi...
aws-deadline_deadline-cloud
public
public
0
0
cli_mcp_server
def cli_mcp_server():"""Start the AWS Deadline Cloud MCP (Model Context Protocol) server.The MCP server provides LLM tools with access to AWS Deadline Cloud operationsthrough the Model Context Protocol. This allows AI assistants to interact withDeadline Cloud services on your behalf.The server will run until interrupte...
3
19
0
72
1
17
51
17
['telemetry_client']
None
{"Assign": 1, "Expr": 5, "Try": 2}
6
35
6
["click.echo", "sys.exit", "get_deadline_cloud_library_telemetry_client", "telemetry_client.record_event", "mcp_main", "main.command"]
0
[]
The function (cli_mcp_server) defined within the public class called public.The function start at line 17 and ends at 51. It contains 19 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions ca...
aws-deadline_deadline-cloud
public
public
0
0
_pid_lock_temp_file_path
def _pid_lock_temp_file_path(pid_file_path: str) -> str:"""Construct the temporary file path used to populate the pid lock file before moving it to the lock file path."""return pid_file_path + f"{os.getpid()}~tmp"
1
2
1
15
0
19
21
19
pid_file_path
[]
str
{"Expr": 1, "Return": 1}
1
3
1
["os.getpid"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._pid_file_lock_py._release_pid_lock", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._pid_file...
The function (_pid_lock_temp_file_path) defined within the public class called public.The function start at line 19 and ends at 21. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function c...
aws-deadline_deadline-cloud
public
public
0
0
_claim_pid_lock_with_rename
def _claim_pid_lock_with_rename(tmp_file_name: str, pid_file_path: str) -> bool:# Atomic rename the temporary location to the pid lock file. This operation needs to be# atomic: it either succeeds or another process is holding the lock.## If the lock is not claimed, the temporary file will remain.try:if sys.platform.sta...
4
10
2
65
0
24
42
24
tmp_file_name,pid_file_path
[]
bool
{"Expr": 3, "If": 1, "Return": 2, "Try": 1}
5
19
5
["sys.platform.startswith", "sys.platform.startswith", "os.rename", "os.link", "os.remove"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._pid_file_lock_py._try_acquire_pid_lock"]
The function (_claim_pid_lock_with_rename) defined within the public class called public.The function start at line 24 and ends at 42. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [24.0] and does not return any value. It declares 5.0 functions, It has 5.0 f...
aws-deadline_deadline-cloud
public
public
0
0
_try_acquire_pid_lock
def _try_acquire_pid_lock(pid_file_path: str,operation_name: str = "the operation",):"""Checks if the specified pid lock file exists and executes as per the following:If the pid lock file does not exist:It creates a new pid file and acquires lock for this pid.It handles concurrent processes trying to obtain lock such t...
10
43
2
192
2
45
121
45
pid_file_path,operation_name
['tmp_file_path', 'lock_holder_pid']
None
{"AnnAssign": 1, "Assign": 3, "Expr": 8, "If": 5, "Return": 2, "Try": 4, "With": 2}
20
77
20
["os.getpid", "_pid_lock_temp_file_path", "open", "f.write", "str", "_claim_pid_lock_with_rename", "open", "int", "f.read", "os.remove", "logger.warning", "psutil.pid_exists", "os.remove", "logger.warning", "PidLockAlreadyHeld", "_claim_pid_lock_with_rename", "PidLockAlreadyHeld", "os.path.exists", "os.remove", "logger...
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._pid_file_lock_py.PidFileLock", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_pid_...
The function (_try_acquire_pid_lock) defined within the public class called public.The function start at line 45 and ends at 121. It contains 43 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [45.0] and does not return any value. It declares 20.0 functions, It has 20.0 fun...
aws-deadline_deadline-cloud
public
public
0
0
_release_pid_lock
def _release_pid_lock(pid_file_path: str):"""Releases the pid lock by deleting the pid file.:param pid_file_full_path: full path of the pid lock file:return: boolean, True if pid lock released successfully"""# Get the current process's id to obtain lockcurrent_process_id: int = os.getpid()# If an issue occurred with th...
5
20
1
119
2
124
160
124
pid_file_path
['tmp_file_name', 'lock_holder_pid']
None
{"AnnAssign": 1, "Assign": 2, "Expr": 7, "If": 3, "Return": 1, "Try": 1, "With": 1}
13
37
13
["os.getpid", "_pid_lock_temp_file_path", "os.path.exists", "os.remove", "logger.warning", "logger.warning", "os.path.exists", "logger.warning", "open", "f.read", "str", "os.remove", "logger.warning"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._pid_file_lock_py.PidFileLock", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_pid_...
The function (_release_pid_lock) defined within the public class called public.The function start at line 124 and ends at 160. It contains 20 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 13.0 functions, It has 13.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
PidFileLock
def PidFileLock(lock_file_path: str,operation_name: str = "the operation",):"""A context manager for holding a pid (process id) lock file during the scope of a 'with' statement.A pid lock file lets you prevent concurrent execution of the same CLI command. For example,a command to repeatedly download the new output avai...
2
9
2
31
0
164
186
164
lock_file_path,operation_name
[]
None
{"Expr": 4, "Try": 1}
2
23
2
["_try_acquire_pid_lock", "_release_pid_lock"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.queue_group_py.sync_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test...
The function (PidFileLock) defined within the public class called public.The function start at line 164 and ends at 186. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [164.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions calle...
aws-deadline_deadline-cloud
public
public
0
0
main
def main() -> None:from deadline.client.cli._deadline_cli import mainmain(# Override the program name to always be "deadline"prog_name="deadline",)
1
5
0
23
0
9
15
9
[]
None
{"Expr": 1}
1
7
1
["main"]
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", "...
The function (main) defined within the public class called public.The function start at line 9 and ends at 15. 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 declare 1.0 function, It has 1.0 function called inside which is...
aws-deadline_deadline-cloud
public
public
0
0
main
def main() -> None:import argparseimport loggingfrom deadline.client.ui.dev_application import appparser = argparse.ArgumentParser()parser.add_argument("--debug", help="Enable debug logging", action="store_true")args = parser.parse_args()if args.debug:log_level = "DEBUG"else:log_level = get_setting("settings.log_level"...
2
13
0
75
3
12
28
12
['parser', 'args', 'log_level']
None
{"Assign": 4, "Expr": 3, "If": 1}
6
17
6
["argparse.ArgumentParser", "parser.add_argument", "parser.parse_args", "get_setting", "logging.basicConfig", "app"]
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", "...
The function (main) defined within the public class called public.The function start at line 12 and ends at 28. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 functions called inside whi...
aws-deadline_deadline-cloud
SigIntHandler
public
0
0
__new__
def __new__(cls, *args, **kwargs):if not cls._instance:cls._instance = super().__new__(cls)cls._instance.continue_operation = Truesignal.signal(signal.SIGINT, cls._instance._handle_sigint)return cls._instance
2
6
3
54
0
15
20
15
cls,*args,**kwargs
[]
Returns
{"Assign": 2, "Expr": 1, "If": 1, "Return": 1}
3
6
3
["__new__", "super", "signal.signal"]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.modelmeta_py.ModelMeta.__new__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.dockertest.documentation_py.DefaultDoc.__new__", "_.content.gdrive.MyDrive....
The function (__new__) defined within the public class called SigIntHandler.The function start at line 15 and ends at 20. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [15.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions c...
aws-deadline_deadline-cloud
SigIntHandler
public
0
0
_handle_sigint
def _handle_sigint(self, signum, frame):self.continue_operation = False
1
2
3
14
0
22
23
22
self,signum,frame
[]
None
{"Assign": 1}
0
2
0
[]
0
[]
The function (_handle_sigint) defined within the public class called SigIntHandler.The function start at line 22 and ends at 23. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
cli_attachment
def cli_attachment():"""Commands to work with Deadline Cloud Job Attachments."""
1
1
0
5
0
33
36
33
[]
None
{"Expr": 1}
1
4
1
["main.group"]
0
[]
The function (cli_attachment) defined within the public class called public.The function start at line 33 and ends at 36. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called...
aws-deadline_deadline-cloud
public
public
0
0
attachment_download
def attachment_download(manifests: list[str],s3_root_uri: str,path_mapping_rules: str,json: bool,**args,):"""Download data files of manifest root(s) to a machine for given manifest(s) from S3."""logger: ClickLogger = ClickLogger(is_json=json)# Setup configconfig = _apply_cli_options_to_config(**args)# Assuming when pas...
6
42
5
232
6
76
134
76
manifests,s3_root_uri,path_mapping_rules,json,**args
['config', 'deadline_client', 'conflict_resolution_setting', 'conflict_resolution', 'boto3_session', 's3_root_uri']
None
{"AnnAssign": 5, "Assign": 7, "Expr": 2, "If": 4}
24
59
24
["ClickLogger", "_apply_cli_options_to_config", "api.get_boto3_session", "args.pop", "config_file.get_setting", "config_file.get_setting", "get_queue", "MissingJobAttachmentSettingsError", "s3_settings.to_s3_root_uri", "boto3_session.client", "api.get_queue_user_boto3_session", "MissingJobAttachmentSettingsError", "con...
0
[]
The function (attachment_download) defined within the public class called public.The function start at line 76 and ends at 134. It contains 42 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [76.0] and does not return any value. It declares 24.0 functions, and It has 24.0 f...
aws-deadline_deadline-cloud
public
public
0
0
attachment_upload
def attachment_upload(manifests: list[str],root_dirs: list[str],path_mapping_rules: str,s3_root_uri: str,upload_manifest_path: str,json: bool,**args,):"""Upload output files to s3. The files always include data files, optionally upload manifests prefixed by given path."""logger: ClickLogger = ClickLogger(is_json=json)#...
4
36
7
211
4
168
218
168
manifests,root_dirs,path_mapping_rules,s3_root_uri,upload_manifest_path,json,**args
['boto3_session', 'deadline_client', 'config', 's3_root_uri']
None
{"AnnAssign": 5, "Assign": 4, "Expr": 2, "If": 3}
23
51
23
["ClickLogger", "_apply_cli_options_to_config", "api.get_boto3_session", "args.pop", "config_file.get_setting", "config_file.get_setting", "get_queue", "MissingJobAttachmentSettingsError", "s3_settings.to_s3_root_uri", "boto3_session.client", "api.get_queue_user_boto3_session", "MissingJobAttachmentSettingsError", "_at...
0
[]
The function (attachment_upload) defined within the public class called public.The function start at line 168 and ends at 218. It contains 36 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [168.0] and does not return any value. It declares 23.0 functions, and It has 23.0 f...
aws-deadline_deadline-cloud
public
public
0
0
_cli_on_pending_authorization
def _cli_on_pending_authorization(**kwargs):"""Callback for `login`, to tell the user that Deadline Cloud monitor is opening"""if kwargs["credentials_source"] == AwsCredentialsSource.DEADLINE_CLOUD_MONITOR_LOGIN:click.echo("Opening Deadline Cloud monitor. Please log in and then return here.")
2
3
1
23
0
26
32
26
**kwargs
[]
None
{"Expr": 2, "If": 1}
1
7
1
["click.echo"]
0
[]
The function (_cli_on_pending_authorization) defined within the public class called public.The function start at line 26 and ends at 32. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 ...
aws-deadline_deadline-cloud
public
public
0
0
cli_auth
def cli_auth():"""Commands to handle authentication."""
1
1
0
5
0
37
40
37
[]
None
{"Expr": 1}
1
4
1
["main.group"]
0
[]
The function (cli_auth) defined within the public class called public.The function start at line 37 and ends at 40. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called insid...
aws-deadline_deadline-cloud
public
public
0
0
auth_login
def auth_login():"""Logs in to the Deadline-configured AWS profile.This is for any profile type that Deadline knows how to login toCurrently only supports Deadline Cloud monitor"""click.echo(f"Logging into AWS Profile {config_file.get_setting('defaults.aws_profile_name')!r} for AWS Deadline Cloud")message = api.login(o...
1
8
0
33
1
45
60
45
['message']
None
{"Assign": 1, "Expr": 3}
5
16
5
["click.echo", "config_file.get_setting", "api.login", "click.echo", "cli_auth.command"]
0
[]
The function (auth_login) defined within the public class called public.The function start at line 45 and ends at 60. 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 5.0 functions, and It has 5.0 functions called ...
aws-deadline_deadline-cloud
public
public
0
0
auth_logout
def auth_logout():"""Logs out of the Deadline Cloud monitor configured AWS profile."""api.logout()click.echo("Successfully logged out of all Deadline Cloud monitor AWS profiles")
1
3
0
16
0
65
71
65
[]
None
{"Expr": 3}
3
7
3
["api.logout", "click.echo", "cli_auth.command"]
0
[]
The function (auth_logout) defined within the public class called public.The function start at line 65 and ends at 71. 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...
aws-deadline_deadline-cloud
public
public
0
0
auth_status
def auth_status(output, **args):"""Gets the authentication status for the given AWS profile"""# Get a temporary config object with the standard options handledconfig = _apply_cli_options_to_config(**args)profile_name = get_setting("defaults.aws_profile_name", config=config)is_json_format = True if output == "json" else...
3
24
2
162
10
89
121
89
output,**args
['profile_name', 'config', 'creds_source_result', 'auth_status_results', 'json_output', 'creds_source', 'api_availability_result', 'auth_status', 'width', 'is_json_format']
None
{"Assign": 10, "Expr": 6, "If": 1, "With": 1}
17
33
17
["_apply_cli_options_to_config", "get_setting", "_modified_logging_level", "logging.getLogger", "api.get_credentials_source", "api.check_authentication_status", "api.check_deadline_api_available", "click.echo", "click.echo", "click.echo", "click.echo", "click.echo", "json.dumps", "cli_auth.command", "click.option", "cl...
0
[]
The function (auth_status) defined within the public class called public.The function start at line 89 and ends at 121. It contains 24 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [89.0] and does not return any value. It declares 17.0 functions, and It has 17.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
cli_bundle
def cli_bundle():"""Commands to work with Open Job Description job bundles."""
1
1
0
5
0
47
50
47
[]
None
{"Expr": 1}
1
4
1
["main.group"]
0
[]
The function (cli_bundle) defined within the public class called public.The function start at line 47 and ends at 50. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
aws-deadline_deadline-cloud
public
public
0
0
validate_parameters
def validate_parameters(ctx, param, value):"""Validate provided --parameter values, ensuring that they are in the format "ParamName=Value", and convert them to a dict with thefollowing format:[{"name": "<name>", "value": "<value>"}, ...]"""parameters_split = []for parameter in value:regex_match = re.match("([^=]+)=(.*)...
4
14
3
85
2
57
78
57
ctx,param,value
['regex_match', 'parameters_split']
Returns
{"Assign": 2, "Expr": 2, "For": 1, "If": 2, "Return": 1}
5
22
5
["re.match", "click.BadParameter", "re.match", "click.BadParameter", "parameters_split.append"]
0
[]
The function (validate_parameters) defined within the public class called public.The function start at line 57 and ends at 78. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [57.0], and this function return a value. It declares 5.0 functions, and It has 5.0 ...
aws-deadline_deadline-cloud
public
public
0
0
_interactive_confirmation_prompt
def _interactive_confirmation_prompt(message: str, default_response: bool) -> bool:"""Callback to decide if submission should continue or be canceled. Returns True to continue, False to cancel.Args:warning_message (str): The warning message to display.default_response (bool): The default to present as the response (Tru...
1
5
2
26
0
81
92
81
message,default_response
[]
bool
{"Expr": 1, "Return": 1}
1
12
1
["click.confirm"]
0
[]
The function (_interactive_confirmation_prompt) defined within the public class called public.The function start at line 81 and ends at 92. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [81.0] and does not return any value. It declare 1.0 function, and It ha...
aws-deadline_deadline-cloud
public
public
0
0
bundle_submit._check_create_job_wait_canceled
def _check_create_job_wait_canceled() -> bool:return sigint_handler.continue_operation
1
2
0
10
0
201
202
201
null
[]
None
null
0
0
0
null
0
null
The function (bundle_submit._check_create_job_wait_canceled) defined within the public class called public.The function start at line 201 and ends at 202. 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
bundle_submit
def bundle_submit(job_bundle_dir,job_attachments_file_system,parameter,known_asset_path,name,priority,max_failed_tasks_count,max_retries_per_task,max_worker_count,target_task_run_status,require_paths_exist,submitter_name,save_debug_snapshot,**args,):"""Submits an Open Job Description job bundle."""# Apply the CLI args ...
22
94
14
461
6
176
288
176
job_bundle_dir,job_attachments_file_system,parameter,known_asset_path,name,priority,max_failed_tasks_count,max_retries_per_task,max_worker_count,target_task_run_status,require_paths_exist,submitter_name,save_debug_snapshot,**args
['config', 'snapshot_tmpdir', 'upload_callback_manager', 'hash_callback_manager', 'save_debug_snapshot', 'job_id']
Returns
{"Assign": 7, "Expr": 15, "If": 8, "Return": 1, "Try": 1}
55
113
55
["_apply_cli_options_to_config", "_ProgressBarCallbackManager", "_ProgressBarCallbackManager", "os.path.abspath", "save_debug_snapshot.endswith", "tempfile.TemporaryDirectory", "api.create_job_from_job_bundle", "os.makedirs", "os.path.dirname", "shutil.make_archive", "click.echo", "click.echo", "args.get", "args.get", ...
0
[]
The function (bundle_submit) defined within the public class called public.The function start at line 176 and ends at 288. It contains 94 lines of code and it has a cyclomatic complexity of 22. It takes 14 parameters, represented as [176.0], and this function return a value. It declares 55.0 functions, and It has 55.0...
aws-deadline_deadline-cloud
public
public
0
0
bundle_gui_submit
def bundle_gui_submit(parameter, job_bundle_dir, browse, output, install_gui, submitter_name, known_asset_path, **args):"""Opens a GUI to submit an Open Job Description job bundle."""from ...ui import gui_context_for_cliwith gui_context_for_cli(automatically_install_dependencies=install_gui) as app:from ...ui.job_bundl...
4
28
8
125
2
338
375
338
parameter,job_bundle_dir,browse,output,install_gui,submitter_name,known_asset_path,**args
['output', 'submitter']
None
{"Assign": 2, "Expr": 4, "If": 2, "Return": 1, "With": 1}
16
38
16
["gui_context_for_cli", "DeadlineOperationError", "output.lower", "show_job_bundle_submitter", "submitter.show", "app.exec", "_print_response", "cli_bundle.command", "click.option", "click.argument", "click.option", "click.option", "click.option", "click.option", "click.Choice", "click.option"]
0
[]
The function (bundle_gui_submit) defined within the public class called public.The function start at line 338 and ends at 375. It contains 28 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [338.0] and does not return any value. It declares 16.0 functions, and It has 16.0 f...
aws-deadline_deadline-cloud
public
public
0
0
_print_response
def _print_response(output: str,job_bundle_dir: str,job_history_bundle_dir: Optional[str],job_id: Optional[str],):if output == "json":if job_id:response: dict[str, Any] = {"status": "SUBMITTED","jobId": job_id,"jobHistoryBundleDirectory": job_history_bundle_dir,}click.echo(json.dumps(response))else:click.echo(json.dump...
4
23
4
118
0
378
400
378
output,job_bundle_dir,job_history_bundle_dir,job_id
[]
None
{"AnnAssign": 1, "Expr": 6, "If": 3}
8
23
8
["click.echo", "json.dumps", "click.echo", "json.dumps", "click.echo", "click.echo", "click.echo", "click.echo"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.bundle_group_py.bundle_gui_submit"]
The function (_print_response) defined within the public class called public.The function start at line 378 and ends at 400. It contains 23 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [378.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ...
aws-deadline_deadline-cloud
ClickLogger
public
0
0
__init__
def __init__(self, is_json: bool):self._is_json = is_json
1
2
2
14
0
15
16
15
self,is_json
[]
None
{"Assign": 1}
0
2
0
[]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called ClickLogger.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [15.0] and does not return any value. It has 4993.0 functions calling this function which ar...
aws-deadline_deadline-cloud
ClickLogger
public
0
0
is_json
def is_json(self) -> bool:"""Is logging in JSON mode."""return self._is_json
1
2
1
12
0
18
22
18
self
[]
bool
{"Expr": 1, "Return": 1}
0
5
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95099308_explorerhq_django_sql_explorer.explorer.ee.db_connections.type_infer_py.get_parser", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95099308_explorerhq_django_sql_explorer.explorer.tests.test_mime_py.TestIsJ...
The function (is_json) defined within the public class called ClickLogger.The function start at line 18 and ends at 22. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 5.0 functions calling this function which are ["_.c...
aws-deadline_deadline-cloud
ClickLogger
public
0
0
echo
def echo(self,message: t.Optional[t.Any] = None,file: t.Optional[t.IO[t.Any]] = None,nl: bool = True,err: bool = False,color: t.Optional[bool] = None,):if not self._is_json:click.echo(message, file, nl, err, color)
2
10
6
80
0
24
33
24
self,message,file,nl,err,color
[]
None
{"Expr": 1, "If": 1}
1
10
1
["click.echo"]
18
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69993433_splitgraph_sgr.splitgraph.cloud.tunnel_client_py.launch_rathole_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70258989_dynaconf_dynaconf.dynaconf.vendor.click._bashcomplete_py.bashcomplete", "_.con...
The function (echo) defined within the public class called ClickLogger.The function start at line 24 and ends at 33. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, It has 1.0 function called insid...
aws-deadline_deadline-cloud
ClickLogger
public
0
0
json
def json(self,message: t.Optional[dict] = None,file: t.Optional[t.IO[t.Any]] = None,nl: bool = True,err: bool = False,color: t.Optional[bool] = None,indent=None,):if self._is_json:click.echo(json.dumps(obj=message, indent=indent), file, nl, err, color)
2
11
7
92
0
35
45
35
self,message,file,nl,err,color,indent
[]
None
{"Expr": 1, "If": 1}
2
11
2
["click.echo", "json.dumps"]
60
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.binance_api_utils_py.get_current_price", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.repo...
The function (json) defined within the public class called ClickLogger.The function start at line 35 and ends at 45. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [35.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called in...
aws-deadline_deadline-cloud
public
public
0
0
cli_config
def cli_config():"""Manage Deadline's workstation configuration."""
1
1
0
5
0
18
21
18
[]
None
{"Expr": 1}
1
4
1
["main.group"]
0
[]
The function (cli_config) defined within the public class called public.The function start at line 18 and ends at 21. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
aws-deadline_deadline-cloud
public
public
0
0
config_show
def config_show(output):"""Show all workstation configuration settings and current values."""settings_json = {}if output == "verbose":click.echo(f"AWS Deadline Cloud configuration file:\n {config_file.get_config_file_path()}")click.echo()for setting_name in config_file.SETTINGS.keys():setting_value = config_file.get_se...
5
25
1
162
4
32
62
32
output
['settings_json', 'setting_default', 'setting_description', 'setting_value']
None
{"AnnAssign": 1, "Assign": 7, "Expr": 7, "For": 2, "If": 1}
21
31
21
["click.echo", "config_file.get_config_file_path", "click.echo", "config_file.SETTINGS.keys", "config_file.get_setting", "config_file.get_setting_default", "get", "join", "textwrap.wrap", "click.echo", "click.echo", "click.echo", "str", "config_file.get_config_file_path", "config_file.SETTINGS.keys", "config_file.get_s...
0
[]
The function (config_show) defined within the public class called public.The function start at line 32 and ends at 62. It contains 25 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 21.0 functions, and It has 21.0 functions cal...
aws-deadline_deadline-cloud
public
public
0
0
config_gui
def config_gui(install_gui: bool):"""Open the workstation configuration settings GUI."""from ...ui import gui_context_for_cliwith gui_context_for_cli(automatically_install_dependencies=install_gui):from ...ui.dialogs.deadline_config_dialog import DeadlineConfigDialogDeadlineConfigDialog.configure_settings()
1
5
1
35
0
72
81
72
install_gui
[]
None
{"Expr": 2, "With": 1}
4
10
4
["gui_context_for_cli", "DeadlineConfigDialog.configure_settings", "cli_config.command", "click.option"]
0
[]
The function (config_gui) defined within the public class called public.The function start at line 72 and ends at 81. 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 4.0 functions, and It has 4.0 functions called ...
aws-deadline_deadline-cloud
public
public
0
0
config_set
def config_set(setting_name, value):"""Sets a workstation configuration setting.For example `deadline config set defaults.farm_id <farm-id>`.Run `deadline config --help` to show available settings."""config_file.set_setting(setting_name, value)
1
2
2
16
0
88
95
88
setting_name,value
[]
None
{"Expr": 2}
4
8
4
["config_file.set_setting", "cli_config.command", "click.argument", "click.argument"]
0
[]
The function (config_set) defined within the public class called public.The function start at line 88 and ends at 95. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [88.0] and does not return any value. It declares 4.0 functions, and It has 4.0 functions call...
aws-deadline_deadline-cloud
public
public
0
0
config_clear
def config_clear(setting_name):"""Sets a workstation configuration setting back to the default value.For example `deadline config clear defaults.farm_id`.Run `deadline config --help` to show available settings."""config_file.clear_setting(setting_name)
1
2
1
12
0
101
108
101
setting_name
[]
None
{"Expr": 2}
3
8
3
["config_file.clear_setting", "cli_config.command", "click.argument"]
0
[]
The function (config_clear) defined within the public class called public.The function start at line 101 and ends at 108. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions cal...
aws-deadline_deadline-cloud
public
public
0
0
config_get
def config_get(setting_name):"""Gets a workstation configuration setting.For example `deadline config get defaults.farm_id`.Run `deadline config --help` to show available settings."""click.echo(config_file.get_setting(setting_name))
1
2
1
17
0
114
121
114
setting_name
[]
None
{"Expr": 2}
4
8
4
["click.echo", "config_file.get_setting", "cli_config.command", "click.argument"]
0
[]
The function (config_get) defined within the public class called public.The function start at line 114 and ends at 121. 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 4.0 functions, and It has 4.0 functions calle...
aws-deadline_deadline-cloud
public
public
0
0
cli_farm
def cli_farm():"""Commands to work with farms."""
1
1
0
5
0
19
22
19
[]
None
{"Expr": 1}
1
4
1
["main.group"]
0
[]
The function (cli_farm) defined within the public class called public.The function start at line 19 and ends at 22. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called insid...
aws-deadline_deadline-cloud
public
public
0
0
farm_list
def farm_list(**args):"""Lists the available farms."""# Get a temporary config object with the standard options handledconfig = _apply_cli_options_to_config(**args)try:response = api.list_farms(config=config)except ClientError as exc:raise DeadlineOperationError(f"Failed to get Farms from Deadline:\n{exc}") from exc# S...
4
10
1
75
3
28
45
28
**args
['config', 'structured_farm_list', 'response']
None
{"Assign": 3, "Expr": 2, "Try": 1}
7
18
7
["_apply_cli_options_to_config", "api.list_farms", "DeadlineOperationError", "click.echo", "_cli_object_repr", "cli_farm.command", "click.option"]
0
[]
The function (farm_list) defined within the public class called public.The function start at line 28 and ends at 45. It contains 10 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 7.0 functions, and It has 7.0 functions called ...
aws-deadline_deadline-cloud
public
public
0
0
farm_get
def farm_get(**args):"""Get the details of a farm.If farm ID is not provided, returns the configured default farm."""# Get a temporary config object with the standard options handledconfig = _apply_cli_options_to_config(required_options={"farm_id"}, **args)farm_id = config_file.get_setting("defaults.farm_id", config=co...
1
7
1
71
4
52
67
52
**args
['farm_id', 'config', 'deadline', 'response']
None
{"Assign": 4, "Expr": 3}
10
16
10
["_apply_cli_options_to_config", "config_file.get_setting", "api.get_boto3_client", "deadline.get_farm", "response.pop", "click.echo", "_cli_object_repr", "cli_farm.command", "click.option", "click.option"]
0
[]
The function (farm_get) defined within the public class called public.The function start at line 52 and ends at 67. 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 10.0 functions, and It has 10.0 functions called ...