Skip to content

Commit

Permalink
Working On Creating Notebook
Browse files Browse the repository at this point in the history
Updating NAMESPACE to export the new functions and creating the Rmd, are the primary notes. The folder holding the sample project also is included locally, but uses the calculator project provided in Issue from Carlos
  • Loading branch information
RavenMarQ committed Oct 3, 2024
1 parent b5bf007 commit b17d286
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ export(transform_gitlog_to_temporal_network)
export(transform_r_dependencies_to_network)
export(transform_reply_to_bipartite_network)
export(transform_temporal_gitlog_to_adsmj)
export(transform_und_dependencies_to_network)
export(understand_parse_dependencies)
export(weight_scheme_count_deleted_nodes)
export(weight_scheme_cum_temporal)
export(weight_scheme_pairwise_cum_temporal)
Expand Down
2 changes: 1 addition & 1 deletion R/src.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ parse_r_dependencies <- function(folder_path){
#'
#' @export
#' @family edgelists
transform_und_class_dependencies_to_network <- function(parsed, weight_types) {
transform_und_dependencies_to_network <- function(parsed, weight_types) {

nodes <- parsed[["node_list"]]
edges <- parsed[["edge_list"]]
Expand Down
65 changes: 65 additions & 0 deletions vignettes/understand_showcase.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "Understand Showcase"
output:
html_document:
toc: true
number_sections: true
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Understand Showcase}
%\VignetteEncoding{UTF-8}
---


```{r warning = FALSE, message = FALSE}
rm(list = ls())
library(kaiaulu)
library(visNetwork)
library(igraph)
library(data.table)
```


# Parse a sample project folder

```{r}
folder_path <- "../tests/sample_project"
```


# File Dependencies

```{r}
file_dependencies <- understand_parse_dependencies(project_path = folder_path, language = "java", parse_type = "file")
head(file_dependencies)
```


# Class Dependencies

```{r}
class_dependencies <- understand_parse_dependencies(project_path = folder_path, language = "java", parse_type = "class")
head(class_dependencies)
```

## File

```{r}
file_graph <- transform_und_dependencies_to_network(parsed = file_dependencies, weight_types = c("", ""))
project_function_network <- igraph::graph_from_data_frame(d=function_graph[["edgelist"]],
directed = TRUE,
vertices = function_graph[["nodes"]])
visIgraph(project_function_network,randomSeed = 1)
```


## Class

```{r}
class_graph <- transform_und_dependencies_to_network(parsed = class_dependencies, weight_types = c("", ""))
project_function_network <- igraph::graph_from_data_frame(d=file_graph[["edgelist"]],
directed = TRUE,
vertices = file_graph[["nodes"]])
visIgraph(project_function_network,randomSeed = 1)
```

0 comments on commit b17d286

Please sign in to comment.