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
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module_struct: NodeStructs.Module = moduleself.module_struct.preannot = module.ast[0]self.module_JSON = module.ast[1]self.module_struct.postannot = module.ast[2]
1
5
2
54
0
35
40
10
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 35 and ends at 40. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):self.constant_struct.id = self.constant_JSON["DefConstant"]["node"]["AstNode"]["data"]["name"]self.constant_struct.qf = self.constant_struct.idconstant_Value_JSON = self.constant_JSON["DefConstant"]["node"]["AstNode"]["data"]["value"]self.constant_struct.value = Utils.parse_constant(constant_Value_JSO...
1
10
1
76
0
42
54
42
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 42 and ends at 54. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module_struct: NodeStructs.Module = moduleself.module_struct.preannot = module.ast[0]self.module_JSON = module.ast[1]self.module_struct.postannot = module.ast[2]
1
5
2
54
0
62
67
10
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 62 and ends at 67. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):instance_bit_1 = self.instance_JSON["SpecCompInstance"]["node"]["AstNode"]["data"]["instance"]self.instance_struct.name = Utils.value_parser(instance_bit_1)self.instance_struct.qf = self.instance_struct.nameif ("Public"in self.instance_JSON["SpecCompInstance"]["node"]["AstNode"]["data"]["visibility"])...
3
21
1
114
0
69
92
69
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 69 and ends at 92. It contains 21 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module_struct: NodeStructs.Module = moduleself.module_struct.preannot = module.ast[0]self.module_JSON = module.ast[1]self.module_struct.postannot = module.ast[2]
1
5
2
54
0
100
105
10
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 100 and ends at 105. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):self._parse()self._parse_phases()return self.instance_struct
1
4
1
19
0
107
111
107
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 107 and ends at 111. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
_parse_phases
def _parse_phases(self):initSpecs = self.instance_JSON["DefComponentInstance"]["node"]["AstNode"]["data"]["initSpecs"]for initSpec in initSpecs:if "phase" in initSpec[1]["AstNode"]["data"]:specType = initSpec[1]["AstNode"]["data"]["phase"]["AstNode"]["data"]["ExprDot"]["id"]["AstNode"]["data"]specCode = initSpec[1]["As...
4
16
1
111
0
113
130
113
null
[]
None
null
0
0
0
null
0
null
The function (_parse_phases) defined within the public class called public.The function start at line 113 and ends at 130. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
_parse
def _parse(self):self.instance_struct.name = self.instance_JSON["DefComponentInstance"]["node"]["AstNode"]["data"]["name"]self.instance_struct.qf = self.instance_struct.namecomponents_bit_1 = self.instance_JSON["DefComponentInstance"]["node"]["AstNode"]["data"]["component"]self.instance_struct.component_name = Utils.va...
25
98
1
649
0
132
241
132
null
[]
None
null
0
0
0
null
0
null
The function (_parse) defined within the public class called public.The function start at line 132 and ends at 241. It contains 98 lines of code and it has a cyclomatic complexity of 25. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module_struct: NodeStructs.Module = moduleself.module_struct.preannot = module.ast[0]self.module_JSON = module.ast[1]self.module_struct.postannot = module.ast[2]
1
5
2
54
0
249
254
10
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 249 and ends at 254. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):self.port_struct.name = self.port_JSON["DefPort"]["node"]["AstNode"]["data"]["name"]self.port_struct.qf = self.port_namefor i in self.port_JSON["DefPort"]["node"]["AstNode"]["data"]["params"]:param = self.port_JSON["DefPort"]["node"]["AstNode"]["data"]["params"][i][1]paramToAppend = {"name": None,"typ...
2
16
1
156
0
256
275
256
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 256 and ends at 275. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, import_struct: NodeStructs.TopologyImport):self.import_struct = import_structself.import_struct.preannot = import_struct.ast[0]self.import_JSON = import_struct.ast[1]self.import_struct.postannot = import_struct.ast[2]
1
5
2
50
0
283
288
283
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 283 and ends at 288. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [283.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):import_bit_1 = self.import_JSON["SpecTopImport"]["node"]["AstNode"]["data"]["top"]self.import_struct.name = Utils.value_parser(import_bit_1)self.import_struct.qf = self.import_struct.namereturn self.import_struct
1
7
1
52
0
290
298
290
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 290 and ends at 298. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, import_struct: NodeStructs.TopologyImport):self.import_struct = import_structself.import_struct.preannot = import_struct.ast[0]self.import_JSON = import_struct.ast[1]self.import_struct.postannot = import_struct.ast[2]
1
5
2
50
0
306
311
283
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 306 and ends at 311. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [283.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):import_bit = self.cg_JSON["SpecConnectionGraph"]["node"]["AstNode"]["data"]if "Direct" not in import_bit:self.cg_struct.type = "Pattern"returnelse:self.cg_struct.type = "Direct"import_bit = import_bit["Direct"]self.cg_struct.name = import_bit["name"]self.cg_struct.qf = self.cg_struct.namefor connectio...
13
67
1
472
0
313
392
313
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 313 and ends at 392. It contains 67 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module_struct: NodeStructs.Module = moduleself.module_struct.preannot = module.ast[0]self.module_JSON = module.ast[1]self.module_struct.postannot = module.ast[2]
1
5
2
54
0
400
405
10
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 400 and ends at 405. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
convert
def convert(self):self.module_struct.name = self.module_JSON["DefModule"]["node"]["AstNode"]["data"]["name"]self.module_struct.qf = self.module_struct.nameself.module_struct.members = self.module_JSON["DefModule"]["node"]["AstNode"]["data"]["members"]return self.module_struct
1
9
1
68
0
407
417
17
null
[]
None
null
0
0
0
null
0
null
The function (convert) defined within the public class called public.The function start at line 407 and ends at 417. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
9
10
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
open
def open(self):return f"module {self.module.name} {{"
1
2
1
8
0
12
13
12
null
[]
None
null
0
0
0
null
0
null
The function (open) 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..
nasa_fprime-tools
public
public
0
0
close
def close(self):return "}"
1
2
1
7
0
15
16
15
null
[]
None
null
0
0
0
null
0
null
The function (close) defined within the public class called public.The function start at line 15 and ends at 16. 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
24
25
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 24 and ends at 25. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
open
def open(self):return f"module {self.module.name} {{"
1
2
1
8
0
27
28
12
null
[]
None
null
0
0
0
null
0
null
The function (open) defined within the public class called public.The function start at line 27 and ends at 28. 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..
nasa_fprime-tools
public
public
0
0
close
def close(self):return "}"
1
2
1
7
0
30
31
15
null
[]
None
null
0
0
0
null
0
null
The function (close) defined within the public class called public.The function start at line 30 and ends at 31. 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
39
40
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):return f"constant {self.constant.id} = {self.constant.value}"
1
2
1
8
0
42
43
42
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 42 and ends at 43. 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
51
52
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 51 and ends at 52. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):return f"constant {self.constant.id} = {self.constant.value}"
1
2
1
8
0
54
55
42
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 54 and ends at 55. 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
64
65
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 64 and ends at 65. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
_writePhases
def _writePhases(self):phaseOpen = Falsepart = ""for phase in self.comp_instance.phases:if (self.comp_instance.phases[phase] is not Noneand self.comp_instance.phases[phase] != ""):if not phaseOpen:part += f"{{"phaseOpen = Truepart += f'\nphase Fpp.ToCpp.Phases.{phase} """\n'part += self.comp_instance.phases[phase]part ...
6
17
1
82
0
67
87
67
null
[]
None
null
0
0
0
null
0
null
The function (_writePhases) defined within the public class called public.The function start at line 67 and ends at 87. It contains 17 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):part_1 = f"instance {self.comp_instance.name}: {self.comp_instance.component_name} base id {self.comp_instance.base_id}"if (self.comp_instance.queue_size is not Noneand self.comp_instance.queue_size != "None"):part_1 = part_1 + f" \\ \nqueue size {self.comp_instance.queue_size}"if (self.comp_instance.st...
9
20
1
119
0
89
113
89
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 89 and ends at 113. It contains 20 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
121
122
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 121 and ends at 122. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):portParams = ""for i in self.port.parameters:portParams = portParams + f"{i['name']} : {i['type']},\n"return f"port {self.port.name}(\n{portParams}\n)"
2
5
1
26
0
124
130
124
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 124 and ends at 130. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
138
139
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 138 and ends at 139. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):return f"constant {self.constant.id} = {self.constant.value}"
1
2
1
8
0
141
142
42
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 141 and ends at 142. 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, module: NodeStructs.Module):self.module: NodeStructs.Module = module
1
2
2
20
0
150
151
9
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 150 and ends at 151. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write(self):part = f"connections {self.connection_graph.name} {{"for connection in self.connection_graph.connections:if (connection["source"]["num"] is Noneor connection["source"]["num"] == "None"):connection["source"]["num"] = ""if connection["dest"]["num"] is None or connection["dest"]["num"] == "None":connection...
6
15
1
92
0
153
171
153
null
[]
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 153 and ends at 171. 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..
nasa_fprime-tools
public
public
0
0
main
def main():"""Run wrapper, to point a console_script at"""return fprime.util.cli.utility_entry(args=sys.argv[1:])
1
2
0
24
0
13
15
13
null
[]
None
null
0
0
0
null
0
null
The function (main) defined within the public class called public.The function start at line 13 and ends at 15. 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..
nasa_fprime-tools
public
public
0
0
package_version_check
def package_version_check(package: str, requirement_path: Path):"""Checks the version of the packages installed match the expected packages of the fprime aggregate package"""expected_version = get_version(package, requirement_path).lstrip("v")# Python versiontry:version = pkg_resources.get_distribution(package).version...
3
12
2
57
2
32
44
32
null
['expected_version', 'version']
None
null
0
0
0
null
0
null
The function (package_version_check) defined within the public class called public.The function start at line 32 and ends at 44. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [32.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
validate_tools_from_requirements
def validate_tools_from_requirements(build: Build):"""Uses build settings to find requirements file and validate the correct versions installed"""# Find prioritized order of requirements.txt, ensuring that each member existspossibilities = [build.settings.get("project_root", None),build.settings.get("framework_path", N...
10
28
1
126
2
47
80
47
null
['message', 'possibilities']
None
null
0
0
0
null
0
null
The function (validate_tools_from_requirements) defined within the public class called public.The function start at line 47 and ends at 80. It contains 28 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
load_build
def load_build(parsed, skip_validation=False):"""Loads Build object and returns it to the caller. Additionally, this will validate theinstalled tool versions (such as fpp and other F' utilities) against the requirements.txt"""try:target = get_target(parsed)build_type = target.build_typeexcept NoSuchTargetException:buil...
5
22
2
133
4
83
119
83
null
['build_type', 'target', 'cmake_root', 'build']
None
null
0
0
0
null
0
null
The function (load_build) defined within the public class called public.The function start at line 83 and ends at 119. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [83.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
utility_entry
def utility_entry(args):"""Entrypoint for fprime-util, main interface to F' utility"""parsed, cmake_args, make_args, parser, runners = parse_args(args)try:build = (Noneif skip_build_loading(parsed)else load_build(parsed, skip_build_cache_validation(parsed)))# runners is a Dict[str, Callable] of {command_name: handler_f...
5
21
1
111
1
32
57
32
null
['build']
None
null
0
0
0
null
0
null
The function (utility_entry) defined within the public class called public.The function start at line 32 and ends at 57. It contains 21 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
skip_build_loading
def skip_build_loading(parsed):"""Determines if the build load step should be skipped. Commands that do not require a build objectshould manually be added here by the developer."""if parsed.command == "version-check":return Truereturn False
2
4
1
17
0
60
66
60
null
[]
None
null
0
0
0
null
0
null
The function (skip_build_loading) defined within the public class called public.The function start at line 60 and ends at 66. 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..
nasa_fprime-tools
public
public
0
0
skip_build_cache_validation
def skip_build_cache_validation(parsed):"""Determines if the build cache validation step should be skipped. Commands that do not require abuild **cache** should manually be added here by the developer."""if parsed.command in ["purge","info","format",]:return Trueif parsed.command == "new" and parsed.new_deployment:retu...
4
10
1
37
0
69
81
69
null
[]
None
null
0
0
0
null
0
null
The function (skip_build_cache_validation) defined within the public class called public.The function start at line 69 and ends at 81. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
add_special_parsers
def add_special_parsers(subparsers, common: argparse.ArgumentParser, help_text: "HelpText") -> Dict[str, Callable]:"""Adds in CLI parsers for other commandsArgs:subparsers: subparsers used to create new CLI subparserscommon: common parent parserReturns:Dictionary associating special command name to callable used to pro...
1
160
3
640
5
84
260
84
null
['new_exclusive', 'hash_parser', 'new_parser', 'version_parser', 'format_parser']
None
null
0
0
0
null
0
null
The function (add_special_parsers) defined within the public class called public.The function start at line 84 and ends at 260. It contains 160 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [84.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
validate
def validate(parsed, unknown):"""Validate rules to ensure that the args are properly consistent. This will also generate a set of validated argumentsto pass to CMake. This allows these values to be created, defaulted, and validated in one place:param parsed: args to validate:param unknown: unknown arguments:return: cma...
15
26
2
198
7
263
299
263
null
['make_args', 'runnable', 'd_args', 'msg', 'CMAKE_REG', 'unknown', 'cmake_args']
None
null
0
0
0
null
0
null
The function (validate) defined within the public class called public.The function start at line 263 and ends at 299. It contains 26 lines of code and it has a cyclomatic complexity of 15. It takes 2 parameters, represented as [263.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
parse_args
def parse_args(args):"""Parse the arguments to the CLI. This will then enable the user to run the above listed commands via the commands.:param args: CLI arguments to process:return: parsed arguments in a Namespace"""# Common parser specifying common arguments input into the utilitycommon_parser = argparse.ArgumentPars...
3
75
1
370
6
302
389
302
null
['parser', 'parsers', 'subparsers', 'selected_parser', 'common_parser', 'runners']
None
null
0
0
0
null
0
null
The function (parse_args) defined within the public class called public.The function start at line 302 and ends at 389. It contains 75 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, executable: str, style_file: "Path", options: Dict):super().__init__(TargetScope.LOCAL)self.executable = executableself.style_file = style_fileself.backup = options.get("backup", False)self.verbose = options.get("verbose", False)self.quiet = options.get("quiet", False)self.check = options.get("check"...
1
11
4
117
0
35
45
35
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 35 and ends at 45. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [35.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_supported
def is_supported(self, _=None, __=None) -> bool:return bool(shutil.which(self.executable))
1
2
3
27
0
47
48
47
null
[]
None
null
0
0
0
null
0
null
The function (is_supported) defined within the public class called public.The function start at line 47 and ends at 48. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [47.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
allow_extension
def allow_extension(self, file_ext: str) -> None:"""Add a file extension str to the list of allowed extension"""self.allowed_extensions.append(file_ext)
1
2
2
20
0
50
52
50
null
[]
None
null
0
0
0
null
0
null
The function (allow_extension) defined within the public class called public.The function start at line 50 and ends at 52. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [50.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
stage_file
def stage_file(self, filepath: Path) -> None:"""Request ClangFormatter to consider the file for formatting.If the file exists and its extension matches a known C/C++ format,it will be passed to clang-format when the execute() function is called.Args:filepath (str): file path to file to be staged."""if not filepath.is_f...
6
14
2
68
0
54
74
54
null
[]
None
null
0
0
0
null
0
null
The function (stage_file) defined within the public class called public.The function start at line 54 and ends at 74. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [54.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
execute
def execute(self, builder: "Build", context: "Path", args: Tuple[Dict[str, str], List[str]]):"""Execute clang-format on the files that were staged.Args:builder (Build): build object to run the utility withcontext (Path): context path of module clang-format can run on if --module is providedargs (Tuple[Dict[str, str], L...
9
36
4
226
0
76
120
76
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 76 and ends at 120. It contains 36 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [76.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_info
def run_info(base: Build, parsed: argparse.Namespace, _: Dict[str, str], __: Dict[str, str], ___):"""Builds and prints the informational output blockHandles the info command using the given build as a template to discover other build types. This will load theinformation and prints it to the screen.Args:base: base build...
8
46
5
233
7
35
100
35
null
['global_targets', 'build_infos', 'global_generic_targets', 'build_info', 'local_targets', 'build_artifacts', 'local_generic_targets']
None
null
0
0
0
null
0
null
The function (run_info) defined within the public class called public.The function start at line 35 and ends at 100. It contains 46 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [35.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_hash_to_file
def run_hash_to_file(build: Build, parsed: argparse.Namespace, _: Dict[str, str], __: Dict[str, str], ___):"""Processes hash-to-file to locate fileArgs:build: build to search for hashes.txtparsed: parsed arguments for needed for parsed.hash_: unused cmake arguments__: unused make arguments___: unused pass through argum...
3
12
5
85
2
103
123
103
null
['lines', 'msg']
None
null
0
0
0
null
0
null
The function (run_hash_to_file) defined within the public class called public.The function start at line 103 and ends at 123. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [103.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_new
def run_new(build: Build, parsed: argparse.Namespace, _: Dict[str, str], __: Dict[str, str], ___):"""Processes new commandArgs:build: build used to inform new_* callsparsed: parsed arguments_: unused cmake arguments__: unused make arguments___: unused pass through arguments"""if parsed.new_component:return new_componen...
5
14
5
87
0
126
148
126
null
[]
None
null
0
0
0
null
0
null
The function (run_new) defined within the public class called public.The function start at line 126 and ends at 148. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [126.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_code_format
def run_code_format(build: Build,parsed: argparse.Namespace,_: Dict[str, str],__: Dict[str, str],___: List[str],):"""Runs code formatting using clang-formatArgs:build: used to retrieve .clang-format fileparsed: parsed input arguments__: unused cmake_args___: unused make_args____: unused pass-through arguments"""options...
10
41
5
251
3
151
204
151
null
['dir_path', 'options', 'clang_formatter']
None
null
0
0
0
null
0
null
The function (run_code_format) defined within the public class called public.The function start at line 151 and ends at 204. It contains 41 lines of code and it has a cyclomatic complexity of 10. It takes 5 parameters, represented as [151.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_version_check
def run_version_check(base: Build, parsed: argparse.Namespace, _: Dict[str, str], __: Dict[str, str], ___):"""Print out versions to help debuggingThis prints out versions of tools such as Python, CMake, and F Prime packages.This will also print submodules information. Only submodules in github.com are printed,unless al...
10
49
5
247
4
207
265
207
null
['out', 'version', 'cmake_version', 'fprime_version_pairs']
None
null
0
0
0
null
0
null
The function (run_version_check) defined within the public class called public.The function start at line 207 and ends at 265. It contains 49 lines of code and it has a cyclomatic complexity of 10. It takes 5 parameters, represented as [207.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_impl
def run_impl(build: Build, source_path: Path):"""Run implementation of files in source_path"""if not confirm("Generate implementation files?"):return Falseprint("Refreshing cache and generating implementation files...")with suppress_stdout():fpp_generate_implementation(build,source_path,source_path,apply_formatting=Tru...
2
14
2
53
0
24
40
24
null
[]
None
null
0
0
0
null
0
null
The function (run_impl) defined within the public class called public.The function start at line 24 and ends at 40. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [24.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
suppress_stdout
def suppress_stdout():with open(os.devnull, "w") as devnull:old_stdout = sys.stdoutsys.stdout = devnulltry:yieldfinally:sys.stdout = old_stdout
2
8
0
36
1
44
51
44
null
['old_stdout']
None
null
0
0
0
null
0
null
The function (suppress_stdout) defined within the public class called public.The function start at line 44 and ends at 51. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
find_nearest_cmake_file
def find_nearest_cmake_file(component_dir: Path, cmake_root: Path, proj_root: Path):"""Find the nearest CMake file, i.e. CMakeLists.txt or project.cmakeThe "nearest" file is defined as the closest parent that is not the project root CMakeLists.txt.If none is found, the same procedure is run from the deployment director...
6
12
3
89
3
54
86
54
null
['project_file', 'cmake_list_file', 'test_path']
None
null
0
0
0
null
0
null
The function (find_nearest_cmake_file) defined within the public class called public.The function start at line 54 and ends at 86. It contains 12 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [54.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
new_component
def new_component(build: Build, parsed_args: "argparse.Namespace"):"""Uses cookiecutter for making new components"""if (check_path_is_within_fprime_module(path=Path.cwd(), is_component=True)and not parsed_args.force):print("[ERROR] Wrong location. Cannot create component within an existing component."" Use --force to o...
13
61
2
293
5
89
162
89
null
['gen_path', 'source', 'cwd', 'proj_root', 'extra_context']
None
null
0
0
0
null
0
null
The function (new_component) defined within the public class called public.The function start at line 89 and ends at 162. It contains 61 lines of code and it has a cyclomatic complexity of 13. It takes 2 parameters, represented as [89.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
new_deployment
def new_deployment(build: Build, parsed_args: "argparse.Namespace"):"""Creates a new deployment using cookiecutter"""if check_path_is_within_fprime_module(Path.cwd()) and not parsed_args.force:print("[ERROR] Wrong location. Cannot create deployment within an existing component or deployment")return 1# Checks if deploym...
8
52
2
215
4
165
226
165
null
['source', 'rel_path', 'gen_path', 'extra_context']
None
null
0
0
0
null
0
null
The function (new_deployment) defined within the public class called public.The function start at line 165 and ends at 226. It contains 52 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [165.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
new_subtopology
def new_subtopology(build: Build, parsed_args: "argparse.Namespace"):"""Creates a new subtopology using cookiecutter"""# Checks if subtopology_cookiecutter is set in settings.ini file, else uses local install template as defaultif (build.get_settings("subtopology_cookiecutter", None) is not Noneand build.get_settings("...
5
36
2
164
2
229
268
229
null
['source', 'gen_path']
None
null
0
0
0
null
0
null
The function (new_subtopology) defined within the public class called public.The function start at line 229 and ends at 268. It contains 36 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [229.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
new_module
def new_module(build: Build, parsed_args: "argparse.Namespace"):"""Creates a new F' project"""source = (os.path.dirname(__file__)+ "/../cookiecutter_templates/cookiecutter-fprime-module")try:gen_path = Path(cookiecutter(source,overwrite_if_exists=parsed_args.overwrite,output_dir=parsed_args.path,)).resolve()# Attempt t...
3
31
2
119
2
271
304
271
null
['source', 'gen_path']
None
null
0
0
0
null
0
null
The function (new_module) defined within the public class called public.The function start at line 271 and ends at 304. It contains 31 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [271.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
register_with_cmake
def register_with_cmake(gen_path: Path, proj_root: Path, cmake_root: Path):cmake_file = find_nearest_cmake_file(gen_path, cmake_root, proj_root)if cmake_file is None or not add_to_cmake(cmake_file,gen_path.relative_to(cmake_file.parent),proj_root,):print(f"[INFO] Could not register {gen_path} with build system. Please ...
3
10
3
53
1
307
316
307
null
['cmake_file']
None
null
0
0
0
null
0
null
The function (register_with_cmake) defined within the public class called public.The function start at line 307 and ends at 316. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [307.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
add_to_cmake
def add_to_cmake(list_file: Path, comp_path: Path, project_root: Path = None):"""Adds comp_path directory to CMakeLists.txt. If project_root is supplied,the logged path will be relative to the project root instead of absolute"""short_display_path = (list_fileif project_root is Noneelse project_root.name / list_file.rel...
6
23
3
151
3
319
348
319
null
['short_display_path', 'addition', 'lines']
None
null
0
0
0
null
0
null
The function (add_to_cmake) defined within the public class called public.The function start at line 319 and ends at 348. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [319.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_valid_name
def is_valid_name(word: str):invalid_characters = ["#","%","&","{","}","/","\\","<",">","*","?"," ","$","!","'",'"',":","@","+","`","|","=","-",]for char in invalid_characters:if isinstance(word, str) and char in word:return charif not isinstance(word, str):raise ValueError("Incorrect usage of is_valid_name")return "va...
5
32
1
92
1
351
382
351
null
['invalid_characters']
None
null
0
0
0
null
0
null
The function (is_valid_name) defined within the public class called public.The function start at line 351 and ends at 382. It contains 32 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
get_directory_path_relative_to_root
def get_directory_path_relative_to_root(build: Build) -> str:"""Get the directory path of the current directory (from which F` tools is executed)relative to the root of the F` project.If the current directory is the project root, it returns an empty string.If the current directory is a subdirectory of the project root,...
4
12
1
75
2
11
41
11
null
['proj_root', 'cwd']
None
null
0
0
0
null
0
null
The function (get_directory_path_relative_to_root) defined within the public class called public.The function start at line 11 and ends at 41. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
short
def short(context_key: str, default: str = ""):"""Short help text for contextReturns the short help message (first line of the long help).Args:context_key: mnemonic or other key to look-up appropriate help textdefault: default string to use as the full help textReturns:short help description"""lines = MNEMONIC_HELP_MAP...
2
3
2
37
0
346
358
346
null
[]
None
null
0
0
0
null
0
null
The function (short) defined within the public class called public.The function start at line 346 and ends at 358. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [346.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
long
def long(context_key: str, default: str = "", version="(unknown version)"):"""long help text for contextReturns the long help message.Args:context_key: mnemonic or other key to look-up appropriate help textdefault: default string to use as the full help textReturns:long help description"""return MNEMONIC_HELP_MAP.get(c...
1
2
3
27
0
361
372
361
null
[]
None
null
0
0
0
null
0
null
The function (long) defined within the public class called public.The function start at line 361 and ends at 372. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [361.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
get_version
def get_version(package: str, requirements: Path):"""Get the version as specified in the requirements fileThis will read all requirements from the requirements file and attempt to print the version of the package that islisted within. This can handle multiple styles of requirements. Firm requirements designated by a "=...
10
17
2
138
4
20
48
20
null
['matching_lines', 'valid_lines', 'msg', 'versions']
None
null
0
0
0
null
0
null
The function (get_version) defined within the public class called public.The function start at line 20 and ends at 48. It contains 17 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [20.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
main
def main():"""Parses arguments and acts as entry point for the tool"""parser = argparse.ArgumentParser(description="Detects the required package using a requirements file")parser.add_argument("package", help="Package to check for version")parser.add_argument("requirements", help="Python formatted requirements file to p...
5
20
0
127
3
51
75
51
null
['parser', 'args_ns', 'python_version']
None
null
0
0
0
null
0
null
The function (main) defined within the public class called public.The function start at line 51 and ends at 75. It contains 20 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
valid_values_test
def valid_values_test(type_input, valid_values, sizes):"""Tests to be run on all types"""if not isinstance(sizes, Iterable):sizes = [sizes] * len(valid_values)instantiation = type_input()with pytest.raises(NotInitializedException):instantiation.serialize()assert instantiation.val is None# Setting to None is invalidwith...
4
32
3
233
7
64
108
64
null
['jsonable', 'sizes', 'instantiation', 'new_serialized_bytes', 'by_value', 'deserializer', 'serialized']
None
null
0
0
0
null
0
null
The function (valid_values_test) defined within the public class called public.The function start at line 64 and ends at 108. It contains 32 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [64.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
invalid_values_test
def invalid_values_test(type_input, invalid_values, exception_class=TypeMismatchException):"""Check invalid values for all types"""for item in invalid_values:# Constructor initializationwith pytest.raises(exception_class):instantiation = type_input(item)# Value initializationwith pytest.raises(exception_class):instanti...
3
13
3
84
1
111
127
111
null
['instantiation']
None
null
0
0
0
null
0
null
The function (invalid_values_test) defined within the public class called public.The function start at line 111 and ends at 127. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [111.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
ser_deser_time_test
def ser_deser_time_test(t_base, t_context, secs, usecs):"""Test serialization/deserialization of TimeType objects.This test function creates a time type object with the given parameters andthen serializes it and deserializes it. Also prints it for visual inspectionof the formatted output.Args:t_base (int): Time base fo...
1
9
4
70
3
130
158
130
null
['val', 'buff', 'val2']
None
null
0
0
0
null
0
null
The function (ser_deser_time_test) defined within the public class called public.The function start at line 130 and ends at 158. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [130.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
test_boolean_nominal
def test_boolean_nominal():"""Tests the nominal cases of a BoolType"""instance = valid_values_test(BoolType, [True, False], 1)# Make sure max size is the same as the size and can be derived from the classassert instance.getSize() == instance.__class__.getMaxSize()
1
3
0
33
1
161
165
161
null
['instance']
None
null
0
0
0
null
0
null
The function (test_boolean_nominal) defined within the public class called public.The function start at line 161 and ends at 165. 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..
nasa_fprime-tools
public
public
0
0
test_boolean_off_nominal
def test_boolean_off_nominal():"""Tests the nominal cases of a BoolType"""invalid_values_test(BoolType, filter(lambda item: not isinstance(item, bool), PYTHON_TESTABLE_TYPES))
1
4
0
25
0
168
172
168
null
[]
None
null
0
0
0
null
0
null
The function (test_boolean_off_nominal) defined within the public class called public.The function start at line 168 and ends at 172. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_int_types_nominal
def test_int_types_nominal():"""Tests the integer types"""for type_input, size in [(I8Type, 1), (I16Type, 2), (I32Type, 4), (I64Type, 8)]:total = pow(2, (size * 8) - 1)instance = valid_values_test(type_input, [0, -1, 1, -total, total - 1], size)# Make sure max size is the same as the size and can be derived from the cl...
2
5
0
88
2
175
181
175
null
['total', 'instance']
None
null
0
0
0
null
0
null
The function (test_int_types_nominal) defined within the public class called public.The function start at line 175 and ends at 181. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_int_types_off_nominal
def test_int_types_off_nominal():"""Tests the integer off nominal types"""for type_input, size in [(I8Type, 1), (I16Type, 2), (I32Type, 4), (I64Type, 8)]:total = pow(2, (size * 8) - 1)invalid_values_test(type_input,filter(lambda item: not isinstance(item, int), PYTHON_TESTABLE_TYPES),)invalid_values_test(type_input, [-...
2
10
0
95
1
184
194
184
null
['total']
None
null
0
0
0
null
0
null
The function (test_int_types_off_nominal) defined within the public class called public.The function start at line 184 and ends at 194. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_uint_types_nominal
def test_uint_types_nominal():"""Tests the integer types"""for type_input, size in [(U8Type, 1), (U16Type, 2), (U32Type, 4), (U64Type, 8)]:max_int = pow(2, (size * 8)) - 1instance = valid_values_test(type_input, [0, 1, max_int - 1, max_int], size)# Make sure max size is the same as the size and can be derived from the ...
2
5
0
84
2
197
203
197
null
['max_int', 'instance']
None
null
0
0
0
null
0
null
The function (test_uint_types_nominal) defined within the public class called public.The function start at line 197 and ends at 203. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_uint_types_off_nominal
def test_uint_types_off_nominal():"""Tests the integer off nominal types"""for type_input, size in [(U8Type, 1), (U16Type, 2), (U32Type, 4), (U64Type, 8)]:max_int = pow(2, (size * 8)) - 1invalid_values_test(type_input,filter(lambda item: not isinstance(item, int), PYTHON_TESTABLE_TYPES),)invalid_values_test(type_input,...
2
12
0
97
1
206
218
206
null
['max_int']
None
null
0
0
0
null
0
null
The function (test_uint_types_off_nominal) defined within the public class called public.The function start at line 206 and ends at 218. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_float_types_nominal
def test_float_types_nominal():"""Tests the integer types"""instance = valid_values_test(F32Type, [0.31415000557899475, 0.0, -3.141590118408203], 4)# Make sure max size is the same as the size and can be derived from the classassert instance.getSize() == instance.__class__.getMaxSize()instance = valid_values_test(F64Ty...
1
9
0
79
1
221
232
221
null
['instance']
None
null
0
0
0
null
0
null
The function (test_float_types_nominal) defined within the public class called public.The function start at line 221 and ends at 232. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_float_types_off_nominal
def test_float_types_off_nominal():"""Tests the integer off nominal types"""invalid_values_test(F32Type,filter(lambda item: not isinstance(item, (float, int)), PYTHON_TESTABLE_TYPES),)invalid_values_test(F64Type,filter(lambda item: not isinstance(item, (float, int)), PYTHON_TESTABLE_TYPES),)
1
9
0
55
0
235
244
235
null
[]
None
null
0
0
0
null
0
null
The function (test_float_types_off_nominal) defined within the public class called public.The function start at line 235 and ends at 244. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_enum_nominal
def test_enum_nominal():"""Tests the EnumType serialization and deserialization"""members = {"MEMB1": 0, "MEMB2": 6, "MEMB3": 9}enum_class = EnumType.construct_type("SomeEnum", members)valid = ["MEMB1", "MEMB2", "MEMB3"]instance = valid_values_test(enum_class, valid, [4] * len(valid))# Make sure max size is the same as...
1
6
0
70
4
247
256
247
null
['members', 'enum_class', 'instance', 'valid']
None
null
0
0
0
null
0
null
The function (test_enum_nominal) defined within the public class called public.The function start at line 247 and ends at 256. 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..
nasa_fprime-tools
public
public
0
0
test_enum_off_nominal
def test_enum_off_nominal():"""Tests the EnumType serialization and deserialization"""members = {"MEMB1": 0, "MEMB2": 6, "MEMB3": 9}enum_class = EnumType.construct_type("SomeEnum", members)invalid = ["MEMB12", "MEMB22", "MEMB23"]invalid_values_test(enum_class, invalid, EnumMismatchException)invalid_values_test(enum_cla...
1
9
0
68
3
259
270
259
null
['members', 'enum_class', 'invalid']
None
null
0
0
0
null
0
null
The function (test_enum_off_nominal) defined within the public class called public.The function start at line 259 and ends at 270. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_string_nominal
def test_string_nominal():"""Tests named string types"""py_string = "ABC123DEF456"string_type = StringType.construct_type("MyFancyString", max_length=10)instance = valid_values_test(string_type, [py_string[:10], py_string[:4], py_string[:7]], [12, 6, 9])# String type defined a max-size of 10 plus 2 for the size dataass...
1
7
0
66
3
273
281
273
null
['string_type', 'instance', 'py_string']
None
null
0
0
0
null
0
null
The function (test_string_nominal) defined within the public class called public.The function start at line 273 and ends at 281. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_string_off_nominal
def test_string_off_nominal():"""Tests named string types"""py_string = "ABC123DEF456"string_type = StringType.construct_type("MyFancyString", max_length=10)invalid_values_test(string_type, [py_string], StringSizeException)invalid_values_test(string_type,filter(lambda item: not isinstance(item, str), PYTHON_TESTABLE_TY...
1
8
0
51
2
284
292
284
null
['string_type', 'py_string']
None
null
0
0
0
null
0
null
The function (test_string_off_nominal) defined within the public class called public.The function start at line 284 and ends at 292. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_serializable_basic
def test_serializable_basic():"""Serializable type with basic member types"""member_list = [[("member1", U32Type, "%d"),("member2", U32Type, "%lu"),("member3", I64Type, "%lld"),],[("member4",StringType.construct_type("StringMember1", max_length=10),"%s",),("member5", StringType.construct_type("StringMember2", max_lengt...
2
31
0
205
4
295
327
295
null
['member_list', 'instance', 'valid_values', 'serializable_type']
None
null
0
0
0
null
0
null
The function (test_serializable_basic) defined within the public class called public.The function start at line 295 and ends at 327. It contains 31 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_serializable_basic_off_nominal
def test_serializable_basic_off_nominal():"""Serializable type with basic member types"""member_list = [("member1", U32Type, "%d"),("member2", StringType.construct_type("StringMember1", max_length=10), "%s"),]serializable_type = SerializableType.construct_type("BasicInvalidSerializable", member_list)invalid_values = [(...
2
22
0
133
3
330
354
330
null
['member_list', 'invalid_values', 'serializable_type']
None
null
0
0
0
null
0
null
The function (test_serializable_basic_off_nominal) defined within the public class called public.The function start at line 330 and ends at 354. It contains 22 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_serializable_advanced
def test_serializable_advanced():"""Tests the SerializableType serialization and deserialization"""# First setup some classes to represent various member types ensuring that the serializable can handle themstring_member_class = StringType.construct_type("StringMember", max_length=3)enum_member_class = EnumType.construc...
1
37
0
235
8
357
400
357
null
['instance', 'string_member_class', 'serializable_class', 'enum_member_class', 'sub_serializable_class', 'serializable1', 'array_member_class', 'field_data']
None
null
0
0
0
null
0
null
The function (test_serializable_advanced) defined within the public class called public.The function start at line 357 and ends at 400. It contains 37 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_array_type
def test_array_type():"""Tests the ArrayType serialization and deserialization"""extra_ctor_args = [("TestArray", I32Type, 2, "%d"),("TestArray2", U8Type, 4, "%d"),("TestArray3",StringType.construct_type("TestArrayString", max_length=18),3,"%s",),]values = [[32, 1], [0, 1, 2, 3], ["one", "1234", "1"]]sizes = [8, 4, 14]...
2
20
0
153
6
403
425
403
null
['instance', 'sizes', 'max_sizes', 'values', 'extra_ctor_args', 'type_input']
None
null
0
0
0
null
0
null
The function (test_array_type) defined within the public class called public.The function start at line 403 and ends at 425. It contains 20 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_array_type_off_nominal
def test_array_type_off_nominal():"""Test the array type for invalid values etc"""type_input = ArrayType.construct_type("TestArrayPicky", I32Type, 4, "%d")invalid_inputs = [([1, 2, 3], ArrayLengthException),([1, 2, 3, 4, 5, 6], ArrayLengthException),(["one", "two", "three", "four"], TypeMismatchException),]for invalid,...
2
13
0
109
2
428
443
428
null
['type_input', 'invalid_inputs']
None
null
0
0
0
null
0
null
The function (test_array_type_off_nominal) defined within the public class called public.The function start at line 428 and ends at 443. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_time_type
def test_time_type():"""Tests the TimeType serialization and deserialization"""TIME_SIZE = 11in_no_err_list = [(TimeBase["TB_NONE"].value, 1, 100, 999999),(TimeBase["TB_PROC_TIME"].value, 0xFF, 1234567, 2952),(TimeBase["TB_WORKSTATION_TIME"].value, 8, 1529430215, 12),(TimeBase["TB_SC_TIME"].value, 231, 1344230277, 1234...
3
24
0
221
5
446
477
446
null
['in_no_err_list', 'TIME_SIZE', 'val', 'in_err_list', 'size']
None
null
0
0
0
null
0
null
The function (test_time_type) defined within the public class called public.The function start at line 446 and ends at 477. It contains 24 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
serialize
def serialize(self):return "serialized"
1
2
1
7
0
481
482
481
null
[]
None
null
0
0
0
null
0
null
The function (serialize) defined within the public class called public.The function start at line 481 and ends at 482. 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..
nasa_fprime-tools
public
public
0
0
deserialize
def deserialize(self, data, offset):super(Dummy, self).deserialize(data, offset)return "deserialized"
1
3
3
24
0
484
486
484
null
[]
None
null
0
0
0
null
0
null
The function (deserialize) defined within the public class called public.The function start at line 484 and ends at 486. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [484.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
getSize
def getSize(self):return 0
1
2
1
7
0
488
489
488
null
[]
None
null
0
0
0
null
0
null
The function (getSize) defined within the public class called public.The function start at line 488 and ends at 489. 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..
nasa_fprime-tools
public
public
0
0
getMaxSize
def getMaxSize(cls):return 902
1
2
1
7
0
492
493
492
null
[]
None
null
0
0
0
null
0
null
The function (getMaxSize) defined within the public class called public.The function start at line 492 and ends at 493. 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..
nasa_fprime-tools
public
public
0
0
to_jsonable
def to_jsonable(self):return {"name": "dummy"}
1
2
1
11
0
495
496
495
null
[]
None
null
0
0
0
null
0
null
The function (to_jsonable) defined within the public class called public.The function start at line 495 and ends at 496. 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..
nasa_fprime-tools
public
public
0
0
test_base_type
def test_base_type():with pytest.raises(TypeError) as excinfo:BaseType()assert "Can't instantiate abstract class" in str(excinfo.value)with pytest.raises(TypeError) as excinfo2:ValueType()assert "Can't instantiate abstract class" in str(excinfo2.value)d = Dummy()assert d.serialize() == "serialized"assert d.getSize() ==...
1
14
0
101
1
499
521
499
null
['d']
None
null
0
0
0
null
0
null
The function (test_base_type) defined within the public class called public.The function start at line 499 and ends at 521. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_dictionary_type_errors
def test_dictionary_type_errors():"""Ensure the dictionary type is preventing errors"""# Check no raw calls passing in DictionaryTypewith pytest.raises(AssertionError):DictionaryType.construct_type(DictionaryType, "MyNewString", PROPERTY="one", PROPERTY2="two")# Check consistent field definitions: field valuesDictionar...
1
18
0
145
0
524
549
524
null
[]
None
null
0
0
0
null
0
null
The function (test_dictionary_type_errors) defined within the public class called public.The function start at line 524 and ends at 549. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
setUp
def setUp(self):self.t0 = TimeType(0, 0, 0, 0)self.t1 = TimeType(0, 0, 1, 0)self.t15 = TimeType(0, 0, 1, 500000)
1
4
1
47
0
13
16
13
null
[]
None
null
0
0
0
null
0
null
The function (setUp) defined within the public class called public.The function start at line 13 and ends at 16. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
test_LessThan
def test_LessThan(self):assert self.t0 >= self.t0, "0 is not less than 0"assert self.t0 >= 0, "0 is not less than 0"assert self.t0 < self.t1, "0 is less than 1"assert self.t0 < 1, "0 is less than 1"assert self.t0 < self.t15, "0 is less than 1.5"assert self.t0 < 1.5, "0 is less than 1.5"
1
7
1
61
0
18
24
18
null
[]
None
null
0
0
0
null
0
null
The function (test_LessThan) defined within the public class called public.The function start at line 18 and ends at 24. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..