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
InstallBuilderSelection
public
0
0
from_s3
def from_s3(bucket_name: str, dest_path: Path, key: Optional[str] = None):if key is None:if platform.system() in _INSTALL_BUILDER_ARCHIVE_FILENAME:resolved_key = (f"install_builder/{_INSTALL_BUILDER_ARCHIVE_FILENAME[platform.system()]}")else:raise UnsupportedOSError(f"Unsupported OS: {platform.system()}")else:resolved_...
3
13
3
65
0
69
81
69
bucket_name,dest_path,key
[]
Returns
{"Assign": 2, "If": 2, "Return": 1}
6
13
6
["platform.system", "platform.system", "UnsupportedOSError", "platform.system", "InstallBuilderSelection", "_InstallBuilderS3Selection"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.build_installer_py.setup_install_builder"]
The function (from_s3) defined within the public class called InstallBuilderSelection.The function start at line 69 and ends at 81. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [69.0], and this function return a value. It declares 6.0 functions, It has 6.0 ...
aws-deadline_deadline-cloud
InstallBuilderSelection
public
0
0
from_path
def from_path(path: Path):return InstallBuilderSelection(_InstallBuilderPathSelection(path))
1
2
1
15
0
84
85
84
path
[]
Returns
{"Return": 1}
2
2
2
["InstallBuilderSelection", "_InstallBuilderPathSelection"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.build_installer_py.setup_install_builder"]
The function (from_path) defined within the public class called InstallBuilderSelection.The function start at line 84 and ends at 85. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 fu...
aws-deadline_deadline-cloud
InstallBuilderSelection
public
0
0
from_search
def from_search():return InstallBuilderSelection(None)
1
2
0
9
0
88
89
88
[]
Returns
{"Return": 1}
1
2
1
["InstallBuilderSelection"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.build_installer_py.setup_install_builder"]
The function (from_search) defined within the public class called InstallBuilderSelection.The function start at line 88 and ends at 89. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 fu...
aws-deadline_deadline-cloud
_InstallBuilderSearchConfig
protected
0
0
get_install_directory_regex
def get_install_directory_regex(self) -> re.Pattern:return re.compile(self.install_directory_name_regex)
1
2
1
18
0
97
98
97
self
[]
re.Pattern
{"Return": 1}
1
2
1
["re.compile"]
0
[]
The function (get_install_directory_regex) defined within the protected class called _InstallBuilderSearchConfig.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 func...
aws-deadline_deadline-cloud
_InstallBuilderEdition
protected
0
1
from_str
def from_str(edition: str):if edition == "Professional":return _InstallBuilderEdition.PROFESSIONALelif edition == "Enterprise":return _InstallBuilderEdition.ENTERPRISEelif edition == "For Windows":return _InstallBuilderEdition.WINDOWSelif edition == "For OS X":return _InstallBuilderEdition.OSXelif edition == "":return ...
6
13
1
60
0
122
134
122
edition
[]
Returns
{"If": 5, "Return": 5}
1
13
1
["ValueError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.find_installbuilder_py._get_default_installbuilder_location"]
The function (from_str) defined within the protected class called _InstallBuilderEdition, that inherit another class.The function start at line 122 and ends at 134. It contains 13 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It decla...
aws-deadline_deadline-cloud
_InstallBuilderInstallation
protected
0
0
_sort_key
def _sort_key(install: "_InstallBuilderInstallation") -> tuple[int, int, int, int]:# Prioritize Enterprise, then Professional, then any other editionedition_priority = {_InstallBuilderEdition.ENTERPRISE: 0,_InstallBuilderEdition.PROFESSIONAL: 1,}edition_value = edition_priority.get(install.edition, 2)return (-install.v...
1
12
1
72
0
151
163
151
install
[]
tuple[int, int, int, int]
{"Assign": 2, "Return": 1}
1
13
1
["edition_priority.get"]
0
[]
The function (_sort_key) defined within the protected class called _InstallBuilderInstallation.The function start at line 151 and ends at 163. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h...
aws-deadline_deadline-cloud
public
public
0
0
_get_default_installbuilder_location
def _get_default_installbuilder_location() -> Path:"""Returns the default location where InstallBuilder Professional will be installed depending on the platform."""if platform.system() not in _INSTALL_BUILDER_SEARCH_CONFIGS:raise UnsupportedOSError(f"Unsupported OS for building installer: {platform.system()}")config = ...
9
29
0
202
5
166
197
166
['config', 'version_offset', 'installation', 'candidates', 'match']
Path
{"Assign": 6, "Expr": 3, "For": 1, "If": 5, "Return": 1}
24
32
24
["platform.system", "UnsupportedOSError", "platform.system", "platform.system", "config.parent_path.iterdir", "install_dir.is_dir", "match", "config.get_install_directory_regex", "is_file", "platform.system", "_InstallBuilderInstallation", "_Semver", "int", "match.group", "int", "match.group", "int", "match.group", "_I...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.find_installbuilder_py.InstallBuilderSelection.resolve_install_builder_installation"]
The function (_get_default_installbuilder_location) defined within the public class called public.The function start at line 166 and ends at 197. It contains 29 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 24.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
main
def main(archive_path: Path, output_path: Path) -> None:"""Extracts the archive file to the output directory."""shutil.unpack_archive(archive_path, output_path)
1
2
2
22
0
22
24
22
archive_path,output_path
[]
None
{"Expr": 2}
4
3
4
["shutil.unpack_archive", "click.command", "click.option", "click.option"]
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 22 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [22.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside w...
aws-deadline_deadline-cloud
public
public
0
0
_get_desired_python_version
def _get_desired_python_version() -> str:if platform.system() == "Darwin":return "3.12"elif platform.system() == "Windows":return "3.10"elif platform.system() == "Linux":return "3.9"raise RuntimeError("Platform not supported")
4
8
0
44
0
151
158
151
[]
str
{"If": 3, "Return": 3}
4
8
4
["platform.system", "platform.system", "platform.system", "RuntimeError"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_py._PackageLicenseInfo._get_dist_info_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_...
The function (_get_desired_python_version) defined within the public class called public.The function start at line 151 and ends at 158. It contains 8 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 4.0 functions, It has 4.0 fun...
aws-deadline_deadline-cloud
PythonInstall
public
0
0
__init__
def __init__(self, arg: str, version: str, dev: bool):"""Create a python installation based in the passed in --python argumentIf the argument was "mise", query mise for an installed python interpreter of the desired version (only allowed in dev mode)If the argument was "uv", let uv install the desired python version (o...
8
30
4
142
0
166
203
166
self,arg,version,dev
[]
None
{"Assign": 9, "Expr": 1, "If": 7}
11
38
11
["PythonInstall._get_mise_interpreter_path", "RuntimeError", "Path", "interpreter_path.is_file", "RuntimeError", "subprocess.check_output", "_PYTHON_VERSION_REGEX.match", "RuntimeError", "version_match.group", "version_match.group", "RuntimeError"]
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 PythonInstall.The function start at line 166 and ends at 203. It contains 30 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [166.0] and does not return any value. It declares 11.0 functions, It has 11.0 function...
aws-deadline_deadline-cloud
PythonInstall
public
0
0
_get_mise_interpreter_path
def _get_mise_interpreter_path(version: str, dev: bool) -> Path:if not dev:raise RuntimeError("Cannot use mise for Python interpreter outside of dev mode")python_install_path = Path(subprocess.check_output(["mise", "where", f"python@{version}"], text=True).strip())if not python_install_path.is_dir():raise RuntimeError(...
4
15
2
85
0
206
221
206
version,dev
[]
Path
{"Assign": 3, "If": 3, "Return": 1}
7
16
7
["RuntimeError", "Path", "strip", "subprocess.check_output", "python_install_path.is_dir", "RuntimeError", "platform.system"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_py.PythonInstall.__init__"]
The function (_get_mise_interpreter_path) defined within the public class called PythonInstall.The function start at line 206 and ends at 221. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [206.0] and does not return any value. It declares 7.0 functions, It ...
aws-deadline_deadline-cloud
PythonInstall
public
0
0
get_uv_venv_python_args
def get_uv_venv_python_args(self) -> list[str]:if self._dev:if self._interpreter_path is None:return ["--python", self._version]else:return ["--python",str(self._interpreter_path),"--python-preference","only-system","--no-python-downloads",]else:return ["--python",str(self._interpreter_path),"--python-preference","only...
3
20
1
70
0
223
242
223
self
[]
list[str]
{"If": 2, "Return": 3}
2
20
2
["str", "str"]
0
[]
The function (get_uv_venv_python_args) defined within the public class called PythonInstall.The function start at line 223 and ends at 242. It contains 20 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It ha...
aws-deadline_deadline-cloud
public
public
0
0
uv_pip
def uv_pip(args: list[str], venv: Path) -> None:"""Convenience function that calls `uv pip [args]` against the virtual envrionment at a given Path"""subprocess.check_call(["uv", "pip", *args], env={**os.environ, "VIRTUAL_ENV": str(venv)})
1
2
2
46
0
245
249
245
args,venv
[]
None
{"Expr": 2}
2
5
2
["subprocess.check_call", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_py._get_license_info"]
The function (uv_pip) defined within the public class called public.The function start at line 245 and ends at 249. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [245.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called ins...
aws-deadline_deadline-cloud
public
public
0
0
_get_sha256
def _get_sha256(text: str) -> str:return hashlib.sha256(text.encode("utf8")).hexdigest()
1
2
1
25
0
252
253
252
text
[]
str
{"Return": 1}
3
2
3
["hexdigest", "hashlib.sha256", "text.encode"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_py._PackageLicenseInfo.get_license_sha256", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_p...
The function (_get_sha256) defined within the public class called public.The function start at line 252 and ends at 253. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called in...
aws-deadline_deadline-cloud
PythonInstall
public
0
0
__init__
def __init__(self, venv: Path, pip_license_info: dict[str, str]):name = pip_license_info["Name"]version = pip_license_info["Version"]if name == "UNKNOWN":raise RuntimeError("Package missing name")self.name = nameif version == "UNKNOWN":raise RuntimeError(f"Package {name} missing version")self.version = versiondiscovere...
7
25
3
146
0
263
293
263
self,arg,version,dev
[]
None
{"Assign": 9, "Expr": 1, "If": 7}
11
38
11
["PythonInstall._get_mise_interpreter_path", "RuntimeError", "Path", "interpreter_path.is_file", "RuntimeError", "subprocess.check_output", "_PYTHON_VERSION_REGEX.match", "RuntimeError", "version_match.group", "version_match.group", "RuntimeError"]
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 PythonInstall.The function start at line 263 and ends at 293. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [263.0] and does not return any value. It declares 11.0 functions, It has 11.0 function...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
_get_license_text_override
def _get_license_text_override(self, venv: Path) -> Optional[str]:if self.name not in _LICENSE_PATH_OVERRIDES:return Nonedist_info_path = self._get_dist_info_path(venv)if not dist_info_path.is_dir():raise RuntimeError(f".dist-info path for {self.name} does not exist")with open(dist_info_path / _LICENSE_PATH_OVERRIDES[s...
3
8
2
73
0
295
302
295
self,venv
[]
Optional[str]
{"Assign": 1, "If": 2, "Return": 2, "With": 1}
5
8
5
["self._get_dist_info_path", "dist_info_path.is_dir", "RuntimeError", "open", "f.read"]
0
[]
The function (_get_license_text_override) defined within the protected class called _PackageLicenseInfo.The function start at line 295 and ends at 302. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [295.0] and does not return any value. It declares 5.0 functi...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
_get_notice_text_override
def _get_notice_text_override(self, venv: Path) -> Optional[str]:if self.name not in _NOTICE_PATH_OVERRIDES:return Nonedist_info_path = self._get_dist_info_path(venv)if not dist_info_path.is_dir():raise RuntimeError(f".dist-info path for {self.name} does not exist")with open(dist_info_path / _NOTICE_PATH_OVERRIDES[self...
3
8
2
73
0
304
311
304
self,venv
[]
Optional[str]
{"Assign": 1, "If": 2, "Return": 2, "With": 1}
5
8
5
["self._get_dist_info_path", "dist_info_path.is_dir", "RuntimeError", "open", "f.read"]
0
[]
The function (_get_notice_text_override) defined within the protected class called _PackageLicenseInfo.The function start at line 304 and ends at 311. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [304.0] and does not return any value. It declares 5.0 functio...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
check_against_attributions_allow_list
def check_against_attributions_allow_list(self) -> None:if self.name not in _ATTRIBUTIONS_ALLOW_LIST:raise RuntimeError(f"Package {self.name} is not in the allow list for the attributions document")license_sha256 = self.get_license_sha256()license_sha256_version_key = f"license_sha256_{_get_desired_python_version()}"if...
11
30
1
161
0
313
344
313
self
[]
None
{"Assign": 5, "If": 7, "Return": 1}
8
32
8
["RuntimeError", "self.get_license_sha256", "_get_desired_python_version", "RuntimeError", "self.get_notice_sha256", "RuntimeError", "RuntimeError", "RuntimeError"]
0
[]
The function (check_against_attributions_allow_list) defined within the protected class called _PackageLicenseInfo.The function start at line 313 and ends at 344. It contains 30 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 8...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
get_attribution_text
def get_attribution_text(self) -> str:if self.notice_text is None:notice_text = "\n"else:notice_text = f"\n{self.notice_text}\n"return f"{self.name}\n\n{self.license_text}{notice_text}"
2
6
1
26
0
346
352
346
self
[]
str
{"Assign": 2, "If": 1, "Return": 1}
0
7
0
[]
0
[]
The function (get_attribution_text) defined within the protected class called _PackageLicenseInfo.The function start at line 346 and ends at 352. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
get_license_sha256
def get_license_sha256(self) -> str:return _get_sha256(self.license_text)
1
2
1
14
0
354
355
354
self
[]
str
{"Return": 1}
1
2
1
["_get_sha256"]
0
[]
The function (get_license_sha256) defined within the protected class called _PackageLicenseInfo.The function start at line 354 and ends at 355. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
get_notice_sha256
def get_notice_sha256(self) -> Optional[str]:if self.notice_text is not None:return _get_sha256(self.notice_text)return None
2
4
1
27
0
357
360
357
self
[]
Optional[str]
{"If": 1, "Return": 2}
1
4
1
["_get_sha256"]
0
[]
The function (get_notice_sha256) defined within the protected class called _PackageLicenseInfo.The function start at line 357 and ends at 360. It contains 4 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 ha...
aws-deadline_deadline-cloud
_PackageLicenseInfo
protected
0
0
_get_dist_info_path
def _get_dist_info_path(self, venv: Path) -> Path:if platform.system() == "Windows":return venv / "Lib" / "site-packages" / f"{self.name}-{self.version}.dist-info"else:return (venv/ "lib"/ f"python{_get_desired_python_version()}"/ "site-packages"/ f"{self.name}-{self.version}.dist-info")
2
11
2
45
0
362
372
362
self,venv
[]
Path
{"If": 1, "Return": 2}
2
11
2
["platform.system", "_get_desired_python_version"]
0
[]
The function (_get_dist_info_path) defined within the protected class called _PackageLicenseInfo.The function start at line 362 and ends at 372. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [362.0] and does not return any value. It declares 2.0 functions, a...
aws-deadline_deadline-cloud
public
public
0
0
_get_license_info
def _get_license_info(python_interpreter: PythonInstall) -> list[_PackageLicenseInfo]:repository_root = Path(__file__).parent.parent.parentwith tempfile.TemporaryDirectory() as td:temp = Path(td)venv = temp / ".venv"python_args = python_interpreter.get_uv_venv_python_args()uv_venv_args = ["uv", "venv", venv, *python_ar...
13
54
1
243
11
375
431
375
python_interpreter
['temp', 'uv_venv_args', 'license_text', 'repository_root', 'venv', 'pip_licenses_parsed', 'name', 'python_args', 'notice_text', 'pip_licenses_output', 'python_path']
list[_PackageLicenseInfo]
{"Assign": 13, "Expr": 2, "For": 1, "If": 4, "Return": 1, "With": 1}
13
57
13
["Path", "tempfile.TemporaryDirectory", "Path", "python_interpreter.get_uv_venv_python_args", "subprocess.check_call", "uv_pip", "platform.system", "subprocess.check_output", "json.loads", "RuntimeError", "RuntimeError", "RuntimeError", "_PackageLicenseInfo"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.attributions.cli_py.generate_attributions_document"]
The function (_get_license_info) defined within the public class called public.The function start at line 375 and ends at 431. 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 13.0 functions, It has 13.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
generate_attributions_document
def generate_attributions_document(out_file: Path, python_arg: Optional[str], dev: bool) -> None:"""Generate an attributions document for this package and write it to `out_file`"""desired_python_version = _get_desired_python_version()python_install = PythonInstall(python_arg, desired_python_version, dev)license_info = ...
3
17
3
135
5
434
456
434
out_file,python_arg,dev
['python_install', 'attributions', 'license_info', 'additional_attributions_path', 'desired_python_version']
None
{"Assign": 6, "Expr": 5, "For": 2, "With": 2}
13
23
13
["_get_desired_python_version", "PythonInstall", "_get_license_info", "package.check_against_attributions_allow_list", "attributions.append", "package.get_attribution_text", "Path", "open", "attributions.append", "f.read", "join", "open", "f.write"]
0
[]
The function (generate_attributions_document) defined within the public class called public.The function start at line 434 and ends at 456. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [434.0] and does not return any value. It declares 13.0 functions, and ...
aws-deadline_deadline-cloud
public
public
0
0
make_exe
def make_exe(exe_zipfile: Path, cleanup=True) -> None:clean_pyinstaller_build_dirs()# Create Deadline CLI distpyinstaller(str(DEADLINE_CLI_SPEC_PATH))# Create Deadline CLI wrapper distos.environ["PYINSTALLER_DEADLINE_CLI_DIST_PATH"] = str(DEADLINE_CLI_DIST_PATH)pyinstaller(str(DEADLINE_SPEC_PATH))# Sometimes the files ...
4
12
2
101
0
40
64
40
exe_zipfile,cleanup
[]
None
{"Assign": 1, "Expr": 7, "For": 2, "If": 1}
14
25
14
["clean_pyinstaller_build_dirs", "pyinstaller", "str", "str", "pyinstaller", "str", "os.walk", "touch", "Path", "shutil.make_archive", "exe_zipfile.with_suffix", "clean_pyinstaller_build_dirs", "print", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.make_exe_py.main"]
The function (make_exe) defined within the public class called public.The function start at line 40 and ends at 64. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 14.0 functions, It has 14.0 functions called i...
aws-deadline_deadline-cloud
public
public
0
0
pyinstaller
def pyinstaller(*args: tuple):if "--onefile" in args or "-F" in args:raise Exception("Cannot use --onefile/-F option for PyInstaller due to libreadline being licensed under GPL")################################# WARNING ################################### Do not change this to use one-file mode (do not add `--onefile` ...
3
6
1
41
0
67
80
67
*args
[]
None
{"Expr": 1, "If": 1}
2
14
2
["Exception", "subprocess.run"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.make_exe_py.make_exe"]
The function (pyinstaller) defined within the public class called public.The function start at line 67 and ends at 80. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called insi...
aws-deadline_deadline-cloud
public
public
0
0
clean_pyinstaller_build_dirs
def clean_pyinstaller_build_dirs():for location in [PYINSTALLER_BUILD_DIR,PYINSTALLER_DIST_DIR,]:shutil.rmtree(location, ignore_errors=True)print(f"Deleted build directory: {str(location)}")
2
7
0
29
0
83
89
83
[]
None
{"Expr": 2, "For": 1}
3
7
3
["shutil.rmtree", "print", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.make_exe_py.make_exe"]
The function (clean_pyinstaller_build_dirs) defined within the public class called public.The function start at line 83 and ends at 89. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 func...
aws-deadline_deadline-cloud
public
public
0
0
main
def main() -> None:parser = argparse.ArgumentParser(description=__doc__)parser.add_argument("--output",default=str(ROOT / "dist" / DEFAULT_OUTPUT_ZIP),help=("The name of the file to save the exe zip. By default, "f"this will be saved in 'dist/{DEFAULT_OUTPUT_ZIP}' directory in the root of the ""DeadlineClient."),)parse...
1
20
0
93
3
92
113
92
['parser', 'args', 'output']
None
{"Assign": 3, "Expr": 3}
8
22
8
["argparse.ArgumentParser", "parser.add_argument", "str", "parser.add_argument", "parser.parse_args", "absolute", "Path", "make_exe"]
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 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside wh...
aws-deadline_deadline-cloud
public
public
0
0
temp_zip_contents
def temp_zip_contents(zip_path: Path) -> Generator[Path, None, None]:"""Context manager that temporarily extracts the contents of a zipfile to a temporary directory, yielding the path to the temporarydirectory"""with tempfile.TemporaryDirectory() as td:temp = Path(td)with zipfile.ZipFile(zip_path, "r") as zip:zip.extra...
1
6
1
52
1
26
36
26
zip_path
['temp']
Generator[Path, None, None]
{"Assign": 1, "Expr": 3, "With": 2}
4
11
4
["tempfile.TemporaryDirectory", "Path", "zipfile.ZipFile", "zip.extractall"]
0
[]
The function (temp_zip_contents) defined within the public class called public.The function start at line 26 and ends at 36. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
_get_pyinstaller_contents_info
def _get_pyinstaller_contents_info(archive_path: Path) -> list[str]:"""Uses pyi-archive_viewer to list the contents of a pyi-archive_viewer compatiblearchive such as a pyinstaller generated executable or .pyz file"""archive_list = subprocess.check_output(["pyi-archive_viewer", "--list", "--brief", str(archive_path)], t...
8
29
1
144
3
45
91
45
archive_path
['state', 'archive_list', 'items']
list[str]
{"Assign": 5, "Expr": 2, "For": 1, "If": 6, "Return": 1}
10
47
10
["subprocess.check_output", "str", "archive_list.splitlines", "_PYI_CONTENTS_HEADER_REGEX.match", "line.strip", "items.append", "line.strip", "RuntimeError", "RuntimeError", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.temp_pyinstaller_archive_contents"]
The function (_get_pyinstaller_contents_info) defined within the public class called public.The function start at line 45 and ends at 91. It contains 29 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0...
aws-deadline_deadline-cloud
public
public
0
0
temp_pyinstaller_archive_contents
def temp_pyinstaller_archive_contents(archive_path: Path) -> Generator[Path, None, None]:"""Context manager to temporarily extract the contents of a pyi-archive_viewer compatiblearchive (such as a pyinstaller generated executable or .pyz file) to a temporary directory"""archive_contents = _get_pyinstaller_contents_info...
6
28
1
192
3
95
137
95
archive_path
['temp', 'archive_contents', 'process']
Generator[Path, None, None]
{"Assign": 4, "Expr": 10, "For": 3, "If": 2, "With": 1}
18
43
18
["_get_pyinstaller_contents_info", "tempfile.TemporaryDirectory", "Path", "itertools.batched", "subprocess.Popen", "process.stdin.write", "process.stdin.flush", "process.stdin.write", "str", "process.stdin.flush", "process.stdin.write", "process.stdin.flush", "process.communicate", "print", "print", "RuntimeError", "is...
0
[]
The function (temp_pyinstaller_archive_contents) defined within the public class called public.The function start at line 95 and ends at 137. It contains 28 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 18.0 functions, and It...
aws-deadline_deadline-cloud
public
public
0
0
calculate_sha256
def calculate_sha256(filepath: Path) -> str:"""Calculated the sha256 of a file at a given path"""sha256 = hashlib.sha256()with open(filepath, "rb") as f:while True:data = f.read(_BLOCK_SIZE)if not data:breaksha256.update(data)return sha256.hexdigest()
3
9
1
55
2
140
151
140
filepath
['sha256', 'data']
str
{"Assign": 2, "Expr": 2, "If": 1, "Return": 1, "While": 1, "With": 1}
5
12
5
["hashlib.sha256", "open", "f.read", "sha256.update", "sha256.hexdigest"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.apply_allowlist"]
The function (calculate_sha256) defined within the public class called public.The function start at line 140 and ends at 151. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions call...
aws-deadline_deadline-cloud
public
public
0
0
rglob_files_only
def rglob_files_only(basepath: Path, glob: str) -> list[Path]:"""call rglob on a given path, but filter out anything that isn't a file"""return [filepath for filepath in basepath.rglob(glob) if filepath.is_file()]
3
2
2
36
0
154
158
154
basepath,glob
[]
list[Path]
{"Expr": 1, "Return": 1}
2
5
2
["basepath.rglob", "filepath.is_file"]
0
[]
The function (rglob_files_only) defined within the public class called public.The function start at line 154 and ends at 158. It contains 2 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [154.0] and does not return any value. It declares 2.0 functions, and It has 2.0 funct...
aws-deadline_deadline-cloud
public
public
0
0
_re_raise
def _re_raise(e: Exception) -> None:raise e
1
2
1
11
0
161
162
161
e
[]
None
{}
0
2
0
[]
0
[]
The function (_re_raise) defined within the public class called public.The function start at line 161 and ends at 162. 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
enumerate_directory
def enumerate_directory(dirpath: Path) -> list[Path]:result = []for root, dirs, files in dirpath.walk(follow_symlinks=False, on_error=_re_raise):for name in files:result.append((root / name).relative_to(dirpath))return result
3
6
1
58
1
165
170
165
dirpath
['result']
list[Path]
{"Assign": 1, "Expr": 1, "For": 2, "Return": 1}
3
6
3
["dirpath.walk", "result.append", "relative_to"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.Allowlist.get_allowed_files"]
The function (enumerate_directory) defined within the public class called public.The function start at line 165 and ends at 170. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions c...
aws-deadline_deadline-cloud
public
public
0
0
rglob_file_list
def rglob_file_list(files: list[Path], glob: str) -> list[Path]:result = []for filepath in files:if fnmatch.fnmatch(str(filepath), glob):result.append(filepath)return result
3
6
2
49
1
173
178
173
files,glob
['result']
list[Path]
{"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 1}
3
6
3
["fnmatch.fnmatch", "str", "result.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.Allowlist.get_allowed_files"]
The function (rglob_file_list) defined within the public class called public.The function start at line 173 and ends at 178. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [173.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions c...
aws-deadline_deadline-cloud
Allowlist
public
0
0
from_dict
def from_dict(raw: dict[str, Any]) -> "Allowlist":files = []globs = []for dep in [*DEPENDENCIES, *STANDARD_LIBRARY_MODULES]:files.extend([Path(dep),Path(f"{dep}.pyc"),])globs.extend([f"{dep}.*",f"{dep}/*",f"**/{dep}.pyd",f"**/_{dep}.pyd",f"_internal/cli/_internal/{dep}-*.dist-info/**/*",f"_internal/cli/_internal/{dep}-...
6
44
1
194
0
218
262
218
raw
[]
'Allowlist'
{"Assign": 3, "Expr": 4, "For": 1, "Return": 1}
15
45
15
["files.extend", "Path", "Path", "globs.extend", "files.extend", "Path", "raw.get", "globs.extend", "raw.get", "Path", "AllowlistCondition", "condition.get", "Allowlist.from_dict", "items", "Allowlist"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.Allowlist.from_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.cli", "_....
The function (from_dict) defined within the public class called Allowlist.The function start at line 218 and ends at 262. It contains 44 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 15.0 functions, It has 15.0 functions calle...
aws-deadline_deadline-cloud
Allowlist
public
0
0
get_allowed_files
def get_allowed_files(self, root: Path) -> AllowlistReport:all_files = enumerate_directory(root)allowed_files = []remaining_files = set(all_files)for file in all_files:if file in self.files:allowed_files.append(file)remaining_files.remove(file)for glob in self.globs:globbed = rglob_file_list(list(remaining_files), glob...
6
19
2
106
0
264
285
264
self,root
[]
AllowlistReport
{"Assign": 4, "Expr": 4, "For": 3, "If": 2, "Return": 1}
11
22
11
["enumerate_directory", "set", "allowed_files.append", "remaining_files.remove", "rglob_file_list", "list", "remaining_files.remove", "allowed_files.extend", "len", "AllowlistReport", "list"]
0
[]
The function (get_allowed_files) defined within the public class called Allowlist.The function start at line 264 and ends at 285. It contains 19 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [264.0] and does not return any value. It declares 11.0 functions, and It has 11....
aws-deadline_deadline-cloud
public
public
0
0
_prepend_if_not_none
def _prepend_if_not_none(context: Optional[Path], suffix: Path) -> Path:if context is None:return suffixreturn context / suffix
2
4
2
27
0
288
291
288
context,suffix
[]
Path
{"If": 1, "Return": 2}
0
4
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py._get_extraction_manager", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.apply...
The function (_prepend_if_not_none) defined within the public class called public.The function start at line 288 and ends at 291. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [288.0] and does not return any value. It has 2.0 functions calling this function w...
aws-deadline_deadline-cloud
public
public
0
0
_get_extraction_manager
def _get_extraction_manager(archive_path: Path, context: Optional[Path]) -> Callable[[Path], Generator[Path, None, None]]:extension = archive_path.suffixif extension == ".zip":return temp_zip_contentselif extension == ".pyz" or extension == ".exe" or not extension:return temp_pyinstaller_archive_contentselse:raise Runt...
5
12
2
64
1
294
305
294
archive_path,context
['extension']
Callable[[Path], Generator[Path, None, None]]
{"Assign": 1, "If": 2, "Return": 2}
2
12
2
["RuntimeError", "_prepend_if_not_none"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.apply_allowlist"]
The function (_get_extraction_manager) defined within the public class called public.The function start at line 294 and ends at 305. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [294.0] and does not return any value. It declares 2.0 functions, It has 2.0 fu...
aws-deadline_deadline-cloud
public
public
0
0
apply_allowlist
def apply_allowlist(archive_path: Path, allowlist: Allowlist, context: Optional[Path]) -> list[str]:print(f"Extracting: {archive_path}")with _get_extraction_manager(archive_path, context)(archive_path) as temp:allowlist_report = allowlist.get_allowed_files(temp)failures = [f"Found file {_prepend_if_not_none(context, di...
7
26
3
146
4
308
334
308
archive_path,allowlist,context
['calculated', 'failures', 'allowlist_report', 'condition']
list[str]
{"Assign": 4, "Expr": 3, "For": 1, "If": 4, "Return": 1, "With": 1}
10
27
10
["print", "_get_extraction_manager", "allowlist.get_allowed_files", "_prepend_if_not_none", "calculate_sha256", "failures.append", "_prepend_if_not_none", "failures.extend", "apply_allowlist", "_prepend_if_not_none"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.apply_allowlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.scripts.pyinstaller.validate_py.cli"]
The function (apply_allowlist) defined within the public class called public.The function start at line 308 and ends at 334. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [308.0] and does not return any value. It declares 10.0 functions, It has 10.0 function...
aws-deadline_deadline-cloud
public
public
0
0
cli
def cli() -> None:parser = argparse.ArgumentParser()parser.add_argument("--zip-path",type=Path,required=False,help="The path to where the pyinstaller output zip can be found.",)args = parser.parse_args()repository_root = Path(__file__).parent.parent.parentif args.zip_path is None:zip_path = repository_root / "dist" / "...
4
21
0
115
6
337
362
337
['parser', 'args', 'zip_path', 'repository_root', 'allowlist', 'failures']
None
{"Assign": 7, "Expr": 4, "For": 1, "If": 2}
10
26
10
["argparse.ArgumentParser", "parser.add_argument", "parser.parse_args", "Path", "Allowlist.from_dict", "apply_allowlist", "print", "len", "exit", "print"]
154
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69860788_ceph_ceph_nvmeof.tests.test_big_omap_py.change_namespace_lb_group", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69860788_ceph_ceph_nvmeof.tests.test_big_omap_py.create_listeners", "_.content.gdrive.MyDriv...
The function (cli) defined within the public class called public.The function start at line 337 and ends at 362. It contains 21 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 functions called inside ...
aws-deadline_deadline-cloud
public
public
0
0
get_tool_definition
def get_tool_definition(tool_name: str) -> ToolDefinition:"""Get the definition for a specific tool."""if tool_name not in TOOL_REGISTRY:raise ValueError(f"Tool '{tool_name}' not found in registry")return TOOL_REGISTRY[tool_name]
2
4
1
27
0
18
22
18
tool_name
[]
ToolDefinition
{"Expr": 1, "If": 1, "Return": 1}
1
5
1
["ValueError"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline._mcp.utils_py.register_api_tools", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.deadline_mcp.test_mcp_server_integra...
The function (get_tool_definition) defined within the public class called public.The function start at line 18 and ends at 22. It contains 4 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 called...
aws-deadline_deadline-cloud
public
public
0
0
get_all_tool_names
def get_all_tool_names() -> List[str]:"""Get all registered tool names."""return list(TOOL_REGISTRY.keys())
1
2
0
19
0
25
27
25
[]
List[str]
{"Expr": 1, "Return": 1}
2
3
2
["list", "TOOL_REGISTRY.keys"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline._mcp.utils_py.register_api_tools"]
The function (get_all_tool_names) defined within the public class called public.The function start at line 25 and ends at 27. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions call...
aws-deadline_deadline-cloud
public
public
0
0
main
def main():app.run()
1
2
0
9
0
12
13
12
[]
None
{"Expr": 1}
1
2
1
["app.run"]
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 13. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which i...
aws-deadline_deadline-cloud
public
public
0
0
_default_serializer
def _default_serializer(obj: Any) -> Any:"""Default serializer for API responses."""if hasattr(obj, "__dict__"):return obj.__dict__elif hasattr(obj, "to_dict"):return obj.to_dict()return str(obj)
3
6
1
41
0
19
25
19
obj
[]
Any
{"Expr": 1, "If": 2, "Return": 3}
4
7
4
["hasattr", "hasattr", "obj.to_dict", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_mcp.test_mcp_py.TestUtilityFunctions.test_default_serializer"]
The function (_default_serializer) defined within the public class called public.The function start at line 19 and ends at 25. It contains 6 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 4.0 functions, It has 4.0 functions cal...
aws-deadline_deadline-cloud
public
public
0
0
_default_error_handler
def _default_error_handler(e: Exception) -> Dict:"""Default error handler for API calls."""error_info = {"error": str(e), "type": type(e).__name__}if hasattr(e, "response") and hasattr(e.response, "status_code"):error_info["status_code"] = e.response.status_codelogger.error(f"API tool error: {error_info}", exc_info=Tru...
3
6
1
69
1
28
34
28
e
['error_info']
Dict
{"Assign": 2, "Expr": 2, "If": 1, "Return": 1}
5
7
5
["str", "type", "hasattr", "hasattr", "logger.error"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_mcp.test_mcp_py.TestUtilityFunctions.test_default_error_handler"]
The function (_default_error_handler) defined within the public class called public.The function start at line 28 and ends at 34. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
_create_wrapper.wrapper
def wrapper(**kwargs) -> dict:start_t = time.perf_counter_ns()success = Trueerror_type = Nonetry:# Filter out empty/null values that MCP clients might sendfiltered_kwargs = {k: v for k, v in kwargs.items() if v not in (None, "", "null")}# Type conversion now handled by preserving original function annotations# Add conf...
6
38
1
193
0
68
117
68
null
[]
None
null
0
0
0
null
0
null
The function (_create_wrapper.wrapper) defined within the public class called public.The function start at line 68 and ends at 117. It contains 38 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
_create_wrapper
def _create_wrapper(config: ToolDefinition, serializer: Callable, error_handler: Callable) -> Callable:"""Create a wrapper function based on the tool configuration."""func = config["func"]param_names = config["param_names"]# Inspect signature once and reusefunc_sig = inspect.signature(func)if param_names is None:param_...
6
26
3
132
12
37
120
37
config,serializer,error_handler
['success', 'has_config_param', 'result', 'telemetry_client', 'signature', 'func_sig', 'param_names', 'func', 'filtered_kwargs', 'latency', 'error_type', 'start_t']
Callable
{"Assign": 18, "Expr": 4, "If": 2, "Return": 2, "Try": 2}
16
84
16
["inspect.signature", "func_sig.parameters.keys", "inspect.Signature", "inspect.Parameter", "time.perf_counter_ns", "kwargs.items", "json.loads", "json.dumps", "func", "type", "error_handler", "get_deadline_cloud_library_telemetry_client", "time.perf_counter_ns", "telemetry_client.record_event", "telemetry_client.recor...
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline._mcp.utils_py.register_api_tools", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_mcp.test_mcp_py.TestParamete...
The function (_create_wrapper) defined within the public class called public.The function start at line 37 and ends at 120. It contains 26 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [37.0] and does not return any value. It declares 16.0 functions, It has 16.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
register_api_tools
def register_api_tools(app: FastMCP,tools: Optional[List[Callable]] = None,prefix: str = "",error_handler: Optional[Callable] = None,serializer: Optional[Callable] = None,) -> None:"""Register API tools with the MCP server.Args:app: FastMCP application instancetools: Optional list of specific functions to register. If ...
13
42
5
263
7
123
187
123
app,tools,prefix,error_handler,serializer
['config', 'wrapper', 'description', 'tool_name', 'func', 'serializer', 'error_handler']
None
{"Assign": 18, "Expr": 3, "For": 3, "If": 6}
15
65
15
["callable", "ValueError", "hasattr", "get_all_tool_names", "get_tool_definition", "ValueError", "get_tool_definition", "_create_wrapper", "app.tool", "get_all_tool_names", "get_tool_definition", "callable", "hasattr", "_create_wrapper", "app.tool"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_mcp.test_mcp_py.TestRegisterAPITools.test_basic_registration", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.dea...
The function (register_api_tools) defined within the public class called public.The function start at line 123 and ends at 187. It contains 42 lines of code and it has a cyclomatic complexity of 13. It takes 5 parameters, represented as [123.0] and does not return any value. It declares 15.0 functions, It has 15.0 func...
aws-deadline_deadline-cloud
public
public
0
0
submit_job
def submit_job(job_bundle_dir: str,job_parameters: Optional[str] = None,name: Optional[str] = None,farm_id: Optional[str] = None,queue_id: Optional[str] = None,storage_profile_id: Optional[str] = None,priority: Optional[int] = 50,max_failed_tasks_count: Optional[int] = None,max_retries_per_task: Optional[int] = None,ma...
14
68
14
424
9
21
125
21
job_bundle_dir,job_parameters,name,farm_id,queue_id,storage_profile_id,priority,max_failed_tasks_count,max_retries_per_task,max_worker_count,job_attachments_file_system,require_paths_exist,submitter_name,known_asset_paths
['config', 'farm_id', 'storage_profile_id', 'total_time', 'job_id', 'parsed_job_parameters', 'start_time', 'queue_id', 'parsed_known_asset_paths']
Dict[str, Any]
{"Assign": 11, "Expr": 4, "If": 9, "Return": 1}
23
105
23
["time.time", "os.path.exists", "ValueError", "os.path.isdir", "ValueError", "json.loads", "isinstance", "ValueError", "json.loads", "isinstance", "ValueError", "config_file.read_config", "config.get", "config.get", "config.get", "ValueError", "ValueError", "config.set", "config.set", "config.set", "create_job_from_job...
0
[]
The function (submit_job) defined within the public class called public.The function start at line 21 and ends at 125. It contains 68 lines of code and it has a cyclomatic complexity of 14. It takes 14 parameters, represented as [21.0] and does not return any value. It declares 23.0 functions, and It has 23.0 function...
aws-deadline_deadline-cloud
public
public
0
0
download_job_output
def download_job_output(farm_id: Optional[str] = None,queue_id: Optional[str] = None,job_id: Optional[str] = None,step_id: Optional[str] = None,task_id: Optional[str] = None,conflict_resolution: Optional[str] = None,) -> Dict[str, Any]:"""Download job output files from AWS Deadline Cloud.Args:farm_id: Farm ID (uses def...
10
51
6
321
5
128
198
128
farm_id,queue_id,job_id,step_id,task_id,conflict_resolution
['config', 'captured_output', 'output_text', 'total_time', 'start_time']
Dict[str, Any]
{"Assign": 5, "Expr": 8, "If": 5, "Return": 1, "With": 1}
25
71
25
["time.time", "ValueError", "ValueError", "conflict_resolution.upper", "ValueError", "config_file.read_config", "config.set", "config.get", "config.set", "config.get", "config.set", "config.has_section", "config.add_section", "config.set", "config.set", "conflict_resolution.upper", "io.StringIO", "redirect_stdout", "_d...
0
[]
The function (download_job_output) defined within the public class called public.The function start at line 128 and ends at 198. It contains 51 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [128.0] and does not return any value. It declares 25.0 functions, and It has 25....
aws-deadline_deadline-cloud
DeadlineOperationCanceled
public
0
1
__init__
def __init__(self, message: str = "Operation canceled"):super().__init__(message)
1
2
2
19
0
15
16
15
self,message
[]
None
{"Expr": 1}
2
2
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called DeadlineOperationCanceled, that inherit another class.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 declares ...
aws-deadline_deadline-cloud
DeadlineOperationCanceled
public
0
1
__init__
def __init__(self, message: str = "Operation canceled"):super().__init__(message)
1
2
2
19
0
22
23
15
self,message
[]
None
{"Expr": 1}
2
2
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called DeadlineOperationCanceled, that inherit another class.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 2 parameters, represented as [15.0] and does not return any value. It declares ...
aws-deadline_deadline-cloud
DeadlineOperationCanceled
public
0
1
__init__
def __init__(self, message: str = "Operation canceled"):super().__init__(message)
1
2
2
19
0
29
30
15
self,message
[]
None
{"Expr": 1}
2
2
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called DeadlineOperationCanceled, that inherit another class.The function start at line 29 and ends at 30. 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 declares ...
aws-deadline_deadline-cloud
DeadlineOperationCanceled
public
0
1
__init__
def __init__(self, message: str = "Operation canceled"):super().__init__(message)
1
2
2
19
0
36
37
15
self,message
[]
None
{"Expr": 1}
2
2
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called DeadlineOperationCanceled, that inherit another class.The function start at line 36 and ends at 37. 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 declares ...
aws-deadline_deadline-cloud
public
public
0
0
check_deadline_api_available
def check_deadline_api_available(config: Optional[ConfigParser] = None) -> bool:"""Returns True if AWS Deadline Cloud APIs are authorized in the session,False otherwise. This only checks the deadline:ListFarms API by performingone call with just one result.Args:config (ConfigParser, optional): The AWS Deadline Cloud co...
3
15
1
105
1
98
124
98
config
['deadline']
bool
{"AnnAssign": 1, "Assign": 3, "Expr": 3, "If": 1, "Return": 2, "Try": 1, "With": 1}
7
27
7
["_modified_logging_level", "logging.getLogger", "get_user_and_identity_store_id", "str", "get_boto3_client", "deadline.list_farms", "logger.exception"]
0
[]
The function (check_deadline_api_available) defined within the public class called public.The function start at line 98 and ends at 124. It contains 15 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 7.0 functions, and It has 7...
aws-deadline_deadline-cloud
public
public
0
0
get_storage_profile_for_queue
def get_storage_profile_for_queue(farm_id: str,queue_id: str,storage_profile_id: str,deadline: Optional[BaseClient] = None,config: Optional[ConfigParser] = None,) -> StorageProfile:if deadline is None:deadline = get_boto3_client("deadline", config=config)storage_profile_response = deadline.get_storage_profile_for_queue...
3
25
5
141
2
21
46
21
farm_id,queue_id,storage_profile_id,deadline,config
['storage_profile_response', 'deadline']
StorageProfile
{"Assign": 2, "If": 1, "Return": 1}
8
26
8
["get_boto3_client", "deadline.get_storage_profile_for_queue", "StorageProfile", "StorageProfileOperatingSystemFamily", "FileSystemLocation", "FileSystemLocationType", "storage_profile_response.get", "api.record_function_latency_telemetry_event"]
0
[]
The function (get_storage_profile_for_queue) defined within the public class called public.The function start at line 21 and ends at 46. It contains 25 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [21.0] and does not return any value. It declares 8.0 functions, and It ha...
aws-deadline_deadline-cloud
public
public
0
0
_hash_attachments._default_update_hash_progress
def _default_update_hash_progress(hashing_metadata: ProgressReportMetadata) -> bool:return True
1
2
1
11
0
29
30
29
null
[]
None
null
0
0
0
null
0
null
The function (_hash_attachments._default_update_hash_progress) defined within the public class called public.The function start at line 29 and ends at 30. 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
_hash_attachments
def _hash_attachments(asset_manager: S3AssetManager,asset_groups: List[AssetRootGroup],total_input_files: int,total_input_bytes: int,print_function_callback: Callable = lambda msg: None,hashing_progress_callback: Optional[Callable] = None,config: Optional[ConfigParser] = None,) -> Tuple[SummaryStatistics, List[AssetRoo...
3
35
7
171
1
15
59
15
asset_manager,asset_groups,total_input_files,total_input_bytes,print_function_callback,hashing_progress_callback,config
['hashing_progress_callback']
Tuple[SummaryStatistics, List[AssetRootManifest]]
{"Assign": 2, "Expr": 5, "If": 2, "Return": 2}
10
45
10
["asset_manager.hash_assets_and_create_manifest", "config_file.get_cache_directory", "record_hashing_summary", "api.get_deadline_cloud_library_telemetry_client", "print_function_callback", "print_function_callback", "textwrap.indent", "str", "hashing_progress_callback", "ProgressReportMetadata"]
2
["_.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.job_att...
The function (_hash_attachments) defined within the public class called public.The function start at line 15 and ends at 59. It contains 35 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [15.0] and does not return any value. It declares 10.0 functions, It has 10.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
wait_for_job_completion
def wait_for_job_completion(farm_id: str,queue_id: str,job_id: str,max_poll_interval: int = 120,timeout: int = 0,config: Optional[ConfigParser] = None,status_callback: Optional[Callable] = None,) -> JobCompletionResult:"""Wait for a job to complete and return information about its status and any failed tasks.This funct...
18
67
7
476
16
73
193
73
farm_id,queue_id,job_id,max_poll_interval,timeout,config,status_callback
['job', 'paginator', 'terminal_states', 'elapsed_time', 'deadline', 'failed_tasks', 'current_interval', 'status', 'session_id', 'step_name', 'task_paginator', 'start_time', 'parts', 'step_id', 'elapsed', 'latest_session_action_id']
JobCompletionResult
{"Assign": 20, "Expr": 4, "For": 4, "If": 9, "Return": 1, "Try": 2, "While": 1}
31
121
31
["get_boto3_client", "datetime.datetime.now", "total_seconds", "datetime.datetime.now", "DeadlineOperationTimedOut", "deadline.get_job", "job.get", "total_seconds", "datetime.datetime.now", "status_callback", "DeadlineOperationError", "time.sleep", "min", "total_seconds", "datetime.datetime.now", "deadline.get_paginato...
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.test_cli_incremental_download_py.IncrementalDownloadTest.wait_for_job_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_clo...
The function (wait_for_job_completion) defined within the public class called public.The function start at line 73 and ends at 193. It contains 67 lines of code and it has a cyclomatic complexity of 18. It takes 7 parameters, represented as [73.0] and does not return any value. It declares 31.0 functions, It has 31.0 f...
aws-deadline_deadline-cloud
public
public
0
0
get_session_logs
def get_session_logs(farm_id: str,queue_id: str,session_id: str,limit: int = 100,start_time: Optional[datetime.datetime] = None,end_time: Optional[datetime.datetime] = None,next_token: Optional[str] = None,config: Optional[ConfigParser] = None,) -> SessionLogResult:"""Get CloudWatch logs for a specific session.This fun...
13
78
8
431
9
196
320
196
farm_id,queue_id,session_id,limit,start_time,end_time,next_token,config
['events', 'log_group_name', 'deadline', 'start_timestamp', 'logs_client', 'end_timestamp', 'response', 'params', 'queue_session']
SessionLogResult
{"Assign": 14, "Expr": 2, "For": 1, "If": 4, "Return": 2, "Try": 4}
25
125
25
["get_boto3_client", "get_user_and_identity_store_id", "get_queue_user_boto3_session", "queue_session.client", "DeadlineOperationError", "get_boto3_client", "int", "start_time.timestamp", "DeadlineOperationError", "int", "end_time.timestamp", "DeadlineOperationError", "logs_client.get_log_events", "response.get", "even...
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_monitoring_py.test_get_session_logs_basic", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.de...
The function (get_session_logs) defined within the public class called public.The function start at line 196 and ends at 320. It contains 78 lines of code and it has a cyclomatic complexity of 13. It takes 8 parameters, represented as [196.0] and does not return any value. It declares 25.0 functions, It has 25.0 functi...
aws-deadline_deadline-cloud
public
public
0
0
_call_paginated_deadline_list_api
def _call_paginated_deadline_list_api(list_api, list_property_name, **kwargs):"""Calls a deadline:List* API repeatedly to concatenate all pages.Example:deadline = get_boto3_client("deadline")return _call_paginated_deadline_list_api(deadline.list_farms, "farms", **kwargs)Args:list_api (callable): The List* API function ...
2
7
3
61
2
10
30
10
list_api,list_property_name,**kwargs
['result', 'response']
Returns
{"Assign": 3, "Expr": 2, "Return": 1, "While": 1}
3
21
3
["list_api", "list_api", "extend"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._list_apis_py.list_farms", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._list_apis_py.list_f...
The function (_call_paginated_deadline_list_api) defined within the public class called public.The function start at line 10 and ends at 30. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [10.0], and this function return a value. It declares 3.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
list_farms
def list_farms(config=None, **kwargs):"""Calls the deadline:ListFarms API call, applying the filter for user membershipdepending on the configuration. If the response is paginated, it repeatedcalls the API to get all the farms."""if "principalId" not in kwargs:user_id, _ = get_user_and_identity_store_id(config=config)i...
3
7
2
58
1
34
46
34
config,**kwargs
['deadline']
Returns
{"Assign": 3, "Expr": 1, "If": 2, "Return": 1}
4
13
4
["get_user_and_identity_store_id", "get_boto3_client", "_call_paginated_deadline_list_api", "api.record_function_latency_telemetry_event"]
0
[]
The function (list_farms) defined within the public class called public.The function start at line 34 and ends at 46. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [34.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
list_queues
def list_queues(config=None, **kwargs):"""Calls the deadline:ListQueues API call, applying the filter for user membershipdepending on the configuration. If the response is paginated, it repeatedcalls the API to get all the queues."""if "principalId" not in kwargs:user_id, _ = get_user_and_identity_store_id(config=confi...
3
7
2
58
1
50
62
50
config,**kwargs
['deadline']
Returns
{"Assign": 3, "Expr": 1, "If": 2, "Return": 1}
4
13
4
["get_user_and_identity_store_id", "get_boto3_client", "_call_paginated_deadline_list_api", "api.record_function_latency_telemetry_event"]
0
[]
The function (list_queues) defined within the public class called public.The function start at line 50 and ends at 62. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [50.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
list_jobs
def list_jobs(config=None, **kwargs):"""Calls the deadline:ListJobs API call, applying the filter for user membershipdepending on the configuration. If the response is paginated, it repeatedcalls the API to get all the jobs."""if "principalId" not in kwargs:user_id, _ = get_user_and_identity_store_id(config=config)if u...
3
7
2
58
1
66
78
66
config,**kwargs
['deadline']
Returns
{"Assign": 3, "Expr": 1, "If": 2, "Return": 1}
4
13
4
["get_user_and_identity_store_id", "get_boto3_client", "_call_paginated_deadline_list_api", "api.record_function_latency_telemetry_event"]
0
[]
The function (list_jobs) defined within the public class called public.The function start at line 66 and ends at 78. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [66.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functions c...
aws-deadline_deadline-cloud
public
public
0
0
list_fleets
def list_fleets(config=None, **kwargs):"""Calls the deadline:ListFleets API call, applying the filter for user membershipdepending on the configuration. If the response is paginated, it repeatedcalls the API to get all the fleets."""if "principalId" not in kwargs:user_id, _ = get_user_and_identity_store_id(config=confi...
3
7
2
58
1
82
94
82
config,**kwargs
['deadline']
Returns
{"Assign": 3, "Expr": 1, "If": 2, "Return": 1}
4
13
4
["get_user_and_identity_store_id", "get_boto3_client", "_call_paginated_deadline_list_api", "api.record_function_latency_telemetry_event"]
0
[]
The function (list_fleets) defined within the public class called public.The function start at line 82 and ends at 94. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [82.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
list_storage_profiles_for_queue
def list_storage_profiles_for_queue(config=None, **kwargs):"""Calls the deadline:ListStorageProfilesForQueue API call, applying the filter for user membershipdepending on the configuration. If the response is paginated, it repeatedcalls the API to get all the storage profiles."""deadline = get_boto3_client("deadline", ...
1
5
2
33
1
98
108
98
config,**kwargs
['deadline']
Returns
{"Assign": 1, "Expr": 1, "Return": 1}
3
11
3
["get_boto3_client", "_call_paginated_deadline_list_api", "api.record_function_latency_telemetry_event"]
0
[]
The function (list_storage_profiles_for_queue) defined within the public class called public.The function start at line 98 and ends at 108. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [98.0], and this function return a value. It declares 3.0 functions, and ...
aws-deadline_deadline-cloud
public
public
0
0
_list_jobs_by_filter_expression
def _list_jobs_by_filter_expression(boto3_session: boto3.Session,farm_id: str,queue_id: str,filter_expression: dict[str, Any],) -> list[dict[str, Any]]:"""This function retrieves all jobs in the queue that satisfy a provided filter expression, except potentiallysome jobs updated recently due to eventual consistency. Th...
8
58
4
297
9
21
173
21
boto3_session,farm_id,queue_id,filter_expression
['threshold_timestamp', 'provided_filter', 'deadline', 'sort_expressions', 'query_filter_expressions', 'total_results', 'response', 'result_jobs', 'jobs']
list[dict[str, Any]]
{"Assign": 10, "Expr": 2, "If": 4, "Return": 1, "Try": 1, "While": 1}
17
153
17
["isinstance", "ValueError", "sorted", "filter_expression.keys", "ValueError", "sorted", "filter_expression.keys", "get_session_client", "deadline.search_jobs", "DeadlineOperationError", "response.get", "response.get", "result_jobs.update", "len", "JobFetchFailure", "list", "result_jobs.values"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._incremental_download_py._get_download_candidate_jobs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadl...
The function (_list_jobs_by_filter_expression) defined within the public class called public.The function start at line 21 and ends at 173. It contains 58 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [21.0] and does not return any value. It declares 17.0 functions, It has...
aws-deadline_deadline-cloud
public
public
0
0
_login_deadline_cloud_monitor
def _login_deadline_cloud_monitor(on_pending_authorization: Optional[Callable],on_cancellation_check: Optional[Callable],config: Optional[ConfigParser] = None,):# Deadline Cloud monitor writes the absolute path to itself to the config filedeadline_cloud_monitor_path = get_setting("deadline-cloud-monitor.path", config=c...
10
40
3
226
6
33
85
33
on_pending_authorization,on_cancellation_check,config
['out', 'profile_name', 'args', 'deadline_cloud_monitor_path', 'p', 'err_prefix']
Returns
{"Assign": 7, "Expr": 3, "If": 6, "Return": 1, "Try": 1, "While": 1}
16
53
16
["get_setting", "get_setting", "sys.platform.startswith", "subprocess.Popen", "subprocess.Popen", "DeadlineOperationError", "on_pending_authorization", "check_authentication_status", "on_cancellation_check", "p.kill", "Exception", "p.poll", "decode", "p.stdout.read", "DeadlineOperationError", "time.sleep"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._loginout_py.login"]
The function (_login_deadline_cloud_monitor) defined within the public class called public.The function start at line 33 and ends at 85. It contains 40 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [33.0], and this function return a value. It declares 16.0 functions, It h...
aws-deadline_deadline-cloud
public
public
0
0
login
def login(on_pending_authorization: Optional[Callable],on_cancellation_check: Optional[Callable],config: Optional[ConfigParser] = None,) -> str:"""For AWS profiles created by Deadline Cloud monitor, logs in to provide access to Deadline Cloud.Args:on_pending_authorization (Callable): A callback that receives method-spe...
2
13
3
57
1
89
112
89
on_pending_authorization,on_cancellation_check,config
['credentials_source']
str
{"Assign": 1, "Expr": 1, "If": 1, "Return": 1}
4
24
4
["get_credentials_source", "_login_deadline_cloud_monitor", "UnsupportedProfileTypeForLoginLogout", "api.record_function_latency_telemetry_event"]
11
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.tests.authentication.test_login_py.test_client_is_independent_of_pykube_incluster", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.tests.authentication.te...
The function (login) defined within the public class called public.The function start at line 89 and ends at 112. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [89.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called insid...
aws-deadline_deadline-cloud
public
public
0
0
logout
def logout(config: Optional[ConfigParser] = None) -> str:"""For AWS profiles created by Deadline Cloud monitor, logs out of Deadline Cloud. Args:config (ConfigParser, optional): The AWS Deadline Cloud configurationobject to use instead of the config file."""credentials_source = get_credentials_source(config)if credenti...
4
23
1
112
5
116
152
116
config
['profile_name', 'output', 'args', 'credentials_source', 'deadline_cloud_monitor_path']
str
{"Assign": 5, "Expr": 2, "If": 1, "Return": 1, "Try": 1}
10
37
10
["get_credentials_source", "get_setting", "get_setting", "subprocess.check_output", "DeadlineOperationError", "DeadlineOperationError", "_session.invalidate_boto3_session_cache", "output.decode", "UnsupportedProfileTypeForLoginLogout", "api.record_function_latency_telemetry_event"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.79438799_jazzband_django_oauth_toolkit.oauth2_provider.views.oidc_py.RPInitiatedLogoutView.do_logout"]
The function (logout) defined within the public class called public.The function start at line 116 and ends at 152. It contains 23 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 functions called insi...
aws-deadline_deadline-cloud
public
public
0
0
assume_queue_role_for_user
def assume_queue_role_for_user(farmId: str, queueId: str, *, config: Optional[ConfigParser] = None) -> Dict[str, Any]:"""Assumes the user role for a queue and returns temporary credentials.These credentials can be used to perform user-level operations on the queue,such as submitting jobs and monitoring job status.Args:...
1
6
3
58
2
14
44
14
farmId,queueId,config
['client', 'response']
Dict[str, Any]
{"Assign": 2, "Expr": 1, "Return": 1}
3
31
3
["_session.get_boto3_client", "client.assume_queue_role_for_user", "_telemetry.record_function_latency_telemetry_event"]
0
[]
The function (assume_queue_role_for_user) defined within the public class called public.The function start at line 14 and ends at 44. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [14.0] and does not return any value. It declares 3.0 functions, and It has 3....
aws-deadline_deadline-cloud
public
public
0
0
assume_queue_role_for_read
def assume_queue_role_for_read(farmId: str, queueId: str, *, config: Optional[ConfigParser] = None) -> Dict[str, Any]:"""Assumes the read role for a queue and returns temporary credentials.These credentials can be used to perform read-only operations on the queue,such as viewing job status and queue information.Args:fa...
1
6
3
58
2
48
78
48
farmId,queueId,config
['client', 'response']
Dict[str, Any]
{"Assign": 2, "Expr": 1, "Return": 1}
3
31
3
["_session.get_boto3_client", "client.assume_queue_role_for_read", "_telemetry.record_function_latency_telemetry_event"]
0
[]
The function (assume_queue_role_for_read) defined within the public class called public.The function start at line 48 and ends at 78. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [48.0] and does not return any value. It declares 3.0 functions, and It has 3....
aws-deadline_deadline-cloud
public
public
0
0
get_queue_parameter_definitions
def get_queue_parameter_definitions(*, farmId: str, queueId: str, config=None) -> list[JobParameter]:"""This gets all the queue parameters definitions from the specified Queue. It does soby getting all the full templates for queue environments, and then combiningthem equivalently to the Deadline Cloud service logic."""...
9
47
3
263
7
21
76
21
farmId,queueId,config
['queue_environment_templates', 'parameter', 'existing_parameter', 'deadline', 'differences', 'response', 'queue_environments']
list[JobParameter]
{"AnnAssign": 1, "Assign": 10, "Expr": 1, "For": 2, "If": 4, "Return": 1}
17
56
17
["get_boto3_client", "_call_paginated_deadline_list_api", "sorted", "deadline.get_queue_environment", "yaml.safe_load", "template.get", "validate_job_parameter", "get", "parameter.get", "get_ui_control_for_parameter_definition", "queue_parameters_definitions.get", "parameter_definition_difference", "DeadlineOperationEr...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.ui.widgets.shared_job_settings_tab_py.SharedJobSettingsWidget._load_queue_parameters_thread_function"]
The function (get_queue_parameter_definitions) defined within the public class called public.The function start at line 21 and ends at 76. It contains 47 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [21.0] and does not return any value. It declares 17.0 functions, It has ...
aws-deadline_deadline-cloud
public
public
0
0
get_boto3_session
def get_boto3_session(force_refresh: bool = False, config: Optional[ConfigParser] = None) -> boto3.Session:"""Gets a boto3 session for the configured AWS Deadline Cloud aws profile. This mayeither use a named profile or the default credentials provider chain.This implementation caches the session object for use across ...
3
9
2
61
1
53
79
53
force_refresh,config
['profile_name']
boto3.Session
{"AnnAssign": 1, "Assign": 1, "Expr": 2, "If": 2, "Return": 1}
3
27
3
["get_setting", "invalidate_boto3_session_cache", "_get_boto3_session_for_profile"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_py.check_authentication_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._sess...
The function (get_boto3_session) defined within the public class called public.The function start at line 53 and ends at 79. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [53.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions ca...
aws-deadline_deadline-cloud
public
public
0
0
_get_boto3_session_for_profile
def _get_boto3_session_for_profile(profile_name: str):session = boto3.Session(profile_name=profile_name)# By default, DCM returns creds that expire after 15 minutes, and boto3's RefreshableCredentials# class refreshes creds that are within 15 minutes of expiring, so credentials would never be reused.# Also DCM credenti...
4
13
1
63
2
83
105
83
profile_name
['credentials', 'session']
Returns
{"Assign": 4, "If": 1, "Return": 1, "Try": 1}
3
23
3
["boto3.Session", "session.get_credentials", "isinstance"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_py.get_boto3_session"]
The function (_get_boto3_session_for_profile) defined within the public class called public.The function start at line 83 and ends at 105. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has ...
aws-deadline_deadline-cloud
public
public
0
0
invalidate_boto3_session_cache
def invalidate_boto3_session_cache() -> None:_get_boto3_session_for_profile.cache_clear()_get_queue_user_boto3_session.cache_clear()
1
3
0
16
0
108
110
108
[]
None
{"Expr": 2}
2
3
2
["_get_boto3_session_for_profile.cache_clear", "_get_queue_user_boto3_session.cache_clear"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_py.get_boto3_session", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.cli.conftest_py.fresh_deadli...
The function (invalidate_boto3_session_cache) defined within the public class called public.The function start at line 108 and ends at 110. 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 ...
aws-deadline_deadline-cloud
public
public
0
0
get_default_client_config
def get_default_client_config(**kwargs) -> botocore.config.Config:"""Gets the default botocore Config object to use with `boto3 clients`.This method adds user agent version and submitter context into botocore calls.Additional arguments are forwarded to the Config constructor."""user_agent_extra = f"app/deadline-client#...
3
8
1
58
2
113
125
113
**kwargs
['client_config', 'user_agent_extra']
botocore.config.Config
{"Assign": 2, "AugAssign": 2, "Expr": 1, "If": 2, "Return": 1}
3
13
3
["session_context.get", "session_context.get", "botocore.config.Config"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_py.get_session_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.cli._groups.job_gr...
The function (get_default_client_config) defined within the public class called public.The function start at line 113 and ends at 125. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 funct...
aws-deadline_deadline-cloud
public
public
0
0
get_session_client
def get_session_client(session: boto3.Session, service_name: str):"""Create and cache a boto3 client for the given session and service name.This function is decorated with @lru_cache to ensure that repeated callswith the same session and service name return the cached client to avoidrepeating initialization where possi...
1
2
2
27
0
129
144
129
session,service_name
[]
Returns
{"Expr": 1, "Return": 1}
2
16
2
["session.client", "get_default_client_config"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._list_jobs_by_filter_expression_py._list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.sr...
The function (get_session_client) defined within the public class called public.The function start at line 129 and ends at 144. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [129.0], and this function return a value. It declares 2.0 functions, It has 2.0 func...
aws-deadline_deadline-cloud
public
public
0
0
get_boto3_client
def get_boto3_client(service_name: str, config: Optional[ConfigParser] = None) -> BaseClient:"""Gets a client from the boto3 session returned by `get_boto3_session`.If the client requested is `deadline`, it uses the AWS_ENDPOINT_URL_DEADLINEdeadline endpoint url.Args:service_name (str): The AWS service to get the clien...
1
3
2
38
1
147
159
147
service_name,config
['session']
BaseClient
{"Assign": 1, "Expr": 1, "Return": 1}
2
13
2
["get_boto3_session", "get_session_client"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api.__init___py.check_deadline_api_available", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._get...
The function (get_boto3_client) defined within the public class called public.The function start at line 147 and ends at 159. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [147.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions ...
aws-deadline_deadline-cloud
public
public
0
0
get_credentials_source
def get_credentials_source(config: Optional[ConfigParser] = None) -> AwsCredentialsSource:"""Returns DEADLINE_CLOUD_MONITOR_LOGIN if Deadline Cloud monitor wrote the credentials, HOST_PROVIDED otherwise.Args:config (ConfigParser, optional): The AWS Deadline Cloud configurationobject to use instead of the config file.""...
3
10
1
56
2
162
179
162
config
['profile_config', 'session']
AwsCredentialsSource
{"Assign": 2, "Expr": 1, "If": 1, "Return": 3, "Try": 1}
2
18
2
["get_boto3_session", "session._session.get_scoped_config"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._loginout_py.login", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._loginout_py.logout", "_.c...
The function (get_credentials_source) defined within the public class called public.The function start at line 162 and ends at 179. It contains 10 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functio...
aws-deadline_deadline-cloud
public
public
0
0
get_user_and_identity_store_id
def get_user_and_identity_store_id(config: Optional[ConfigParser] = None,) -> tuple[Optional[str], Optional[str]]:"""If logged in with Deadline Cloud monitor Desktop, returns a tuple(user_id, identity_store_id), otherwise returns None."""session = get_boto3_session(config=config)profile_config = session._session.get_sc...
2
9
1
67
2
182
195
182
config
['profile_config', 'session']
tuple[Optional[str], Optional[str]]
{"Assign": 2, "Expr": 1, "If": 1, "Return": 2}
2
14
2
["get_boto3_session", "session._session.get_scoped_config"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api.__init___py.check_deadline_api_available", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._job...
The function (get_user_and_identity_store_id) defined within the public class called public.The function start at line 182 and ends at 195. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 ...
aws-deadline_deadline-cloud
public
public
0
0
get_monitor_id
def get_monitor_id(config: Optional[ConfigParser] = None,) -> Optional[str]:"""If logged in with Deadline Cloud Monitor to a Deadline Monitor, returns Monitor Id, otherwise returns None."""session = get_boto3_session(config=config)profile_config = session._session.get_scoped_config()return profile_config.get("monitor_i...
1
6
1
45
2
198
207
198
config
['profile_config', 'session']
Optional[str]
{"Assign": 2, "Expr": 1, "Return": 1}
3
10
3
["get_boto3_session", "session._session.get_scoped_config", "profile_config.get"]
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_monitor_id) defined within the public class called public.The function start at line 198 and ends at 207. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called...
aws-deadline_deadline-cloud
public
public
0
0
get_queue_user_boto3_session
def get_queue_user_boto3_session(deadline: BaseClient,config: Optional[ConfigParser] = None,farm_id: Optional[str] = None,queue_id: Optional[str] = None,queue_display_name: Optional[str] = None,force_refresh: bool = False,) -> boto3.Session:"""Calls the AssumeQueueRoleForUser API to obtain the role configured in a Queu...
3
16
6
102
3
210
240
210
deadline,config,farm_id,queue_id,queue_display_name,force_refresh
['farm_id', 'base_session', 'queue_id']
boto3.Session
{"Assign": 3, "Expr": 1, "If": 2, "Return": 1}
4
31
4
["get_boto3_session", "get_setting", "get_setting", "_get_queue_user_boto3_session"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._job_monitoring_py.get_session_logs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_...
The function (get_queue_user_boto3_session) defined within the public class called public.The function start at line 210 and ends at 240. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [210.0] and does not return any value. It declares 4.0 functions, It has 4...
aws-deadline_deadline-cloud
public
public
0
0
_get_queue_user_boto3_session
def _get_queue_user_boto3_session(deadline: BaseClient,base_session: boto3.Session,farm_id: str,queue_id: str,queue_display_name: Optional[str] = None,):queue_credential_provider = QueueUserCredentialProvider(deadline,farm_id,queue_id,queue_display_name,)botocore_session = get_botocore_session()credential_provider = bo...
2
24
5
105
4
244
269
244
deadline,base_session,farm_id,queue_id,queue_display_name
['credential_provider', 'botocore_session', 'queue_credential_provider', 'aws_profile_name']
Returns
{"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
26
5
["QueueUserCredentialProvider", "get_botocore_session", "botocore_session.get_component", "credential_provider.insert_before", "boto3.Session"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._session_py.get_queue_user_boto3_session", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.job_attachments...
The function (_get_queue_user_boto3_session) defined within the public class called public.The function start at line 244 and ends at 269. It contains 24 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [244.0], and this function return a value. It declares 5.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
_modified_logging_level
def _modified_logging_level(logger, level):old_level = logger.getEffectiveLevel()logger.setLevel(level)try:yieldfinally:logger.setLevel(old_level)
2
7
2
31
1
273
279
273
logger,level
['old_level']
None
{"Assign": 1, "Expr": 3, "Try": 1}
3
7
3
["logger.getEffectiveLevel", "logger.setLevel", "logger.setLevel"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api.__init___py.check_deadline_api_available", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._ses...
The function (_modified_logging_level) defined within the public class called public.The function start at line 273 and ends at 279. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [273.0] and does not return any value. It declares 3.0 functions, It has 3.0 fun...
aws-deadline_deadline-cloud
public
public
0
0
check_authentication_status
def check_authentication_status(config: Optional[ConfigParser] = None) -> AwsAuthenticationStatus:"""Checks the status of the provided session, bycalling the sts::GetCallerIdentity API.Args:config (ConfigParser, optional): The AWS Deadline Cloud configurationobject to use instead of the config file.Returns AwsAuthentic...
3
9
1
72
0
282
307
282
config
[]
AwsAuthenticationStatus
{"Expr": 2, "If": 1, "Return": 3, "Try": 1, "With": 1}
6
26
6
["_modified_logging_level", "logging.getLogger", "get_caller_identity", "client", "get_boto3_session", "get_credentials_source"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.src.deadline.client.api._loginout_py._login_deadline_cloud_monitor"]
The function (check_authentication_status) defined within the public class called public.The function start at line 282 and ends at 307. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 fun...
aws-deadline_deadline-cloud
public
public
0
0
precache_clients
def precache_clients(deadline: BaseClient = None,config: Optional[ConfigParser] = None,farm_id: Optional[str] = None,queue_id: Optional[str] = None,queue_display_name: Optional[str] = None,) -> Tuple[BaseClient, BaseClient]:"""Initialize an S3 client (and optionally a Deadline client) with queue user credentialsto pre-...
5
27
5
153
6
310
367
310
deadline,config,farm_id,queue_id,queue_display_name
['queue', 'farm_id', 'deadline', 'queue_display_name', 'queue_role_session', 'queue_id']
Tuple[BaseClient, BaseClient]
{"Assign": 6, "Expr": 1, "If": 4, "Return": 1}
6
58
6
["get_boto3_client", "get_setting", "get_setting", "deadline.get_queue", "get_queue_user_boto3_session", "get_s3_client"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_api_session_py.test_precache_clients", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_cl...
The function (precache_clients) defined within the public class called public.The function start at line 310 and ends at 367. It contains 27 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [310.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions...
aws-deadline_deadline-cloud
QueueUserCredentialProvider
public
0
1
__init__
def __init__(self,deadline: BaseClient,farm_id: str,queue_id: str,queue_display_name: Optional[str] = None,):self.deadline = deadlineself.farm_id = farm_idself.queue_id = queue_idself.queue_display_name_or_id = queue_display_name or queue_id
2
11
5
49
0
389
399
389
self,deadline,farm_id,queue_id,queue_display_name
[]
None
{"Assign": 4}
0
11
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 QueueUserCredentialProvider, that inherit another class.The function start at line 389 and ends at 399. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [389.0] and does not return any value. It has...
aws-deadline_deadline-cloud
QueueUserCredentialProvider
public
0
1
load
def load(self):credentials = self._get_queue_credentials()return RefreshableCredentials.create_from_metadata(metadata=credentials,refresh_using=self._get_queue_credentials,method=self.METHOD,)
1
7
1
34
0
401
407
401
self
[]
Returns
{"Assign": 1, "Return": 1}
2
7
2
["self._get_queue_credentials", "RefreshableCredentials.create_from_metadata"]
149
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3550345_napalm_automation_napalm_junos.napalm_junos.utils.junos_views_py._loadyaml_bypass", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3960208_marshmallow_code_marshmallow_jsonapi.tests.test_options_py.TestInflec...
The function (load) defined within the public class called QueueUserCredentialProvider, that inherit another class.The function start at line 401 and ends at 407. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares...
aws-deadline_deadline-cloud
QueueUserCredentialProvider
public
0
1
_get_queue_credentials
def _get_queue_credentials(self):"""Fetches or refreshes the credentials using the AssumeQueueRoleForUser APIfor the specified Farm ID and Queue ID."""try:queue_credentials = self.deadline.assume_queue_role_for_user(farmId=self.farm_id, queueId=self.queue_id).get("credentials", None)except ClientError as exc:code = exc...
5
32
1
145
0
409
444
409
self
[]
Returns
{"Assign": 2, "Expr": 1, "If": 3, "Return": 1, "Try": 1}
9
36
9
["get", "self.deadline.assume_queue_role_for_user", "get", "exc.response.get", "DeadlineOperationError", "DeadlineOperationError", "DeadlineOperationError", "DeadlineOperationError", "isoformat"]
0
[]
The function (_get_queue_credentials) defined within the public class called QueueUserCredentialProvider, that inherit another class.The function start at line 409 and ends at 444. It contains 32 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a...
aws-deadline_deadline-cloud
public
public
0
0
_summarize_asset_paths
def _summarize_asset_paths(input_paths: Collection[Path | str], output_paths: Collection[Path | str], name: str) -> list[str]:result = []if input_paths:result.append(f"{name} for upload:\n")result.append(textwrap.indent(summarize_path_list(input_paths), ""))if output_paths:result.append(f"{name} to collect job outputs ...
6
16
3
121
2
64
80
64
input_paths,output_paths,name
['summary_entry_count', 'result']
list[str]
{"Assign": 2, "AugAssign": 1, "Expr": 5, "If": 4, "Return": 1}
11
17
11
["result.append", "result.append", "textwrap.indent", "summarize_path_list", "result.append", "len", "result.extend", "sorted", "len", "result.append", "len"]
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._generate_message_for_asset_paths"]
The function (_summarize_asset_paths) defined within the public class called public.The function start at line 64 and ends at 80. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [64.0] and does not return any value. It declares 11.0 functions, It has 11.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_generate_message_for_asset_paths
def _generate_message_for_asset_paths(upload_group: AssetUploadGroup,storage_profile: Optional[StorageProfile],known_asset_paths: Iterable[str],) -> tuple[str, bool]:"""Generate a message about asset uploads and along with a flag indicating if there are warnings."""# Collect all the input and output pathsall_input_path...
14
60
3
287
6
83
151
83
upload_group,storage_profile,known_asset_paths
['unknown_path_warnings', 'warning_messages', 'unknown_input_paths', 'unknown_output_paths', 'default_prompt_response', 'known_path_regex']
tuple[str, bool]
{"AnnAssign": 2, "Assign": 8, "Expr": 15, "For": 1, "If": 5, "Return": 1}
29
69
29
["set", "set", "all_input_paths.update", "all_output_paths.update", "re.compile", "join", "re.escape", "known_path_regex.match", "str", "known_path_regex.match", "str", "_summarize_asset_paths", "warning_messages.append", "warning_messages.extend", "human_readable_file_size", "warning_messages.extend", "_summarize_asse...
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 (_generate_message_for_asset_paths) defined within the public class called public.The function start at line 83 and ends at 151. It contains 60 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [83.0] and does not return any value. It declares 29.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
_upload_attachments._default_update_upload_progress
def _default_update_upload_progress(upload_metadata: ProgressReportMetadata) -> bool:return True
1
2
1
11
0
168
169
168
null
[]
None
null
0
0
0
null
0
null
The function (_upload_attachments._default_update_upload_progress) defined within the public class called public.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
public
public
0
0
_upload_attachments
def _upload_attachments(asset_manager: S3AssetManager,manifests: List[AssetRootManifest],print_function_callback: Callable,upload_progress_callback: Optional[Callable],config: Optional[ConfigParser] = None,from_gui: bool = False,) -> Dict[str, Any]:"""Starts the job attachments upload and handles the progress reporting...
3
33
6
158
1
155
198
155
asset_manager,manifests,print_function_callback,upload_progress_callback,config,from_gui
['upload_progress_callback']
Dict[str, Any]
{"Assign": 2, "Expr": 5, "If": 2, "Return": 2}
12
44
12
["asset_manager.upload_assets", "config_file.get_cache_directory", "record_upload_summary", "api.get_deadline_cloud_library_telemetry_client", "print_function_callback", "print_function_callback", "textwrap.indent", "str", "upload_progress_callback", "ProgressReportMetadata", "attachment_settings.to_dict", "api.record_...
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 (_upload_attachments) defined within the public class called public.The function start at line 155 and ends at 198. It contains 33 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [155.0] and does not return any value. It declares 12.0 functions, It has 12.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_snapshot_attachments._default_update_snapshot_progress
def _default_update_snapshot_progress(upload_metadata: ProgressReportMetadata) -> bool:return True
1
2
1
11
0
216
217
216
null
[]
None
null
0
0
0
null
0
null
The function (_snapshot_attachments._default_update_snapshot_progress) defined within the public class called public.The function start at line 216 and ends at 217. 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
_snapshot_attachments
def _snapshot_attachments(snapshot_dir: str,asset_manager: S3AssetManager,manifests: List[AssetRootManifest],print_function_callback: Callable,snapshot_progress_callback: Optional[Callable],config: Optional[ConfigParser] = None,from_gui: bool = False,) -> Dict[str, Any]:"""Starts the job attachments upload and handles ...
3
30
7
140
1
202
242
202
snapshot_dir,asset_manager,manifests,print_function_callback,snapshot_progress_callback,config,from_gui
['snapshot_progress_callback']
Dict[str, Any]
{"Assign": 2, "Expr": 4, "If": 2, "Return": 2}
9
41
9
["asset_manager.snapshot_assets", "print_function_callback", "print_function_callback", "textwrap.indent", "str", "snapshot_progress_callback", "ProgressReportMetadata", "attachment_settings.to_dict", "api.record_success_fail_telemetry_event"]
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 (_snapshot_attachments) defined within the public class called public.The function start at line 202 and ends at 242. It contains 30 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [202.0] and does not return any value. It declares 9.0 functions, It has 9.0 func...
aws-deadline_deadline-cloud
public
public
0
0
_filter_redundant_known_paths
def _filter_redundant_known_paths(known_asset_paths: Iterable[str]) -> list[str]:"""Filters out redundant paths from the known asset paths list.This algorithm identifies any paths that have a different path as a prefix,and removes them from the list. Pseudo-code is:1. Sort the paths from shortest to longest, so any pre...
6
15
1
142
2
245
279
245
known_asset_paths
['current', 'parts']
list[str]
{"AnnAssign": 3, "Assign": 4, "Expr": 2, "For": 2, "If": 2, "Return": 1}
6
35
6
["sorted", "Path", "current.get", "current.setdefault", "current.get", "filtered_paths.append"]
2
["_.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.test.unit.deadline_c...
The function (_filter_redundant_known_paths) defined within the public class called public.The function start at line 245 and ends at 279. It contains 15 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 ...
aws-deadline_deadline-cloud
public
public
0
0
_save_debug_snapshot.write_commands
def write_commands(write_line: Callable, continuation: str):if "attachments" in create_job_args:for subdir in ("Data", "Manifests"):write_line(f"aws s3 cp {continuation}")write_line(f"--recursive {continuation}")write_line(f"./{subdir} {continuation}")write_line(f"s3://{asset_manager.job_attachment_settings.s3BucketNam...
4
14
2
73
0
314
327
314
null
[]
None
null
0
0
0
null
0
null
The function (_save_debug_snapshot.write_commands) defined within the public class called public.The function start at line 314 and ends at 327. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [314.0] and does not return any value..