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
enumerate
def enumerate(self, builder: "Build", context_path: Path) -> List[str]:"""Enumerates build targets, falling back to the context if not found."""try:return self.enumerate_helper(builder, context_path)# should an error occur, delegate to a basic enumeration strategyexcept (MissingBuildCachePath, FileNotFoundError):return...
2
5
3
48
0
100
106
100
null
[]
None
null
0
0
0
null
0
null
The function (enumerate) defined within the public class called public.The function start at line 100 and ends at 106. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [100.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, directory_enumerator: "MultiBuildTargetEnumerator" = None):"""Construct the enumerator with the name of the file"""self.directory_enumerator = (directory_enumeratorif directory_enumerator is not Noneelse MultiBuildTargetEnumerator())
2
6
2
28
0
114
120
114
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 114 and ends at 120. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [114.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
enumerate_helper
def enumerate_helper(self, builder: "Build", context_path: Path) -> List[str]:"""Enumeration helper without error handling"""enumerated_targets = []try:# Get local targetstry:enumerated_targets.extend(self.directory_enumerator.enumerate_helper(builder, context_path))except FileNotFoundError:pass# No local targets, cont...
4
20
3
118
0
122
148
122
null
[]
None
null
0
0
0
null
0
null
The function (enumerate_helper) defined within the public class called public.The function start at line 122 and ends at 148. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [122.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
enumerate
def enumerate(self, builder: "Build", context_path: Path) -> List[str]:"""Recursively enumerates build targets."""enumerated_targets = self.enumerate_helper(builder, context_path)enumerated_targets = (enumerated_targetsif enumerated_targetselse self.directory_enumerator.enumerate(builder, context_path))return enumerate...
2
8
3
49
0
150
158
150
null
[]
None
null
0
0
0
null
0
null
The function (enumerate) defined within the public class called public.The function start at line 150 and ends at 158. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [150.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, directory_enumerator: "MultiBuildTargetEnumerator" = None):"""Construct the enumerator with the name of the file"""self.directory_enumerator = (directory_enumeratorif directory_enumerator is not Noneelse MultiBuildTargetEnumerator())
2
2
2
28
0
164
166
114
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 164 and ends at 166. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [114.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
set_build_targets
def set_build_targets(self, build_targets: List[str]):"""Set the build targets"""self.build_targets = build_targets
1
2
2
18
0
168
170
168
null
[]
None
null
0
0
0
null
0
null
The function (set_build_targets) defined within the public class called public.The function start at line 168 and ends at 170. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [168.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
enumerate
def enumerate(self, builder: "Build", context_path: Path) -> List[str]:"""Enumerates build targets available in the given context path."""raise NotImplementedError()
1
2
3
23
0
172
174
48
null
[]
None
null
0
0
0
null
0
null
The function (enumerate) defined within the public class called public.The function start at line 172 and ends at 174. It contains 2 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..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self):super().__init__(build_targets=None)DesignateTargetAction.register_designee(self)
1
3
1
21
0
180
182
180
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 180 and ends at 182. 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
_get_project_path
def _get_project_path(builder: "Build", module: Union[str, Path]) -> Path:"""Get the project path from a given module stringGet the project path for a given module or path. Paths are assumed to be contexts and returned verbatim. Modules areconverted to a project string and then that is returned.Args:builder: builder ob...
2
7
2
64
1
16
33
16
null
['project_root']
None
null
0
0
0
null
0
null
The function (_get_project_path) defined within the public class called public.The function start at line 16 and ends at 33. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [16.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
_using_root
def _using_root(builder: "Build", context: Path, scope: TargetScope):"""Are we using repository root for things"""return builder.is_project_root(context) or scope == TargetScope.GLOBAL
2
2
3
29
0
36
38
36
null
[]
None
null
0
0
0
null
0
null
The function (_using_root) defined within the public class called public.The function start at line 36 and ends at 38. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [36.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_supported
def is_supported(self, builder: "Build", context: Path):"""Is supported by the list of build target namesChecks if the build target names supplied will support this target. Is overridden by subclasses.Args:builder: builder to check if this action is supportedcontext: contextual path to checkReturn:True if supported fal...
1
2
3
26
0
52
64
52
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 52 and ends at 64. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [52.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], Dict[str, bool]],):"""Executes the gcovr target"""if not shutil.which(self.EXECUTABLE):print(f"[ERROR] Cannot find executable: {self.EXECUTABLE}. Unable to run coverage report.",file=sys.stderr,)returnbuild_cache_resolved = Path(buil...
25
106
5
559
0
66
184
66
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 66 and ends at 184. It contains 106 lines of code and it has a cyclomatic complexity of 25. It takes 5 parameters, represented as [66.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
option_args
def option_args(self):"""Option arguments"""return [("--all-sources", "[coverage only] Include all sources in coverage"),("--comp-ac", "[coverage only] Include component autocode in coverage"),("--port-ac", "[coverage only] Include port autocode in coverage"),("--type-ac", "[coverage only] Include data type autocode in...
1
9
1
45
0
186
195
186
null
[]
None
null
0
0
0
null
0
null
The function (option_args) defined within the public class called public.The function start at line 186 and ends at 195. 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
allows_pass_args
def allows_pass_args(self):"""Gcovr allows pass-through arguments"""return True
1
2
1
8
0
197
199
197
null
[]
None
null
0
0
0
null
0
null
The function (allows_pass_args) defined within the public class called public.The function start at line 197 and ends at 199. 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
pass_handler
def pass_handler(self):"""Pass handler"""return self.EXECUTABLE
1
2
1
10
0
201
203
201
null
[]
None
null
0
0
0
null
0
null
The function (pass_handler) defined within the public class called public.The function start at line 201 and ends at 203. 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,scope: TargetScope,build_target_enumerators: List[BuildTargetEnumerator],*args,**kwargs,):"""Constructor setting child targets"""check_target = CheckTarget(scope=scope,build_target_enumerators=build_target_enumerators,*args,**kwargs,)# Reuse the enumerator for testsgcovr_target = Gcovr(scope)super()._...
1
20
5
72
0
213
234
213
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 213 and ends at 234. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [213.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
before_get
def before_get(self, parser, section, option, value, defaults):"""Pre-process sections to replace environment variablesRuns before the value is gotten to replace environment variables. It will use os.path.expandvars to do theactual substitution on any value in the "environment" section. Other pre-processing is done fir...
2
3
6
49
0
31
47
31
null
[]
None
null
0
0
0
null
0
null
The function (before_get) defined within the public class called public.The function start at line 31 and ends at 47. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [31.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
find_fprime
def find_fprime(settings: dict) -> Path:"""Finds F prime by recursing parent to parent until a matching directory is found."""needle = Path("fprime/cmake/FPrime.cmake")path = settings["_cmake_project_root"]while path != path.parent:if (path / needle).is_file():return path / "fprime"path = path.parentraise FprimeLocatio...
3
10
1
54
2
58
70
58
null
['needle', 'path']
None
null
0
0
0
null
0
null
The function (find_fprime) defined within the public class called public.The function start at line 58 and ends at 70. 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..
nasa_fprime-tools
public
public
0
0
join
def join(key: Path, addition: str, settings: dict):"""Joins a settings key to the addition"""return settings[key] / addition
1
2
3
23
0
73
75
73
null
[]
None
null
0
0
0
null
0
null
The function (join) defined within the public class called public.The function start at line 73 and ends at 75. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [73.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
read_safe_path
def read_safe_path(parser: configparser.ConfigParser,section: str,key: str,ini_file: Path,exists: bool = True,) -> List[Path]:"""Reads path(s), safely, from the config parser.Validates the path(s) exists or raises an exception. Paths areseparated by ':'.This will also expand relative paths relative to the settings file...
5
19
5
140
0
114
143
114
null
[]
None
null
0
0
0
null
0
null
The function (read_safe_path) defined within the public class called public.The function start at line 114 and ends at 143. It contains 19 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [114.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
read_setting.get_default_value
def get_default_value():"""Calculates the default value for the given setting"""return default(settings) if callable(default) else default
2
2
0
17
0
156
158
156
null
[]
None
null
0
0
0
null
0
null
The function (read_setting.get_default_value) defined within the public class called public.The function start at line 156 and ends at 158. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
read_setting
def read_setting(config_parser: configparser.ConfigParser,settings: Dict[str, Any],section: str,key: str,settings_type: SettingType,default: Union[Callable, Any],):"""Reads an individual setting"""def get_default_value():"""Calculates the default value for the given setting"""return default(settings) if callable(defaul...
7
34
6
162
0
146
184
146
null
[]
None
null
0
0
0
null
0
null
The function (read_setting) defined within the public class called public.The function start at line 146 and ends at 184. It contains 34 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [146.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
load
def load(settings_file: Path, platform: str = "native", is_ut: bool = False):"""Load settings from specified file or from specified build directory. Either a specific file or the builddirectory must be not None.:param settings_file: file to load settings from (in INI format). Must be specified if build_dir is not.:para...
11
52
3
275
0
187
261
187
null
[]
None
null
0
0
0
null
0
null
The function (load) defined within the public class called public.The function start at line 187 and ends at 261. It contains 52 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [187.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
load_environment
def load_environment(env_file):"""Load the environment from the given parser.:param env_file: load environment from this file:return: environment dictionary"""parser = configparser.ConfigParser(interpolation=EnvironmentVariableInterpolation())parser.optionxform = strparser.read(env_file)env_dict = {}try:for key, value ...
3
13
1
61
0
264
282
264
null
[]
None
null
0
0
0
null
0
null
The function (load_environment) defined within the public class called public.The function start at line 264 and ends at 282. It contains 13 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, scope: TargetScope):"""Set scope of this action"""self.original_context = Noneself.scope = scope
1
3
2
20
0
44
47
44
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 44 and ends at 47. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_supported
def is_supported(self, builder: "Build", context_path: Path):"""Is this target supported via the given contextual path"""pass
1
2
3
15
0
50
52
50
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 50 and ends at 52. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [50.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], Dict[str, bool]],):"""Executes the given targe with the given contextual path"""
1
6
5
39
0
55
61
55
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 55 and ends at 61. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [55.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
option_args
def option_args(self) -> List[Tuple[str, str]]:"""List of option arguments handled by this targetOption flags are switches that are not allowed arguments. The current design defaults the value to False unlessthe switch is supplied. This function is expected to return a list of pairs of switch flag and description helpt...
1
2
1
19
0
63
76
63
null
[]
None
null
0
0
0
null
0
null
The function (option_args) defined within the public class called public.The function start at line 63 and ends at 76. 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
allows_pass_args
def allows_pass_args(self):"""Target allows pass-through arguments"""return False
1
2
1
8
0
78
80
78
null
[]
None
null
0
0
0
null
0
null
The function (allows_pass_args) defined within the public class called public.The function start at line 78 and ends at 80. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
pass_handler
def pass_handler(self):"""Handler of pass-through args"""return None
1
2
1
8
0
82
84
82
null
[]
None
null
0
0
0
null
0
null
The function (pass_handler) defined within the public class called public.The function start at line 82 and ends at 84. 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
__repr__
def __repr__(self):"""Representation"""return f"{self.__class__.__name__}"
1
2
1
9
0
86
88
86
null
[]
None
null
0
0
0
null
0
null
The function (__repr__) defined within the public class called public.The function start at line 86 and ends at 88. 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, scope: TargetScope, build_target_enumerator: BuildTargetEnumerator):"""Set scope of this action"""super().__init__(scope)self.build_target_enumerator = build_target_enumerator
1
5
3
27
0
94
99
94
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 94 and ends at 99. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [94.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_supported
def is_supported(self, builder: "Build", context_path: Path):"""Is supported by the list of build target namesChecks if the build target names supplied will support this target. Is overridden by subclasses.Args:builder: builder to check if this action is supportedcontext: contextual path to checkReturn:True if supporte...
1
5
3
37
0
101
116
101
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 101 and ends at 116. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [101.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], Dict[str, bool]],):"""Executes the given target"""self.original_context = contextenumerated_targets: TargetContext = self.build_target_enumerator.enumerate(builder, context)return self.execute_all(builder, enumerated_targets, args)
1
11
5
69
0
118
129
118
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 118 and ends at 129. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [118.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
execute_all
def execute_all(self,builder: "Build",context: TargetContext,args: Tuple[Dict[str, str], List[str], Dict[str, bool]],):"""Executes all targets supplied via the context listThis method is passed the enumerated context path, receiving context as a list of strings representingenumerated context as specified via self.build...
1
7
5
40
0
131
150
131
null
[]
None
null
0
0
0
null
0
null
The function (execute_all) defined within the public class called public.The function start at line 131 and ends at 150. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [131.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
any_supported
def any_supported(self, builder: "Build", context: TargetContext) -> bool:"""Is supported by the list of build target namesChecks if the build target names supplied will support this target. Is overridden by subclasses.Args:builder: builder to check if this action is supportedcontext: contextual path to checkReturn:Tru...
1
2
3
23
0
152
164
152
null
[]
None
null
0
0
0
null
0
null
The function (any_supported) defined within the public class called public.The function start at line 152 and ends at 164. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [152.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self,mnemonic: str,desc: str,scope: TargetScope,build_type: BuildType = None,build_target_enumerator: BuildTargetEnumerator = None,flags: set = None,):"""Constructs a build target and registers it as one of the global targetsAs part of the construction of a Target it is registered as part of the targets av...
3
16
7
91
0
184
214
184
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 184 and ends at 214. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [184.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
register_target
def register_target(cls, target: "Target"):"""Registers the target"""cls.ALL_TARGETS.append(target)
1
2
2
18
0
217
219
217
null
[]
None
null
0
0
0
null
0
null
The function (register_target) defined within the public class called public.The function start at line 217 and ends at 219. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [217.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__repr__
def __repr__(self):"""Representation"""return f"{self.__class__.__name__}"
1
2
1
9
0
221
223
86
null
[]
None
null
0
0
0
null
0
null
The function (__repr__) defined within the public class called public.The function start at line 221 and ends at 223. 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
__str__
def __str__(self):"""Makes this target into a string"""return self.config_string(self.mnemonic, self.flags)
1
2
1
19
0
225
227
225
null
[]
None
null
0
0
0
null
0
null
The function (__str__) defined within the public class called public.The function start at line 225 and ends at 227. 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
config_string
def config_string(mnemonic, flags):"""Converts a mnemonic and set of flags to stringArgs:mnemonic: mnemonic of the targetflags: set of flags to pair with mnemonicReturns:string of format "mnemonic --flag1 --flag2 ...""""flag_string = " ".join([f"--{flag}" for flag in flags])flag_string = f" {flag_string}" if flag_strin...
3
4
2
34
0
230
241
230
null
[]
None
null
0
0
0
null
0
null
The function (config_string) defined within the public class called public.The function start at line 230 and ends at 241. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [230.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
get_all_possible_flags
def get_all_possible_flags(cls) -> Set[str]:"""Gets list of all targets' flags usedReturns:List of targets supported by the system"""return functools.reduce(lambda agg, item: agg.union(item.flags), cls.get_all_targets(), set())
1
4
1
40
0
244
252
244
null
[]
None
null
0
0
0
null
0
null
The function (get_all_possible_flags) defined within the public class called public.The function start at line 244 and ends at 252. 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
get_all_targets
def get_all_targets(cls) -> List["Target"]:"""Gets list of all targets registeredReturns:List of targets supported by the system"""return cls.ALL_TARGETS
1
2
1
15
0
255
261
255
null
[]
None
null
0
0
0
null
0
null
The function (get_all_targets) defined within the public class called public.The function start at line 255 and ends at 261. 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
get_target
def get_target(cls, mnemonic: str, flags: Set[str]) -> "Target":"""Gets the actual build target given the parsed namespaceUsing the global list of build targets and the flags supplied to the namespace, attempt to determine which buildtargets can be used. If more than one are found, then generate exception.Args:mnemonic...
5
11
3
71
0
264
286
264
null
[]
None
null
0
0
0
null
0
null
The function (get_target) defined within the public class called public.The function start at line 264 and ends at 286. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [264.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, composite_targets: List["Target"], *args, **kwargs):"""Constructor setting child targets"""super().__init__(*args, **kwargs)self.targets = composite_targets
1
3
4
36
0
292
295
292
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 292 and ends at 295. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [292.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__repr__
def __repr__(self):"""Representation"""return f"{self.__class__.__name__}"
1
2
1
9
0
297
299
86
null
[]
None
null
0
0
0
null
0
null
The function (__repr__) defined within the public class called public.The function start at line 297 and ends at 299. 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
is_supported
def is_supported(self, builder: "Build", context: Path):"""Any of the targets supported by the list of build target namesChecks if the build target names supplied will support this target. Is overridden by subclasses.Args:builder: builder to check if this action is supportedcontext: contextual path to checkReturn:True ...
2
6
3
42
0
301
318
301
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 301 and ends at 318. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [301.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
option_args
def option_args(self):"""Returns the set of option arguments"""return list(set(itertools.chain.from_iterable([target.option_args() for target in self.targets])))
2
8
1
33
0
320
328
320
null
[]
None
null
0
0
0
null
0
null
The function (option_args) defined within the public class called public.The function start at line 320 and ends at 328. 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
allows_pass_args
def allows_pass_args(self):"""Pass args allowed if any child allows it"""return functools.reduce(lambda sum, target: sum or target.allows_pass_args(), self.targets, False)
2
4
1
30
0
330
334
330
null
[]
None
null
0
0
0
null
0
null
The function (allows_pass_args) defined within the public class called public.The function start at line 330 and ends at 334. 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
pass_handler
def pass_handler(self):"""Pass handler as , separated list"""handlers = [target.pass_handler() for target in self.targets if target.pass_handler()]return ",".join(handlers)
3
5
1
34
0
336
341
336
null
[]
None
null
0
0
0
null
0
null
The function (pass_handler) defined within the public class called public.The function start at line 336 and ends at 341. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
execute
def execute(self, *args, **kwargs):"""Execute the composite target"""for child in self.targets:# Composite actions must override scope as a delegator may have acted to change the scopeold_scope = child.scopetry:child.scope = self.scopechild.execute(*args, **kwargs)finally:child.scope = old_scope
3
8
3
50
0
343
352
343
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 343 and ends at 352. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [343.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
execute_all
def execute_all(self,builder: "Build",context: TargetContext,args: Tuple[Dict[str, str], List[str], Dict[str, bool]],):# Ensure the cache is refreshedcontext = ["refresh_cache"] + contextfor build_target in context:if builder.is_verbose():print(f"[INFO] Building: {build_target}")self.execute_one(builder, build_target, ...
3
11
5
72
0
358
369
358
null
[]
None
null
0
0
0
null
0
null
The function (execute_all) defined within the public class called public.The function start at line 358 and ends at 369. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [358.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
execute_one
def execute_one(self,builder: "Build",build_target: str,args: Tuple[Dict[str, str], List[str], Dict[str, bool]],):"""Execute a build targetExecutes a target within the build system. This will execute the target by calling into the build system.Context is supplied such that the system can match local targets to the glob...
1
8
5
64
0
371
392
371
null
[]
None
null
0
0
0
null
0
null
The function (execute_one) defined within the public class called public.The function start at line 371 and ends at 392. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [371.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, message, build_cache=""):super().__init__(message)self.cache = build_cache
1
3
3
24
0
10
12
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 10 and ends at 12. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [10.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
get_suffix
def get_suffix(self):"""Get the suffix of a directory supporting this build"""if self == BuildType.BUILD_NORMAL:return ""if self == BuildType.BUILD_TESTING:return "-ut"msg = f"{self.name} is not a supported build type"raise InvalidBuildTypeException(msg)
3
7
1
33
0
58
65
58
null
[]
None
null
0
0
0
null
0
null
The function (get_suffix) defined within the public class called public.The function start at line 58 and ends at 65. It contains 7 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
get_cmake_build_type
def get_cmake_build_type(self):"""Get the suffix of a directory supporting this build"""if self == BuildType.BUILD_NORMAL:return "Release"if self == BuildType.BUILD_TESTING:return "Testing"if self == BuildType.BUILD_FPP_LOCS:return "Release"if self == BuildType.BUILD_CUSTOM:return "Custom"msg = f"{self.name} is not a s...
5
11
1
51
0
67
78
67
null
[]
None
null
0
0
0
null
0
null
The function (get_cmake_build_type) defined within the public class called public.The function start at line 67 and ends at 78. It contains 11 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_public_types
def get_public_types() -> List["BuildType"]:"""Returns public build types"""return [BuildType.BUILD_NORMAL, BuildType.BUILD_TESTING]
1
2
0
20
0
81
83
81
null
[]
None
null
0
0
0
null
0
null
The function (get_public_types) defined within the public class called public.The function start at line 81 and ends at 83. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
run_fpp_check
def run_fpp_check(build: "Build",parsed: argparse.Namespace,_: Dict[str, str],__: Dict[str, str],___: List[str],):"""Run fpp check applicationHandles the fpp-check endpoint by running the utility fpp-check.Args:build: build directory outputparsed: parsed input arguments_: unused cmake_args__: unused make_args___: unuse...
2
12
5
76
0
15
37
15
null
[]
None
null
0
0
0
null
0
null
The function (run_fpp_check) defined within the public class called public.The function start at line 15 and ends at 37. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [15.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_fpp_to_dict
def run_fpp_to_dict(build: "Build",parsed: argparse.Namespace,_: Dict[str, str],__: Dict[str, str],___: List[str],):"""Run the fpp-to-dict utilityArgs:build: build directory outputparsed: parsed input arguments_: unused cmake_args__: unused make_args___: unused pass-through arguments"""FppUtility("fpp-to-dict", imports...
3
18
5
105
0
40
66
40
null
[]
None
null
0
0
0
null
0
null
The function (run_fpp_to_dict) defined within the public class called public.The function start at line 40 and ends at 66. It contains 18 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [40.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
add_fpp_parsers
def add_fpp_parsers(subparsers, common: argparse.ArgumentParser) -> Tuple[Dict[str, Callable], Dict[str, argparse.ArgumentParser]]:"""Sets up the fpp command line parsersCreates command line parsers for fpp commands and associates these commands to processing functions for those fppcommands.Args:subparsers: subparsers ...
1
23
2
153
4
69
105
69
null
['check_parser', 'fpp_to_dict_parser', 'check_parser_group', 'fpp_to_dict_group']
None
null
0
0
0
null
0
null
The function (add_fpp_parsers) defined within the public class called public.The function start at line 69 and ends at 105. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [69.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, file):super().__init__(f"Can not find {file}. Does current directory define any FPP files?")
1
4
2
16
0
24
27
24
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 27. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [24.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, name, imports_as_sources=True):"""Construct this utility with the supplied nameArgs:name: name of the fpp utility to run"""super().__init__(TargetScope.LOCAL)self.utility = nameself.imports_as_sources = imports_as_sources
1
4
3
32
0
45
53
45
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 45 and ends at 53. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [45.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
is_supported
def is_supported(self, _=None, __=None):"""Returns whether this utility is supported"""return bool(shutil.which(self.utility))
1
2
3
26
0
55
57
55
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 55 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [55.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
get_locations_file
def get_locations_file(builder: Build) -> Path:"""Returns the location of the FPP locations fileReturns a path to the FPP locations index within the build cache managed by the supplied build object.Args:builder: build object to useReturn:path to the locations index"""locations_path = Path(builder.build_dir) / "locs.fpp...
2
5
1
35
0
60
74
60
null
[]
None
null
0
0
0
null
0
null
The function (get_locations_file) defined within the public class called public.The function start at line 60 and ends at 74. 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
get_fpp_inputs
def get_fpp_inputs(builder: Build, context: Path) -> Tuple[List[Path], List[Path]]:"""Return the necessary inputs to an FPP run to forward to fpp utilitiesReturns two types of FPP files input into FPP utilities: the FPP files associated with the given module and theFPP files included by those files (e.g. commands.fpp)....
7
17
2
145
0
77
106
77
null
[]
None
null
0
0
0
null
0
null
The function (get_fpp_inputs) defined within the public class called public.The function start at line 77 and ends at 106. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [77.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 the fpp utilityExecutes the FPP utility wrapped by this class. Executes it with respect to the context path supplied and usingthe builder object. Supplies arguments in args to the utility.Args:builder: build object to ru...
8
33
4
243
0
108
160
108
null
[]
None
null
0
0
0
null
0
null
The function (execute) defined within the public class called public.The function start at line 108 and ends at 160. It contains 33 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [108.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
_apply_clang_formatting
def _apply_clang_formatting(build: Build,framework_path: Path,files_dir: Path,generated_file_names: list[Path],):"""Format files if clang-format is available.Args:framework_path: F Prime framework pathfiles_dir: Folder with generated filesgenerated_file_names: List of generated file names"""format_file = framework_path...
4
17
4
93
2
23
48
23
null
['clang_formatter', 'format_file']
None
null
0
0
0
null
0
null
The function (_apply_clang_formatting) defined within the public class called public.The function start at line 23 and ends at 48. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [23.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
_move_ut_templates
def _move_ut_templates(files_dir, generated_file_names):"""Move generated UT templates into "files_dir/<UT_FILES_TARGET_PATH>".The UT_TEMPLATE_FILE_SUFFIX is added into a file name unless it is already present.Args:files_dir: Folder with generated filesgenerated_file_names: List of generated file names"""# Create the U...
3
12
2
73
4
51
73
51
null
['destination_path', 'source_path', 'ut_path', 'destination_file_name']
None
null
0
0
0
null
0
null
The function (_move_ut_templates) defined within the public class called public.The function start at line 51 and ends at 73. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [51.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
fpp_generate_implementation
def fpp_generate_implementation(build: Build,output_dir: Path,context: Path,apply_formatting: bool,generate_ut: bool,generate_test_helpers: bool = False,overwrite: bool = False,) -> int:"""Generate implementation files from FPP templates.Args:build: Build objectoutput_dir: The directory where the generated files will b...
8
50
7
288
6
76
149
76
null
['framework_path', 'prefixes', 'generated_file_names', 'new_filename', 'gen_files', 'file_list']
None
null
0
0
0
null
0
null
The function (fpp_generate_implementation) defined within the public class called public.The function start at line 76 and ends at 149. It contains 50 lines of code and it has a cyclomatic complexity of 8. It takes 7 parameters, represented as [76.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_fpp_impl
def run_fpp_impl(build: Build,parsed: argparse.Namespace,_: Dict[str, str],__: Dict[str, str],___: List[str],):"""Args:build: build objectparsed: parsed input arguments_: unused cmake_args__: unused make_args___: unused pass-through arguments"""return fpp_generate_implementation(build,Path(parsed.output_dir),Path(parse...
1
16
5
77
0
152
177
152
null
[]
None
null
0
0
0
null
0
null
The function (run_fpp_impl) defined within the public class called public.The function start at line 152 and ends at 177. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [152.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
add_fpp_impl_parsers
def add_fpp_impl_parsers(subparsers, common: argparse.ArgumentParser) -> Tuple[Dict[str, Callable], Dict[str, argparse.ArgumentParser]]:"""Sets up the fprime-viz command line parsersCreates command line parsers for fprime-viz commands and associates these commands to processingfunctions for those fpp commands.Args:subp...
1
36
2
154
1
180
227
180
null
['impl_parser']
None
null
0
0
0
null
0
null
The function (add_fpp_impl_parsers) defined within the public class called public.The function start at line 180 and ends at 227. It contains 36 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [180.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
run_fprime_visualize
def run_fprime_visualize(build: "Build",parsed: argparse.Namespace,_: Dict[str, str],__: Dict[str, str],___: List[str],):"""Run pipeline of utilities to generate visualization. This includes:- fpp-to-layout- fpl-layout- start fprime-visual Flask app to serve visualizationArgs:build: build directory outputparsed: parsed...
11
88
5
480
15
23
133
23
null
['config', 'source_resolved', 'layout_txt_file_match', 'topology_name', 'viz_cache', 'app', 'topology_dirs', 'connection_graph_json', 'txt_cache', 'viz_cache_base', 'topology_connections', 'txt_contents', 'combined_env', 'topology_json', 'source_dirs']
None
null
0
0
0
null
0
null
The function (run_fprime_visualize) defined within the public class called public.The function start at line 23 and ends at 133. It contains 88 lines of code and it has a cyclomatic complexity of 11. It takes 5 parameters, represented as [23.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
add_fpp_viz_parsers
def add_fpp_viz_parsers(subparsers, common: argparse.ArgumentParser) -> Tuple[Dict[str, Callable], Dict[str, argparse.ArgumentParser]]:"""Sets up the fprime-viz command line parsersCreates command line parsers for fprime-viz commands and associates these commands to processing functions for those fppcommands.Args:subpa...
1
21
2
100
1
136
168
136
null
['viz_parser']
None
null
0
0
0
null
0
null
The function (add_fpp_viz_parsers) defined within the public class called public.The function start at line 136 and ends at 168. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [136.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
fpp_depend
def fpp_depend(cache_folder, input_file, locs_files) -> str:"""This function calculates the dependencies for an fpp file using fprime-util to getthe location of the build cache fpp-depend.Args:input_file: The input fpp file to calculate dependencies forlocs_file: The locs.fpp file to use for dependency calculationRetur...
2
30
3
122
1
5
50
5
null
['fppDep']
None
null
0
0
0
null
0
null
The function (fpp_depend) defined within the public class called public.The function start at line 5 and ends at 50. It contains 30 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [5.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
compute_simple_dependencies
def compute_simple_dependencies(locs_file, input):print(f"[fpp] Calculating simple fpp dependencies for {os.path.basename(input)}...")try:fppDep = subprocess.run(["fpp-depend", locs_file, input],check=True,stdout=subprocess.PIPE,)return fppDep.stdout.decode("utf-8")except subprocess.CalledProcessError as e:print(f"[ERR...
2
12
2
62
1
53
66
53
null
['fppDep']
None
null
0
0
0
null
0
null
The function (compute_simple_dependencies) defined within the public class called public.The function start at line 53 and ends at 66. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [53.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
fpp_to_json
def fpp_to_json(input_file):"""This function runs fpp-to-json on an fpp file to generate a JSON AST.Args:input_file: The input fpp file to run fpp-to-json onReturns:None"""# run fppprint(f"[fpp] Running fpp-to-json for {os.path.basename(input_file)}...")cmdS = ["fpp-to-json", input_file, "-s"]try:subprocess.run(cmdS, c...
2
7
1
51
1
69
88
69
null
['cmdS']
None
null
0
0
0
null
0
null
The function (fpp_to_json) defined within the public class called public.The function start at line 69 and ends at 88. 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..
nasa_fprime-tools
public
public
0
0
fpp_format
def fpp_format(input_file):"""This function runs fpp-format on an fpp file to format the file.Args:input_file: The input fpp file to run fpp-format onReturns:None"""# run fpp-formatprint(f"[fpp] Running fpp-format for {os.path.basename(input_file)}...")try:fppFormat = subprocess.run(["fpp-format", input_file], check=Tr...
2
10
1
58
1
91
112
91
null
['fppFormat']
None
null
0
0
0
null
0
null
The function (fpp_format) defined within the public class called public.The function start at line 91 and ends at 112. 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
fpp_locate_defs
def fpp_locate_defs(input_file):"""This function runs fpp-locate-defs on an fpp file to locate definitions.Args:input_file: The input fpp file to run fpp-locate-defs onlocs_file:The locs.fpp file used to find the base directory to base def locationsoff of"""print(f"[fpp] Running fpp-locate-defs for {os.path.basename(in...
2
13
1
73
2
115
138
115
null
['fppLocateDefs', 'base_dir']
None
null
0
0
0
null
0
null
The function (fpp_locate_defs) defined within the public class called public.The function start at line 115 and ends at 138. 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
qualifier_calculator
def qualifier_calculator(qualifier_JSON):"""Calculate the qualified name for a variable, instance, etcArgs:qualifier_JSON: The JSON AST for the qualifier"""next_idx = qualifier_JSON["e"]["AstNode"]["data"]path = ""if "ExprDot" in next_idx:path += qualifier_calculator(next_idx["ExprDot"])elif "ExprIdent" in next_idx:pat...
3
8
1
64
2
8
24
8
null
['path', 'next_idx']
None
null
0
0
0
null
0
null
The function (qualifier_calculator) defined within the public class called public.The function start at line 8 and ends at 24. 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..
nasa_fprime-tools
public
public
0
0
value_parser
def value_parser(value_JSON):"""Parse a value from the JSON AST. This could be parsing integers, strings, arrays, etc.Args:value_JSON: The JSON AST for the value"""checker = value_JSON["AstNode"]["data"]if "Unqualified" in checker:return checker["Unqualified"]["name"]elif "Qualified" in checker:qf = (checker["Qualified...
5
17
1
107
2
27
50
27
null
['qf', 'checker']
None
null
0
0
0
null
0
null
The function (value_parser) defined within the public class called public.The function start at line 27 and ends at 50. It contains 17 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
Binops
def Binops(binop):"""Convert binop string name to actual operatorArgs:binop: The binop string name"""if binop == "Add":return "+"elif binop == "Sub":return "-"elif binop == "Mul":return "*"elif binop == "Div":return "/"raise Exception("Invalid binop")
5
10
1
39
0
53
69
53
null
[]
None
null
0
0
0
null
0
null
The function (Binops) defined within the public class called public.The function start at line 53 and ends at 69. It contains 10 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
parse_binop
def parse_binop(constant_JSON):"""Parse a binary operation from the JSON ASTArgs:constant_JSON: The JSON AST for the binary operation"""idx_LHS = 1idx_RHS = 2binop = ""constant_JSON = constant_JSON["ExprBinop"]binop_LHS = constant_JSON[f"e{idx_LHS}"]["AstNode"]["data"]if "ExprBinop" in binop_LHS:binop += parse_binop(bi...
2
17
1
92
5
72
97
72
null
['binop_LHS', 'idx_LHS', 'constant_JSON', 'binop', 'idx_RHS']
None
null
0
0
0
null
0
null
The function (parse_binop) defined within the public class called public.The function start at line 72 and ends at 97. It contains 17 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
parse_constant
def parse_constant(constant_JSON):"""Parse a constant from the JSON ASTArgs:constant_JSON: The JSON AST for the constant"""constant_Value_JSON = constant_JSON["AstNode"]["data"]if "ExprLiteralString" in constant_Value_JSON:return '"' + constant_Value_JSON["ExprLiteralString"]["value"] + '"'elif "ExprLiteralInt" in cons...
10
22
1
144
1
100
128
100
null
['constant_Value_JSON']
None
null
0
0
0
null
0
null
The function (parse_constant) defined within the public class called public.The function start at line 100 and ends at 128. It contains 22 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
parse_array
def parse_array(constant_JSON):"""Parse an array from the JSON ASTArgs:constant_JSON: The JSON AST for the array"""arrayOpen = "["constant_Value_JSON = constant_JSON["ExprArray"]["elts"]for i in range(len(constant_Value_JSON)):if "ExprArray" not in constant_Value_JSON[i]["AstNode"]["data"]:arrayOpen = arrayOpen + parse...
4
15
1
98
2
131
153
131
null
['arrayOpen', 'constant_Value_JSON']
None
null
0
0
0
null
0
null
The function (parse_array) defined within the public class called public.The function start at line 131 and ends at 153. It contains 15 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
parse_struct
def parse_struct(constant_JSON):"""Parse a struct from the JSON ASTArgs:constant_JSON: The JSON AST for the struct"""structOpen = "{\n"for param in constant_JSON["ExprStruct"]["members"]:structOpen = (structOpen+ ""+ param["AstNode"]["data"]["name"]+ " = "+ value_parser(param["AstNode"]["data"]["value"])+ ",\n")return ...
2
12
1
60
1
156
175
156
null
['structOpen']
None
null
0
0
0
null
0
null
The function (parse_struct) defined within the public class called public.The function start at line 156 and ends at 175. 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
openFppFile
def openFppFile(path):if not os.path.isabs(path):path = str(Path(path).resolve())pathDir = os.path.dirname(path)fileBasename = os.path.basename(path)folderName = f"/{fileBasename.split('.')[0]}Cache"pathToFolder = pathDir + folderNameif not os.path.exists(pathToFolder):try:os.mkdir(pathToFolder)except OSError as e:rais...
5
20
1
150
6
178
207
178
null
['fileBasename', 'folderName', 'pathDir', 'AST', 'path', 'pathToFolder']
None
null
0
0
0
null
0
null
The function (openFppFile) defined within the public class called public.The function start at line 178 and ends at 207. 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
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.members = []self.preannot = Noneself.postannot = Noneself.qf = None
1
7
2
38
0
23
30
23
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 23 and ends at 30. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.id = Noneself.value = Noneself.preannot = Noneself.postannot = Noneself.qf = None
1
7
2
37
0
44
51
44
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 44 and ends at 51. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.id = Noneself.value = Noneself.preannot = Noneself.postannot = Noneself.qf = None
1
7
2
37
0
65
72
44
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 65 and ends at 72. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.component_name = Noneself.base_id = Noneself.queue_size = Noneself.stack_size = Noneself.cpu = Noneself.priority = Noneself.phases = {"configObjects": None,"configComponents": None,"readParameters": None,"configConstants": None,"tearDownComponents": None,"start...
1
22
2
100
0
92
114
92
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 92 and ends at 114. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [92.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.members = []self.preannot = Noneself.postannot = Noneself.qf = None
1
7
2
38
0
128
135
23
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 128 and ends at 135. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.preannot = Noneself.postannot = Noneself.qf = None
1
6
2
32
0
148
154
148
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 148 and ends at 154. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [148.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.connections = []self.type = Noneself.preannot = Noneself.postannot = Noneself.qf = None
1
8
2
43
0
169
177
169
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 169 and ends at 177. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [169.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
__init__
def __init__(self, ast):self.ast = astself.name = Noneself.members = []self.preannot = Noneself.postannot = Noneself.qf = None
1
7
2
38
0
191
198
23
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 191 and ends at 198. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
walkModule
def walkModule(data, oldQf):module = NodeStructs.Module(data)module: NodeStructs.Module = JSONConverter.ModuleConverter(module).convert()if oldQf == "":qf = module.nameelse:qf = oldQf + "." + module.name# qualifiermodule.qf = qffor member in module.members:if "DefComponentInstance" in member[1]:instance = NodeStructs.C...
7
26
2
180
4
7
41
7
null
['qf', 'module', 'instance', 'constant']
None
null
0
0
0
null
0
null
The function (walkModule) defined within the public class called public.The function start at line 7 and ends at 41. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [7.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
walkTopology
def walkTopology(data, module):topology = NodeStructs.Topology(data)topology: NodeStructs.Topology = JSONConverter.TopologyConverter(topology).convert()if module == "":qf = topology.nameelse:qf = module + "." + topology.name# qualifiertopology.qf = qffor member in topology.members:if "DefTopology" in member[1]:walkTopo...
5
14
2
94
2
44
62
44
null
['qf', 'topology']
None
null
0
0
0
null
0
null
The function (walkTopology) defined within the public class called public.The function start at line 44 and ends at 62. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [44.0] and does not return any value..
nasa_fprime-tools
public
public
0
0
visit
def visit():AST = openFppFile(Path(__file__).parent / "example.fpp")for i in range(len(AST[0]["members"])):if "DefModule" in AST[0]["members"][i][1]:walkModule(AST[0]["members"][i], "")if "DefTopology" in AST[0]["members"][i][1]:walkTopology(AST[0]["members"][i], "")
4
7
0
98
1
65
73
65
null
['AST']
None
null
0
0
0
null
0
null
The function (visit) defined within the public class called public.The function start at line 65 and ends at 73. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
nasa_fprime-tools
public
public
0
0
write
def write():# create a new fpp modulemodule = NodeStructs.Module("ExampleModule")module.name = "ExampleModule"module = Writer.ModuleWriter(module)print(module.open())# create a new fpp constantconstant = NodeStructs.Constant("ExampleConstant")constant.id = "ExampleConstant"constant.value = "42"constant = Writer.Constan...
1
20
0
141
4
5
37
5
null
['module', 'topology', 'instanceSpec', 'constant']
None
null
0
0
0
null
0
null
The function (write) defined within the public class called public.The function start at line 5 and ends at 37. 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..
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
10
15
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 10 and ends at 15. 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
17
27
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 17 and ends at 27. 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..