Undocumented
Function | ast |
Function to convert the AST object into JSON format. :param ast_obj: AST object |
Function | ast |
Function to convert the AST object into source code. :param ast_obj: AST object |
Function | call |
Undocumented |
Function | call |
Undocumented |
Function | detect |
Function to detect the license type from extracted text. |
Function |
|
Undocumented |
Function | dice |
dice coefficient 2nt/(na + nb). |
Function | extract |
Undocumented |
Function | extract |
Undocumented |
Function | extract |
Undocumented |
Function | extract |
Undocumented |
Function | extract |
Method to obtain the directory tree of a repository. The ignored directories and files that were inputted are also ignored. :input_path path of the repo to |
Function | extract |
Extracts the license of the repository. Args: input_path (str): Path of the repository to be analyzed. |
Function | extract |
Undocumented |
Function | extract |
Undocumented |
Function | extract |
Function to extract content of all readme file under the input directory. :param input_path: Path of the repository to be analyzed. :param output_dir: The output directory. Used to generate the correct path of the README file. |
Function | extract |
Undocumented |
Function | extract |
Undocumented |
Function | extract |
Method to detect the directory type of a software project. This method also detects tests We distinguish four main types: script, package, library and service. Some can be more than one. :dir_info json containing all the extracted information about the software repository :dir_tree_info json containing the directory information of the target repo :input_path path of the repository to analyze :call_list json file containing the list of calls per file and functions or methods... |
Function | file |
Undocumented |
Function | find |
Undocumented |
Function | find |
Undocumented |
Function | find |
Undocumented |
Function | generate |
Method to generate a simple HTML view of the obtained JSON. :pruned_json JSON to print out :output_file_html path where to write the HTML |
Function | get |
Function to extract metadata from the remote repository using Github api. It requires connectivity to the Github API and the local target repository to have .git folder and a remote repository on Github. |
Function | index |
Undocumented |
Function | list |
Undocumented |
Function | parse |
Undocumented |
Function | print |
This method prints a small summary of the classes and properties recognized during the analysis. At the moment this method is only invoked when a directory with multiple files is passed. |
Function | prune |
Method that given a JSON object, removes all its empty fields. This method simplifies the resultant JSON. :param json_dict input JSON file to prune :return JSON file removing empty values |
Function | rank |
Function to create a ranking over the different ways of executing a program. If two elements have the same position in the ranking, it means that there is no priority among them. Heuristic to order the invocation list is as follows, in decreasing order of prioritization: - If package or library is detected, this will be always first... |
Function | service |
Undocumented |
Function | service |
Undocumented |
Function | top |
Undocumented |
Function | top |
Undocumented |
Function | tree |
Undocumented |
Function | tree |
Undocumented |
Function | type |
Undocumented |
Function | update |
Undocumented |
Function to detect the license type from extracted text. Args: license_text (str): The extracted license text. licenses_path (str): Path of the folder containing license templates. threshold (float): Threshold to consider a license as detected. A float between 0 and 1. Returns: Ranked list of license types and their percentage match to the supplied license_text.
Undocumented
Method to obtain the directory tree of a repository. The ignored directories and files that were inputted are also ignored. :input_path path of the repo to
Extracts the license of the repository. Args: input_path (str): Path of the repository to be analyzed. Returns: Optional[str]: The license text Raises: Exception: If a license file is not found.
Undocumented
Undocumented
Function to extract content of all readme file under the input directory. :param input_path: Path of the repository to be analyzed. :param output_dir: The output directory. Used to generate the correct path of the README file.
Method to detect the directory type of a software project. This method also detects tests We distinguish four main types: script, package, library and service. Some can be more than one. :dir_info json containing all the extracted information about the software repository :dir_tree_info json containing the directory information of the target repo :input_path path of the repository to analyze :call_list json file containing the list of calls per file and functions or methods. :readme content of the readme file of the project (if any)
Method to generate a simple HTML view of the obtained JSON. :pruned_json JSON to print out :output_file_html path where to write the HTML
Function to extract metadata from the remote repository using Github api. It requires connectivity to the Github API and the local target repository to have .git folder and a remote repository on Github. :param input_path: Path of the repository to be analyzed.
This method prints a small summary of the classes and properties recognized during the analysis. At the moment this method is only invoked when a directory with multiple files is passed.
Method that given a JSON object, removes all its empty fields. This method simplifies the resultant JSON. :param json_dict input JSON file to prune :return JSON file removing empty values
Function to create a ranking over the different ways of executing a program. If two elements have the same position in the ranking, it means that there is no priority among them. Heuristic to order the invocation list is as follows, in decreasing order of prioritization: - If package or library is detected, this will be always first. - If something (script or service) is mentioned in the readme file, it is considered a priority. - Services are prioritized over scripts - Scripts with main are prioritized over script with body. - Scripts with body are prioritized over scripts with no body. TO DOs: - If a script imports other scripts (or service), it gets prioritized (TO DO when examples are available) - If several scripts are available, those at root level are prioritized (TO DO when examples are available) :param soft_invocation_info_list JSON list with the different ways to execute a program.
Undocumented