Skip to content

Commit

Permalink
Merge branch 'master' into 282-github-downloader-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ssunoo2 authored Apr 17, 2024
2 parents ac4f3ba + c781106 commit 46c33ee
Show file tree
Hide file tree
Showing 47 changed files with 1,954 additions and 693 deletions.
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Authors@R: c(
person('Nicholas', 'Lee', role = c('ctb')),
person('Ruben', 'Jacobo', role = c('ctb')),
person('Waylon', 'Ho', role = c('ctb')),
person('Nicole', 'Hoess', role = c('ctb'))
person('Nicole', 'Hoess', role = c('ctb')),
person('Anthony', 'Lau', role = c('ctb')),
person('Sean', 'Sunoo', role = c('ctb')),
person('Ian Jaymes', 'Iwata', role= c('ctb'))
)
Maintainer: Carlos Paradis <cvas@hawaii.edu>
License: MPL-2.0 | file LICENSE
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export(download_bugzilla_perceval_traditional_issue_comments)
export(download_bugzilla_rest_comments)
export(download_bugzilla_rest_issues)
export(download_bugzilla_rest_issues_comments)
export(download_jira_issues)
export(download_jira_issues_by_date)
export(download_jira_issues_by_issue_key)
export(download_mod_mbox)
export(download_mod_mbox_per_month)
export(download_pipermail)
Expand Down Expand Up @@ -121,6 +124,7 @@ export(parse_gitlog_entity)
export(parse_gof_patterns)
export(parse_java_code_refactoring_json)
export(parse_jira)
export(parse_jira_latest_date)
export(parse_jira_replies)
export(parse_jira_rss_xml)
export(parse_line_metrics)
Expand All @@ -136,6 +140,7 @@ export(query_src_text_class_names)
export(query_src_text_namespace)
export(read_temporary_file)
export(recolor_network_by_community)
export(refresh_jira_issues)
export(smell_missing_links)
export(smell_organizational_silo)
export(smell_radio_silence)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ __kaiaulu 0.0.0.9700 (in development)__

