diff --git a/report/datasets_report.Rmd b/report/datasets_report.Rmd index f2b95cbe996c9abb5c9488b371d86c4c27c9a828..ff70f3297565212233c1846fc3f1db13579dd3b2 100644 --- a/report/datasets_report.Rmd +++ b/report/datasets_report.Rmd @@ -52,6 +52,33 @@ url_forums_threads <- paste( dir_in, project_id, "/", file_forums_threads, sep=" file_pmi_checks <- "eclipse_pmi_checks.csv" url_pmi_checks <- paste( dir_in, project_id, "/", file_pmi_checks, sep="" ) +file_jenkins_builds <- "jenkins_builds.csv" +url_jenkins_builds <- paste( dir_in, project_id, "/", file_jenkins_builds, sep="" ) + +file_jenkins_jobs <- "jenkins_jobs.csv" +url_jenkins_jobs <- paste( dir_in, project_id, "/", file_jenkins_jobs, sep="" ) + +file_sc_authors <- "scancode_authors.csv" +url_sc_authors <- paste( dir_in, project_id, "/", file_sc_authors, sep="" ) + +file_sc_copyrights <- "scancode_copyrights.csv" +url_sc_copyrights <- paste( dir_in, project_id, "/", file_sc_copyrights, sep="" ) + +file_sc_holders <- "scancode_holders.csv" +url_sc_holders <- paste( dir_in, project_id, "/", file_sc_holders, sep="" ) + +file_sc_licences <- "scancode_licences.csv" +url_sc_licences <- paste( dir_in, project_id, "/", file_sc_licences, sep="" ) + +file_sc_packages <- "scancode_packages.csv" +url_sc_packages <- paste( dir_in, project_id, "/", file_sc_packages, sep="" ) + +file_sc_pl <- "scancode_programming_languages.csv" +url_sc_pl <- paste( dir_in, project_id, "/", file_sc_pl, sep="" ) + +file_sc_sf <- "scancode_special_files.csv" +url_sc_sf <- paste( dir_in, project_id, "/", file_sc_sf, sep="" ) + file_sq_issues_blocker <- "sq_issues_blocker.csv" url_sq_issues_blocker <- paste( dir_in, project_id, "/", file_sq_issues_blocker, sep="" ) @@ -143,12 +170,45 @@ List of datasets generated for the project: file_forums_threads, ".gz) ] ", sep='')}` +`r if(file.exists(url_jenkins_builds)){paste(" +* [Jenkins CI](#jenkins) + - [Jenkins CI Builds](#jenkins_builds) (CSV) -- list of all builds on the Jenkins CI instance. [ [Download CSV](", + file_jenkins_builds, + ".gz) ] + - [Jenkins CI Jobs](#jenkins_jobs) (CSV) -- list of all jobs on the Jenkins CI instance. [ [Download CSV](", + file_jenkins_jobs, + ".gz) ] +", sep='')}` `r if(file.exists(url_pmi_checks)){paste(" * [Eclipse PMI](#pmi) - [PMI Checks](#pmi_checks) (CSV) -- list of all checks applied to the Project Management Infrastructure entries for the project. [ [Download CSV](", file_pmi_checks, ".gz) ] ", sep='')}` +`r if(file.exists(url_sc_authors)){paste(" +* [ScanCode](#sq) + - [ScanCode files](#sc_files) (CSV) -- list of files identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_pl, + ".gz) ] + - [ScanCode authors](#sc_authors) (CSV) -- list of authors identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_authors, + ".gz) ] + - [ScanCode copyrights](#sc_copyrights) (CSV) -- list of copyrights identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_copyrights, + ".gz) ] + - [ScanCode holders](#sc_holders) (CSV) -- list of copyright holders identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_holders, + ".gz) ] + - [ScanCode licences](#sc_licences) (CSV) -- list of licences identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_licences, + ".gz) ] + - [ScanCode packages](#sc_packages) (CSV) -- list of packages identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_packages, + ".gz) ] + - [ScanCode programming languages](#sc_pl) (CSV) -- list of programming languages identified in the codebase by ScanCode. [ [Download CSV](", + file_sc_pl, + ".gz) ] +", sep='')}` `r if(file.exists(url_sq_metrics)){paste(" * [SonarQube](#sq) - [SonarQube blocker issues](#sq_issues_blocker) (CSV) -- list of blocker issues detected by SonarQube. [ [Download CSV](", @@ -178,13 +238,20 @@ List of datasets generated for the project: ``` +```{r inc_jenkins, eval=file.exists(url_jenkins_builds), child='datasets_report_jenkins.Rmd'} +``` + + ```{r inc_pmi, eval=file.exists(url_pmi_checks), child='datasets_report_pmi.Rmd'} ``` -```{r inc_git, eval=file.exists(url_sq_metrics), child='datasets_report_sq.Rmd'} +```{r inc_sc, eval=file.exists(url_sc_authors), child='datasets_report_scancode.Rmd'} ``` +```{r inc_sq, eval=file.exists(url_sq_metrics), child='datasets_report_sq.Rmd'} +``` + diff --git a/report/datasets_report_jenkins.Rmd b/report/datasets_report_jenkins.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..60faa09b377aa686ab7e5f47f9112bfaa9cd4555 --- /dev/null +++ b/report/datasets_report_jenkins.Rmd @@ -0,0 +1,92 @@ + +## <a name="jenkins"></a> Jenkins + +### <a name="jenkins_builds"></a> Builds + +**Download**: [`r file_jenkins_builds`.gz](`r file_jenkins_builds`.gz) + +```{r jenkins_b_init} +data <- read.csv(file=url_jenkins_builds, header=T) +``` + +File is [``r file_jenkins_builds``](`r file_jenkins_builds`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>ID</th><th>Name</th><th>Time</th><th>Result</th></tr> +```{r jenkins_b_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td><a href="', trimws(x[[7]]), '">', trimws(x[[4]]), '</a></td><td>', + trimws(x[[2]]), '</a></td><td>', trimws(x[[1]]), '</a></td><td>', + trimws(x[[3]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r jenkins_b_plot, echo=FALSE, message=FALSE, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +data.table <- as.data.frame(table(data$result)) +names(data.table) <- c('Result', 'Count') + +data.table[data.table$Result == "ABORTED", c('Colour')] <- '#D3D3D3' +data.table[data.table$Result == "FAILURE", c('Colour')] <- '#DC3912' +data.table[data.table$Result == "SUCCESS", c('Colour')] <- '#109618' +data.table[data.table$Result == "UNSTABLE", c('Colour')] <- '#FF9900' + +p <- gvisPieChart(data.table[,c('Result', 'Count')], + options = list( + title=paste("Build Results for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + colors=paste('["', paste(data.table$Colour, collapse = '", "', sep=""), '"]', collapse = '", "', sep=""), + pieHole= 0.4)) + +print(p, 'chart') +``` + + +### <a name="jenkins_jobs"></a> Jobs + +**Download**: [`r file_jenkins_jobs`.gz](`r file_jenkins_jobs`.gz) + +```{r jenkins_j_init} +data <- read.csv(file=url_jenkins_jobs, header=T) +``` + +File is [``r file_jenkins_jobs``](`r file_jenkins_jobs`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Name</th><th>Colour</th><th>Last build time</th><th>Health report</th></tr> +```{r jenkins_j_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td><a href="', trimws(x[[15]]), '">', trimws(x[[1]]), '</a></td><td>', + trimws(x[[3]]), '</a></td><td>', trimws(x[[5]]), '</a></td><td>', + trimws(x[[14]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r jenkins_j_plot, echo=FALSE, message=FALSE, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +data.table <- as.data.frame(table(data$color)) +names(data.table) <- c('Result', 'Count') + +data.table$Colour <- '#D3D3D3' + +data.table[data.table$Result == "red", c('Colour')] <- '#DC3912' +data.table[data.table$Result == "blue", c('Colour')] <- '#109618' +data.table[data.table$Result == "yellow", c('Colour')] <- '#FF9900' + +p <- gvisPieChart(data.table[,c('Result', 'Count')], + options = list( + title=paste("Job Results for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + colors=paste('["', paste(data.table$Colour, collapse = '", "', sep=""), '"]', collapse = '", "', sep=""), + pieHole= 0.4)) + +print(p, 'chart') +``` diff --git a/report/datasets_report_scancode.Rmd b/report/datasets_report_scancode.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..74bde264759305991b029593c81f51918e885a43 --- /dev/null +++ b/report/datasets_report_scancode.Rmd @@ -0,0 +1,196 @@ + +## <a name="sc"></a> ScanCode + +### <a name="sc_authors"></a> Authors + +**Download**: [`r file_sc_authors`.gz](`r file_sc_authors`.gz) + +```{r sc_a_init} +data <- read.csv(file=url_sc_authors, header=T) +``` + +File is [``r file_sc_authors``](`r file_sc_authors`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Author</th><th>Count</th></tr> +```{r sc_a_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r sc_a_plot, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +data.sorted <- data[order(data$count, decreasing = T),] + +p <- gvisPieChart(data.sorted, + options = list( + title=paste("Authors for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + pieHole= 0.4)) + +print(p, 'chart') +``` + +### <a name="sc_copyrights"></a> Copyrights + +**Download**: [`r file_sc_copyrights`.gz](`r file_sc_copyrights`.gz) + +```{r sc_c_init} +data <- read.csv(file=url_sc_copyrights, header=T) +``` + +File is [``r file_sc_copyrights``](`r file_sc_copyrights`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Copyrights</th><th>Count</th></tr> +```{r sc_c_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r sc_c_plot, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +data.sorted <- data[order(data$count, decreasing = T),] + +p <- gvisPieChart(data.sorted, + options = list( + title=paste("Copyrights for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + pieHole= 0.4)) + +print(p, 'chart') +``` + +### <a name="sc_holders"></a> Holders + +**Download**: [`r file_sc_holders`.gz](`r file_sc_holders`.gz) + +```{r sc_h_init} +data <- read.csv(file=url_sc_holders, header=T) +``` + +File is [``r file_sc_holders``](`r file_sc_holders`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Holders</th><th>Count</th></tr> +```{r sc_h_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r sc_h_plot, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +data.sorted <- data[order(data$count, decreasing = T),] + +p <- gvisPieChart(data.sorted, + options = list( + title=paste("Holders for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + pieHole= 0.4)) + +print(p, 'chart') +``` + +### <a name="sc_licences"></a> Licences + +**Download**: [`r file_sc_licences`.gz](`r file_sc_licences`.gz) + +```{r sc_l_init} +data <- read.csv(file=url_sc_licences, header=T) +``` + +File is [``r file_sc_licences``](`r file_sc_licences`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Licence</th><th>Count</th></tr> +```{r sc_l_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +data <- data[order(data$count, decreasing = T),] +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r sc_l_plot, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +p <- gvisPieChart(data, + options = list( + title=paste("Licences for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + pieHole= 0.4)) + +print(p, 'chart') +``` + +### <a name="sc_pl"></a> Programming Languages + +**Download**: [`r file_sc_pl`.gz](`r file_sc_pl`.gz) + +```{r sc_pl_init} +data <- read.csv(file=url_sc_pl, header=T) +``` + +File is [``r file_sc_licences``](`r file_sc_licences`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Programming Language</th><th>Count</th></tr> +```{r sc_pl_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +data <- data[order(data$count, decreasing = T),] +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table> + +```{r sc_pl_plot, results='asis'} +suppressPackageStartupMessages(library(googleVis)) +options(gvis.plot.tag='chart') + +p <- gvisPieChart(data, + options = list( + title=paste("Programming languages for project ", project_id, " ", sep=""), + sliceVisibilityThreshold=0, height=280, + pieHole= 0.4)) + +print(p, 'chart') +``` + + +### <a name="sc_sf"></a> Special files + +**Download**: [`r file_sc_sf`.gz](`r file_sc_sf`.gz) + +```{r sc_sf_init} +data <- read.csv(file=url_sc_sf, header=T) +``` + +File is [``r file_sc_sf``](`r file_sc_sf`.gz), and has ``r ncol(data)`` columns for ``r nrow(data)`` commits. + +<table class="table table-striped"> + <tr><th>Holders</th><th>Type</th></tr> +```{r sc_sf_table, eval=T, echo=FALSE, message=FALSE, results='asis'} +t <- apply(head(x = data, n = 10), 1, + function(x) paste(' <tr><td>', trimws(x[[1]]), '</td><td>', trimws(x[[2]]), '</td></tr>', sep='')) +t <- paste(t, collapse=" ") +cat(t) +``` +</table>