### NEW FEATURES
* `github_api_project_issue_refresh` and `github_api_project_issue_or_pr_comment_refresh` were added to download issue data or comments respectively that have not already been downloaded.
* `refresh_jira_issues()` had been added. It is a wrapper function for the previous downloader and downloads only issues greater than the greatest key already downloaded.
* `download_jira_issues()`, `download_jira_issues_by_issue_key()`, and `download_jira_issues_by_date()` has been added. This allows for downloading of Jira issues without the use of JirAgileR [#275](https://github.com/sailuh/kaiaulu/issues/275) and specification of issue Id and created ranges. It also interacts with `parse_jira_latest_date` to implement a refresh capability.
* `make_jira_issue()` and `make_jira_issue_tracker()` no longer create fake issues following JirAgileR format, but instead the raw data obtained from JIRA API. This is compatible with the new parser function for JIRA. [#277](https://github.com/sailuh/kaiaulu/issues/277)
* `parse_jira()` now parses folders containing raw JIRA JSON files without depending on JirAgileR. [#276](https://github.com/sailuh/kaiaulu/issues/276)
* The `parse_jira_latest_date()` has been added. This function returns the file name of the downloaded JIRA JSON containing the latest date for use by `download_jira_issues()` to implement a refresh capability. [#276](https://github.com/sailuh/kaiaulu/issues/276)
* Kaiaulu architecture has been refactored. Instead of using a parser, download, network module structure, Kaiaulu now uses a combination of data type and tool structure. In that manner, various parser functions of download,R, parser.R, and network.R now are separated in git.R, jira.R, git.R, etc. When only small functionality of a tool is required, functions are grouped based on the data type they are associated to, for example, src.R. Kaiaulu API documentation has been updated accordingly. Functions signature and behavior remain the same: The only modification was the new placement of functions into files. For further rationale and changes, see the issue for more details. [#241](https://github.com/sailuh/kaiaulu/issues/241)
* Temporal bipartite projections are now weighted. The temporal projection can be parameterized by `weight_scheme_cum_temporal()` `weight_scheme_pairwise_cum_temporal()` when all time lag edges are used, or the existing weight schemes can also be used when using a single lag. The all lag weight schemes reproduce the same behavior as Codeface's paper. See the issue for details. [#229](https://github.com/sailuh/kaiaulu/issues/229)
* The `make_jira_issue()` and `make_jira_issue_tracker()` have been added, alongside examples and unit tests for `parse_jira()`. [#228](https://github.com/sailuh/kaiaulu/issues/228)
Expand Down
161 changes: 91 additions & 70 deletions R/example.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,34 +396,39 @@ example_notebook_alternating_function_in_files <- function(folder_path="/tmp", f
#'
#' @param folder_path The path where the folder will be created
#' @param folder_name The name of the folder
#' @return the JSON path of the newly created issue issue tracker
#' @return the JSON folder path of the newly created issue issue tracker
#' @export
#' @keywords internal
example_jira_issue_components <- function(folder_path="/tmp",folder_name) {
example_jira_issue_components <- function(folder_path = "/tmp", folder_name) {

# Create folder & repo
folder_path <- io_make_folder(folder_path=folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(jira_domain_url = "https://project.org/jira",
issue_key = "GERONIMO-123",
issue_type = "New Feature",
status = "Open",
resolution = "Finished",
title = "This is a summary.",
description = "The new features have been implemented.",
components = "x-core;x-spring",
creator_name = "Bob",
reporter_name = "Joe",
assignee_name = "Moe",
folder_path <- io_make_folder(folder_path = folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(
jira_domain_url = "https://project.org/jira",
issue_key = "PROJECT-123",
project_key = "PROJECT",
summary = "Summary of new feature",
description = "The new features have been implemented",
issue_type = "New Feature",
resolution = "Finished",
priority = "Minor",
status = "Open",
labels = c("pull-request-available"),
components = c("jira", "mail"),
affects_versions = c("3.4.3"),
fix_versions = c("3.4.2"),
assignee_name = "Moe",
creator_name = "Bob",
reporter_name = "Joe"
)

# issues <- c(list(issue1))
issues <- list(issue1)

jira_json_path <- make_jira_issue_tracker(issues,
save_filepath=file.path(folder_path,"issue_two_components.json"))
save_filepath=file.path(folder_path, "ONE_ISSUE_NO_COMMENTS_issues_1121646814_1121719175.json"))

return(jira_json_path)
return(folder_path)
}

#' Example JIRA Issue Tracker No Comments
Expand All @@ -432,47 +437,58 @@ example_jira_issue_components <- function(folder_path="/tmp",folder_name) {
#'
#' @param folder_path The path where the folder will be created
#' @param folder_name The name of the folder
#' @return the JSON path of the newly created issue issue tracker
#' @return the JSON folder path of the newly created issue issue tracker
#' @export
#' @keywords internal
example_jira_two_issues <- function(folder_path="/tmp",folder_name) {
example_jira_two_issues <- function(folder_path = "/tmp", folder_name) {

# Create folder & repo
folder_path <- io_make_folder(folder_path=folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(jira_domain_url = "https://project.org/jira",
issue_key = "GERONIMO-123",
issue_type = "New Feature",
status = "Open",
resolution = "Finished",
title = "This is a summary.",
description = "The new features have been implemented.",
components = "x-core",
creator_name = "Bob",
reporter_name = "Joe",
assignee_name = "Moe",
folder_path <- io_make_folder(folder_path = folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(
jira_domain_url = "https://project.org/jira",
issue_key = "PROJECT-11",
project_key = "PROJECT",
summary = "Summary of issue 1",
description = "Description of summary 1",
issue_type = "New Feature",
resolution = "Finished",
priority = "Minor",
status = "Closed",
labels = c("pull-request-available"),
components = c("jira"),
affects_versions = c("1.1.1"),
fix_versions = c("1.1.1"),
assignee_name = "Moe",
creator_name = "Bob",
reporter_name = "Joe"
)

issue2 <- make_jira_issue(jira_domain_url = "https://project.org/jira",
issue_key = "GERONIMO-124",
issue_type = "New Feature",
status = "Open",
resolution = "Finished",
title = "This is a summary.",
description = "The new features have been implemented.",
components = "x-spring",
creator_name = "Moe",
reporter_name = "Larry",
assignee_name = "Curly",
issue2 <- make_jira_issue(
jira_domain_url = "https://project.org/jira",
issue_key = "PROJECT-22",
project_key = "PROJECT",
summary = "Summary of issue 2",
description = "Description of summary 2",
issue_type = "New Feature",
resolution = "Finished",
priority = "Minor",
status = "Open",
labels = c("pull-request-available"),
components = c("jira"),
affects_versions = c("2.2.2"),
fix_versions = c("2.2.2"),
assignee_name = "Steven",
creator_name = "Nathan",
reporter_name = "Matthew"
)

# issues <- c(list(issue1), list(issue2))
issues <- list(issue1, issue2)

jira_json_path <- make_jira_issue_tracker(issues,
save_filepath=file.path(folder_path,"issue_with_components.json"))
save_filepath=file.path(folder_path, "TWO_ISSUES_NO_COMMENTS_issues_1121646814_1121719175.json"))

return(jira_json_path)
return(folder_path)
}

#' Example Jira Issue Tracker With Comments
Expand All @@ -481,38 +497,43 @@ example_jira_two_issues <- function(folder_path="/tmp",folder_name) {
#'
#' @param folder_path The path where the folder will be created
#' @param folder_name The name of the folder
#' @return the JSON path of the newly created issue issue tracker
#' @return the JSON folder path of the newly created issue issue tracker
#' @export
#' @keywords internal
example_jira_issue_comments <- function(folder_path="/tmp",folder_name) {
example_jira_issue_comments <- function(folder_path = "/tmp", folder_name) {

# Create folder & repo
folder_path <- io_make_folder(folder_path=folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(jira_domain_url = "https://project.org/jira",
issue_key = "GERONIMO-2",
issue_type = "Bug",
status = "In Progress",
resolution = "Incomplete",
title = "Bug fixes need implementation.",
description = "The new features have not been implemented.",
components = "x-core",
creator_name = "Moe",
reporter_name = "Larry",
assignee_name = "Curly",
comments = c(
"This is the first body comment.",
"This is the second body comment."
)
folder_path <- io_make_folder(folder_path = folder_path, folder_name = folder_name)

issue1 <- make_jira_issue(
jira_domain_url = "https://project.org/jira",
issue_key = "PROJECT-123",
project_key = "PROJECT",
summary = "Summary of new feature",
description = "The new features have been implemented",
issue_type = "New Feature",
resolution = "Finished",
priority = "Minor",
status = "Open",
labels = c("pull-request-available"),
components = c("jira", "mail"),
affects_versions = c("3.4.3"),
fix_versions = c("3.4.2"),
assignee_name = "Moe",
creator_name = "Bob",
reporter_name = "Joe",
comments = c(
"This is the first body comment.",
"This is the second body comment."
)
)

# issues <- c(list(issue1))
issues <- list(issue1)

jira_json_path <- make_jira_issue_tracker(issues,
save_filepath=file.path(folder_path,"one_issue_two_comments.json"))
jira_json_path <- make_jira_issue_tracker(
issues, save_filepath=file.path(folder_path,"ONE_ISSUE_WITH_COMMENTS_issues_1121646814_1121719175.json"))

return(jira_json_path)
return(folder_path)
}

#' Two Thread and Three Replies Mailing List
Expand Down
Loading

0 comments on commit 46c33ee

Please sign in to comment.