diff --git a/.gitignore b/.gitignore index 207932c..2f36891 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,37 @@ -Meta -doc -# History files -.Rhistory -.Rapp.history - -# Session Data files -.RData -# Example code in package build process -*-Ex.R -# Output files from R CMD build -/*.tar.gz -# Output files from R CMD check -/*.Rcheck/ -# RStudio files -.Rproj.user/ -# produced vignettes -vignettes/*.html -vignettes/*.pdf -# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 -.httr-oauth -# knitr and R markdown default cache directories -/*_cache/ -/cache/ -# Temporary files created by R markdown -*.utf8.md -*.knit.md -.Rproj.user -inst/doc -.Renviron -.gitignore -.gitignore -.ixplorer* +Meta +doc +# History files +.Rhistory +.Rapp.history + +# Session Data files +.RData +# Example code in package build process +*-Ex.R +# Output files from R CMD build +/*.tar.gz +# Output files from R CMD check +/*.Rcheck/ +# RStudio files +.Rproj.user/ +# produced vignettes +vignettes/*.html +vignettes/*.pdf +# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 +.httr-oauth +# knitr and R markdown default cache directories +/*_cache/ +/cache/ +# Temporary files created by R markdown +*.utf8.md +*.knit.md +.Rproj.user +inst/doc +.Renviron +.gitignore + +.ixplorer* +.ixplorer + + +temp.R diff --git a/DESCRIPTION b/DESCRIPTION index 726bf31..a947e94 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -46,3 +46,4 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 6.1.1 URL: https://github.com/ixpantia/ixplorer BugReports: https://github.com/ixpantia/ixplorer/issues + diff --git a/NAMESPACE b/NAMESPACE index 2eff176..2c3588a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,9 +4,9 @@ export(add_token) export(create_tickets) export(current_tickets) export(dashboard) +export(incluye_upstream) export(list_closed_tickets) export(list_open_tickets) -import(dplyr) import(miniUI) import(shiny) importFrom(dplyr,"%>%") diff --git a/R/authenticate.R b/R/authenticate.R index 0130f1b..d2b3a9a 100644 --- a/R/authenticate.R +++ b/R/authenticate.R @@ -1,106 +1,100 @@ -#' @import shiny -#' @import miniUI -NULL - -#' Authenticate to ixplorer -#' -#' Make the connection to your repository through the ixplorer gadget and be -#' able to create tickets, review tickets without re-writing your credentials -#' -#' @export -add_token <- function() { - - ui <- miniPage( - gadgetTitleBar("ixplorer authentication", - left = miniTitleBarCancelButton(inputId = "cancel", - label = "Cancel", - primary = FALSE), - right = miniTitleBarButton(inputId = "done", - label = "Done", - primary = TRUE)), - - miniContentPanel( - - textInput(inputId = "ixplorer_token", - label = "API token", - width = "100%", - placeholder = "Paste your ixplorer token here"), - - textInput(inputId = "ixplorer_url", - label = "ixplorer url", - width = "100%", - placeholder = "Paste your ixplorer url here"), - - textInput(inputId = "ixplorer_project_name", - label = "Name of the upstream project", - width = "100%", - placeholder = "Paste your ixplorer upstream project name here"), - - textInput(inputId = "ixplorer_repo_name", - label = "ixplorer repository name", - width = "100%", - placeholder = "Paste your ixplorer repository name here"), - - textInput(inputId = "ixplorer_user_name", - label = "Your ixplorer user name", - width = "100%", - placeholder = "Paste your ixplorer user name here"), - - checkboxInput(inputId = "token_persist", - value = 0, - label = "Persist token? (do no use on shared computer)", - width = "100%" - ) - - ) - ) - - server <- function(input, output, session) { - - observeEvent(input$done, { - - Sys.setenv("IXTOKEN" = input$ixplorer_token) - Sys.setenv("IXURL" = input$ixplorer_url) - Sys.setenv("IXPROJECT" = input$ixplorer_project_name) - Sys.setenv("IXREPO" = input$ixplorer_repo_name) - Sys.setenv("IXUSER" = input$ixplorer_user_name) - - token <- paste0("IXTOKEN=", input$ixplorer_token) - url <- paste0("IXURL=", input$ixplorer_url) - project <- paste0("IXPROJECT=", input$ixplorer_project_name) - repo <- paste0("IXREPO=", input$ixplorer_repo_name) - user <- paste0("IXUSER=", input$ixplorer_user_name) - - access_data <- c(token, url, project, repo, user) - - if (input$token_persist == 1) { - working_directory <- rstudioapi::getActiveProject() - ixplorer_file <- paste0(working_directory, "/.ixplorer") - conn <- file(ixplorer_file, open = "w") - writeLines(access_data, con = conn, sep = "\n", useBytes = FALSE) - close(conn) - - gitignore <- paste0(working_directory, "/.gitignore") - if (file.exists(gitignore)) { - conn <- file(gitignore) - archivos_ignorados <- readLines(conn) - writeLines(c(archivos_ignorados,".ixplorer"), conn) #lo sobre escribe - close(conn) - } else { - conn <- file(gitignore, open = "w") - writeLines(".ixplorer", con = conn, sep = "\n", useBytes = FALSE) - close(conn) - } - - } - stopApp(NULL) - }) - - observeEvent(input$cancel, { - # do nothing - stopApp(NULL) - }) - } - - runGadget(ui, server, viewer = dialogViewer("ixplorer")) -} +#' @import shiny +#' @import miniUI +NULL + +#' @title Autentificación en ixplorer +#' @description Guarda en su computadora por medio del sistema de +#' autentificación del OS de su computadora. +#' +#' @details En caso de que los credenciales ya existan solo se ingresa el url +#' y se confirma si quiere conservar los credenciales en su computador o quiere +#' borrarlos luego de la siguiente consulta. +#' +#' @export +add_token <- function() { + + ui <- miniPage( + gadgetTitleBar("Autentificación en ixplorer", + left = miniTitleBarCancelButton(inputId = "cancel", + label = "Cancelar", + primary = FALSE), + right = miniTitleBarButton(inputId = "done", + label = "Listo", + primary = TRUE)), + miniContentPanel( + textInput(inputId = "ixplorer_url", + label = "URL de ixplorer", + width = "100%", + placeholder = "Copie su ixplorer URl aquí."), + uiOutput("token_user"), + checkboxInput(inputId = "token_persist", + value = 1, + label = "Persistencia de las credenciales en este computador. (No usar en computadoras compartidas)", + width = "100%" + ) + ) + ) + + server <- function(input, output, session) { + + output$token_user <- renderUI({ + req(input$ixplorer_url) + + instancia <- sub("\\..*", "", input$ixplorer_url) + + verifica_cred <- tryCatch( + keyring::key_get(paste0("token_", instancia)), + error = function(cond) "no_credenciales") + + if(verifica_cred == "no_credenciales") { + div(textInput(inputId = "ixplorer_token", + label = "Token de acceso", + width = "100%", + placeholder = "Ingrese su Token de acceso aquí"), + textInput(inputId = "ixplorer_user_name", + label = "Su nombre de usuario.", + width = "100%", + placeholder = "Ingrese su nombre de usuario aquí.")) + } + + }) + + observeEvent(input$done, { + + instancia <- sub("\\..*", "", input$ixplorer_url) + + verifica_cred <- tryCatch( + keyring::key_get(paste0("token_", instancia)), + error = function(cond) "no_credenciales") + + + if(verifica_cred == "no_credenciales") { + + if(is.null(input$ixplorer_url) == FALSE | + is.null(input$ixplorer_token) == FALSE | + is.null(input$ixplorer_user_name) == FALSE) { + + keyring::key_set_with_value( + service = paste0("token_", instancia), + password = paste(input$ixplorer_url, + input$ixplorer_token, + input$ixplorer_user_name, + input$token_persist, + sep = "/")) + } + + } else { + + } + + stopApp(TRUE) + }) + + observeEvent(input$cancel, { + # do nothing + stopApp(TRUE) + }) + } + + runGadget(ui, server, viewer = dialogViewer("ixplorer")) +} diff --git a/R/cli.R b/R/cli.R index be3b397..e2fca8b 100644 --- a/R/cli.R +++ b/R/cli.R @@ -78,3 +78,232 @@ list_closed_tickets <- function(lag = 7, repository = "current", clip = TRUE) { return(list) } + +#' @title Lista de tiquetes abiertos +#' @description Listado de tiquetes abiertos del repositorio indicado. +#' +#' @param instance instancia de ixplorer (Ejm: "secure", "masterclass", "prueba") +#' @param owner el nombre del proyecto donde se encuentra el repositorio en +#' ixplorer +#' @param repository el nombre del repositorio donde están los tiquetes +#' @param lag es el tiempo en días que se quiere ver hacia atrás. Por ejemplo si +#' se quiere ver los tiquetes creados en los últimos 7 días, lag = 7. Por +#' defecto muestra todos los tiquetes sin ningún lag. +#' +#' @export +list_open_tickets <- function(instance, owner, repository = "current", + lag = NULL) { + + credenciales <- tryCatch( + keyring::key_get(paste0("token_", instance)), + error = function(cond) "no_credenciales") + + if(credenciales == "no_credenciales") { + stop(paste("Aún no existen credenciales para", instance)) + } + + + credenciales <- credenciales %>% + stringr::str_split("/", simplify = TRUE) %>% + tibble::as_tibble() %>% + magrittr::set_names(c("url", "token", + "usuario", "persistencia")) %>% + dplyr::mutate(persistencia = as.logical(persistencia)) + + if(credenciales$persistencia == FALSE) { + keyring::key_delete(paste0("token_", instance)) + } + + if(repository == "current") { + repository <- basename(rstudioapi::getActiveProject()) + } + + list <- gitear::get_issues_open_state( + base_url = paste0("https://", credenciales$url), + api_key = credenciales$token, + owner = owner, + repo = repository) + + list <- list %>% + mutate(created_at = lubridate::ymd_hms(created_at) - + lubridate::hours(6), + updated_at = lubridate::ymd_hms(updated_at) - + lubridate::hours(6), + closed_at = lubridate::ymd_hms(closed_at) - + lubridate::hours(6), + user.last_login = lubridate::ymd_hms(user.last_login) - + lubridate::hours(6), + user.created = lubridate::ymd_hms(user.created) - + lubridate::hours(6), + milestone.due_on = lubridate::ymd_hms(milestone.due_on) - + lubridate::hours(6), + assignee.last_login = lubridate::ymd_hms(assignee.last_login) - + lubridate::hours(6), + assignee.created = lubridate::ymd_hms(assignee.created) - + lubridate::hours(6)) %>% #Deja hora Costa Rica + {if (!is.null(lag)) { + dplyr::filter(., created_at >= Sys.Date() - lubridate::days(lag)) + } else {.}} %>% + dplyr::select(number, title, milestone.title) %>% + dplyr::arrange(milestone.title, number) %>% + dplyr::rename(nr = number, + Titulo = title, + Hito = milestone.title) %>% + tibble::as_tibble() + + return(list) +} + +#' @title Lista de tiquetes cerrados +#' @description Listado de tiquetes cerrados del repositorio indicado. +#' +#' @param instance instancia de ixplorer (Ejm: "secure", "masterclass", "prueba") +#' @param owner el nombre del proyecto donde se encuentra el repositorio en +#' ixplorer +#' @param repository el nombre del repositorio donde están los tiquetes +#' @param lag es el tiempo en días que se quiere ver hacia atrás. Por ejemplo si +#' se quiere ver los tiquetes cerrados en los últimos 7 días, lag = 7. Por +#' defecto muestra todos los tiquetes sin ningún lag. +#' +#' @export +list_closed_tickets <- function(instance, owner, repository = "current", + lag = NULL) { + + credenciales <- tryCatch( + keyring::key_get(paste0("token_", instance)), + error = function(cond) "no_credenciales") + + if(credenciales == "no_credenciales") { + stop(paste("Aún no existen credenciales para", instance)) + } + + credenciales <- credenciales %>% + stringr::str_split("/", simplify = TRUE) %>% + tibble::as_tibble() %>% + magrittr::set_names(c("url", "token", + "usuario", "persistencia")) %>% + dplyr::mutate(persistencia = as.logical(persistencia)) + + if(credenciales$persistencia == FALSE) { + keyring::key_delete(paste0("token_", instance)) + } + + if(repository == "current") { + repository <- basename(rstudioapi::getActiveProject()) + } + + list <- gitear::get_issues_closed_state( + base_url = paste0("https://", credenciales$url), + api_key = credenciales$token, + owner = owner, + repo = repository) + + list <- list %>% + mutate(created_at = lubridate::ymd_hms(created_at) - + lubridate::hours(6), + updated_at = lubridate::ymd_hms(updated_at) - + lubridate::hours(6), + closed_at = lubridate::ymd_hms(closed_at) - + lubridate::hours(6), + user.last_login = lubridate::ymd_hms(user.last_login) - + lubridate::hours(6), + user.created = lubridate::ymd_hms(user.created) - + lubridate::hours(6), + milestone.due_on = lubridate::ymd_hms(milestone.due_on) - + lubridate::hours(6), + assignee.last_login = lubridate::ymd_hms(assignee.last_login) - + lubridate::hours(6), + assignee.created = lubridate::ymd_hms(assignee.created) - + lubridate::hours(6)) %>% #Deja hora Costa Rica + {if (!is.null(lag)) { + dplyr::filter(., closed_at >= Sys.Date() - lubridate::days(lag)) + } else {.}} %>% + dplyr::select(number, title, milestone.title) %>% + dplyr::arrange(milestone.title, number) %>% + dplyr::rename(nr = number, + Titulo = title, + Hito = milestone.title) %>% + tibble::as_tibble() + + return(list) +} + + +#' List open and closed tickets. +#' +#' `list_open_tickets()` and `list_closed_tickets` list open and closed +#' tickets. The "current" respository is the one linked to the active RStudio +#' project. +#' +#' @param lag FIXME +#' @param repository FIXME +#' @param clip FIXME +#' +#' @return FIXME +#' +#' @name list_tickets +NULL + +#' @rdname list_tickets +#' @export +list_open_tickets <- function(lag = 7, repository = "current", clip = TRUE) { + access_file <- ixplorer:::verify_ixplorer_file() + + if (access_file$empty == TRUE) { + warning("no credential file available") + } else { + ixplorer:::set_authentication(access_data = access_file$gitear_access) + } + + list <- gitear::get_issues_open_state( + base_url = Sys.getenv("IXURL"), + api_key = Sys.getenv("IXTOKEN"), + owner = Sys.getenv("IXPROJECT"), + repo = Sys.getenv("IXREPO")) + + list <- list %>% + select(number, title, milestone.title) %>% + arrange(milestone.title, number) %>% + rename(nr = number, + Titulo = title, + Hito = milestone.title) + + if(clip) { + clipr::write_clip(list, breaks = "\n") + } + + return(list) +} + +#' @rdname list_tickets +#' @export +list_closed_tickets <- function(lag = 7, repository = "current", clip = TRUE) { + + access_file <- ixplorer:::verify_ixplorer_file() + + if (access_file$empty == TRUE) { + warning("no credential file available") + } else { + ixplorer:::set_authentication(access_data = access_file$gitear_access) + } + + list <- gitear::get_issues_closed_state( + base_url = Sys.getenv("IXURL"), + api_key = Sys.getenv("IXTOKEN"), + owner = Sys.getenv("IXPROJECT"), + repo = Sys.getenv("IXREPO")) + + list <- list %>% + select(number, title, milestone.title) %>% + arrange(milestone.title, number) %>% + rename(nr = number, + Titulo = title, + Hito = milestone.title) + + if(clip) { + clipr::write_clip(list, breaks = "\n") + } + + return(list) +} + diff --git a/R/create_ticket.R b/R/create_ticket.R index 655ec3d..af34951 100644 --- a/R/create_ticket.R +++ b/R/create_ticket.R @@ -1,81 +1,105 @@ -#' @import shiny -#' @import miniUI -NULL - -#' Create ticket -#' -#' Create tickets (Title and body) from the ixplorer addin without loosing the -#' ideas during your workflow. tickets will be in the repository that corresponds -#' to the information youo give in the authenticate gadget. -#' -#' @export -create_tickets <- function() { - - ui <- miniPage( - miniTitleBar("Create a new ticket", - left = miniTitleBarCancelButton(inputId = "cancel", - label = "Cancel", - primary = TRUE) - ), - - miniContentPanel( - verbatimTextOutput("warning", placeholder = FALSE), - - textInput(inputId = "ticket_title", - label = "Ticket title", - width = "150%", - placeholder = "Brief description of your ticket"), - - textAreaInput(inputId = "ticket_description", - label = "Description", - width = "190%", - height = "100%", - resize = "vertical", - rows = 13, - placeholder = "Describe the ticket you have encountered") - ), - miniButtonBlock( - actionButton(inputId = "create", label = "Create ticket", - style = "color: #fff; background-color: #73CF56") - ) - ) - - server <- function(input, output, session) { - - access_file <- verify_ixplorer_file() - - output$warning <- renderText({ - msg <- if (access_file$empty == TRUE) { - "no credential file available" - } else { - set_authentication(access_data = access_file$gitear_access) - } - return(msg) - }) - - # Botones ---------------------------------------------------------------- - observeEvent(input$cancel, { - # do nothing - stopApp(NULL) - }) - - observeEvent(input$create, { - tryCatch( - { - gitear::create_issue(base_url = Sys.getenv("IXURL"), - api_key = Sys.getenv("IXTOKEN"), - owner = Sys.getenv("IXPROJECT"), - repo = Sys.getenv("IXREPO"), - title = input$ticket_title, - body = input$ticket_description) - }, - error = function(e) { - print("No ticket was created because of invalid credentials. Please use authentication gadget.") - } - ) - stopApp(NULL) - }) - } - - runGadget(ui, server, viewer = dialogViewer("ixplorer")) -} +#' @import shiny +#' @import miniUI +NULL + +#' @title Crear tiquete +#' @description Crear tiquetes (título y cuerpo) desde el addin de ixplorer sin +#' perder las ideas durante su flujo de trabajo. +#' +#' @param instance instancia de ixplorer (Ejm: "secure", "masterclass", "prueba") +#' @param owner el nombre del proyecto donde se encuentra el repositorio en +#' ixplorer +#' @param repository el nombre del repositorio donde están los tiquetes +#' +#' @export +create_tickets <- function(instance, owner, repository = "current") { + + credenciales <- tryCatch( + keyring::key_get(paste0("token_", instance)), + error = function(cond) "no_credenciales") + + + if(credenciales != "no_credenciales") { + credenciales <- credenciales %>% + stringr::str_split("/", simplify = TRUE) %>% + tibble::as_tibble() %>% + magrittr::set_names(c("url", "token", + "usuario", "persistencia")) %>% + dplyr::mutate(persistencia = as.logical(persistencia)) + + } + + if(credenciales$persistencia == FALSE) { + keyring::key_delete(paste0("token_", instance)) + } + + ui <- miniPage( + miniTitleBar("Crear un nuevo tiquete", + left = miniTitleBarCancelButton(inputId = "cancel", + label = "Cancelar", + primary = TRUE) + ), + + miniContentPanel( + verbatimTextOutput("warning", placeholder = FALSE), + + textInput(inputId = "ticket_title", + label = "Título del tiquete", + width = "150%", + placeholder = "Breve descripción de su tiquete"), + + textAreaInput(inputId = "ticket_description", + label = "Descripción", + width = "190%", + height = "100%", + resize = "vertical", + rows = 13, + placeholder = "Describa el tiquete que ha encontrado") + ), + miniButtonBlock( + actionButton(inputId = "create", label = "Crear tiquete", + style = "color: #fff; background-color: #73CF56") + ) + ) + + server <- function(input, output, session) { + + + output$warning <- renderText({ + msg <- ifelse (credenciales == "no_credenciales", + "No hay archivo de credenciales disponible", "") + return(msg) + }) + + # Botones ---------------------------------------------------------------- + observeEvent(input$cancel, { + # do nothing + stopApp() + }) + + observeEvent(input$create, { + check <- tryCatch(gitear::create_issue( + base_url = credenciales$url, + api_key = credenciales$token, + owner = owner, + repo = repository, + title = input$ticket_title, + body = input$ticket_description), + error = function(cond) + "Invalido") + + if (is.list(check)){ + print(check) + message("Su tiquete se ha generado con éxito") + } else { + if(check != "Invalido") { + print("No se ha creado ningún tiquete debido a credenciales inválidas. Porfavor use el gadget de autentificación.") + } + } + + stopApp() + }) + } + + runGadget(ui, server, viewer = dialogViewer("ixplorer")) +} diff --git a/R/current_tickets.R b/R/current_tickets.R index 24f05d6..2932598 100644 --- a/R/current_tickets.R +++ b/R/current_tickets.R @@ -1,216 +1,227 @@ -#' @import shiny -#' @import miniUI -#' @import dplyr -NULL - -#' Current tickets -#' -#' Visualize the tickets of a specific user, a team and get the quick links to -#' your ixplorer based on the credentials used in gadget authenticate. -#' -#' @export -current_tickets <- function() { - - ui <- miniPage( - miniTitleBar("Current tickets", - right = miniTitleBarCancelButton(inputId = "done", - label = "Done", - primary = TRUE) - ), - verbatimTextOutput("warning", placeholder = FALSE), - miniTabstripPanel( - miniTabPanel("My tickets", icon = icon("user"), - miniContentPanel( - tableOutput("my_tickets") - ) - ), - miniTabPanel("Team tickets", icon = icon("users"), - miniContentPanel( - tableOutput("team_tickets") - ) - ), - miniTabPanel("Quick links", icon = icon("link"), - miniContentPanel( - tableOutput("quick_links") - ) - ) - ) - ) - - server <- function(input, output, session){ - - access_file <- verify_ixplorer_file() - msg <- if (access_file$empty == TRUE) { - "no credential file available" - } else { - ixplorer:::set_authentication(access_data = access_file$gitear_access) - } - - output$warning <- renderText({ - msg <- if (access_file$empty == TRUE) { - "no credential file available" - } else { - set_authentication(access_data = access_file$gitear_access) - } - return(msg) - }) - - # Get tickets and configurate credentials - tickets <- tryCatch( - { - if (access_file$empty == TRUE) { - data.frame(character(0)) - warning("no access data") - } else { - ixplorer_user = Sys.getenv("IXUSER") - - gitear::get_issues_open_state( - base_url = Sys.getenv("IXURL"), - api_key = Sys.getenv("IXTOKEN"), - owner = Sys.getenv("IXPROJECT"), - repo = Sys.getenv("IXREPO")) - } - }, - error = function(cond) { - tickets <- "Invalid" - } - ) - - - output$my_tickets <- function() { - if (class(tickets) != "data.frame") { - tickets_kable <- "Invalid credentials. Please use authentication gadget." - } else if (nrow(tickets) == 0) { - tickets_kable <- "No tickets found in repository" - } else { - # Select tickets by user and tickets link creation - tickets <- tickets %>% - filter(assignee.login == ixplorer_user) %>% - select(number, title, due_date, url) %>% - tidyr::separate(col = due_date, into = c("due_date", "hour"), sep = "T") %>% - select(-hour) %>% - mutate(due_date = lubridate::ymd(due_date) - lubridate::today()) %>% - tidyr::separate(col = url, - into = c("borrar", "issue_url"), sep = "repos/") %>% - select(-borrar) %>% - mutate(issue_url = paste(Sys.getenv("IXURL"), issue_url, sep = "/")) %>% - arrange(desc(due_date)) - - tickets <- rename(tickets, Title = title) - tickets <- rename(tickets, Nr = number) - tickets <- rename(tickets, Due = due_date) - - suppressWarnings(verdes <- RColorBrewer::brewer.pal(nrow(tickets), "Greens")) - suppressWarnings(rojos <- RColorBrewer::brewer.pal(nrow(tickets), "Reds")) - - tickets_kable <- tickets %>% - mutate(Due = ifelse(Due < 0, kableExtra::cell_spec(Due, color = "white", - bold = TRUE, background = rojos), - kableExtra::cell_spec(Due, color = "white", - bold = TRUE, background = verdes)), - Nr = kableExtra::text_spec(Nr, link = issue_url), - Due = ifelse(is.na(Due), "-", Due)) %>% - select(-issue_url) %>% - kableExtra::kable(escape = FALSE) %>% - kableExtra::kable_styling("striped", "condensed") - } - return(tickets_kable) - } - - output$team_tickets <- function(){ - if (class(tickets) != "data.frame") { - tickets_kable <- "Invalid credentials. Please use authentication gadget." - } else if (nrow(tickets) == 0) { - tickets_kable <- "No tickets found in repository" - } else { - # Select tickets by open status - tickets <- tickets %>% - select(assignee.login, number, title, due_date, url) %>% - mutate(assignee.login = ifelse(is.na(assignee.login), "-", - assignee.login)) %>% - filter(assignee.login != ixplorer_user) %>% - tidyr::separate(col = due_date, into = c("due_date", "hour"), sep = "T") %>% - select(-hour) %>% - mutate(due_date = lubridate::ymd(due_date) - lubridate::today()) %>% - mutate(due_date = as.numeric(due_date)) %>% - tidyr::separate(col = url, - into = c("borrar", "issue_url"), sep = "repos/") %>% - select(-borrar) %>% - mutate(issue_url = paste(Sys.getenv("IXURL"), issue_url, sep = "/")) %>% - arrange(desc(due_date)) - - tickets <- rename(tickets, Title = title) - tickets <- rename(tickets, Nr = number) - tickets <- rename(tickets, Due = due_date) - tickets <- rename(tickets, User = assignee.login) - - suppressWarnings(verdes <- RColorBrewer::brewer.pal(nrow(tickets), "Greens")) - suppressWarnings(rojos <- RColorBrewer::brewer.pal(nrow(tickets), "Reds")) - - tickets_kable <- tickets %>% - mutate( - Due = ifelse(Due < 0, - kableExtra::cell_spec(Due, color = "white", - bold = TRUE, background = rojos), - kableExtra::cell_spec(Due, color = "white", - bold = TRUE, background = verdes)), - Nr = kableExtra::text_spec(Nr, link = issue_url), - Due = ifelse(is.na(Due), "-", Due)) %>% - select(-issue_url) %>% - kableExtra::kable(escape = FALSE) %>% - kableExtra::kable_styling("striped", "condensed") - } - return(tickets_kable) - - } - - output$quick_links <- function() { - if (class(tickets) != "data.frame") { - quick_links <- "Invalid credentials. Please use authentication gadget." - } else { - # Get closed tickets link - close_tickets_url <- "issues?q=&type=all&sort=&state=closed&labels=0&milestone=0&assignee=0" - ixurl <- sub("/$", "", Sys.getenv("IXURL")) - close_tickets_url <- paste(ixurl, Sys.getenv("IXPROJECT"), Sys.getenv("IXREPO"), - close_tickets_url, sep = "/") - - # Get milestones link - milestones_url <- paste(ixurl, Sys.getenv("IXPROJECT"), - Sys.getenv("IXREPO"), "milestones", sep = "/") - - # Get Wiki link - wiki_url <- paste(ixurl, Sys.getenv("IXPROJECT"), - Sys.getenv("IXREPO"), "wiki", sep = "/") - - # Get project link - project_url <- paste(ixurl, Sys.getenv("IXPROJECT"), sep = "/") - - # Final table - links <- c(close_tickets_url, milestones_url, wiki_url, project_url) - URL <- c("Closed tickets", "Milestones", "Wiki", "Project") - quick_links <- data_frame(links, URL) - - # Table with kableExtra - quick_links <- quick_links %>% - mutate( - URL = kableExtra::text_spec(URL, link = links)) %>% - select(-links) %>% - kableExtra::kable(escape = FALSE, align = "c") %>% - kableExtra::kable_styling("striped", "condensed", position = "center", - font_size = 20) - quick_links <- gsub(".*", "", quick_links) - } - return(quick_links) - } - - observeEvent(input$done, { - stopApp(TRUE) - }) - - } - - runGadget(ui, server, viewer = dialogViewer("ixplorer")) -} - - - +#' @import shiny +#' @import miniUI +NULL + +#' @title Tiquetes actuales +#' @description Visualice los tiquetes de un usuario en específico, de un equipo +#' y obtenga los enlaces a su ixplorer basado en las credenciales utilizadas en el +#' gadget de autentificación. +#' +#' @param instance instancia de ixplorer (Ejm: "secure", "masterclass", "prueba") +#' @param owner el nombre del proyecto donde se encuentra el repositorio en +#' ixplorer +#' @param repository el nombre del repositorio donde están los tiquetes +#' +#' @export +current_tickets <- function(instance, owner, repository = "current") { + + if(repository == "current") { + repository <- basename(rstudioapi::getActiveProject()) + } + + credenciales <- tryCatch( + keyring::key_get(paste0("token_", instance)), + error = function(cond) "no_credenciales") + + if(credenciales != "no_credenciales") { + credenciales <- credenciales %>% + stringr::str_split("/", simplify = TRUE) %>% + tibble::as_tibble() %>% + magrittr::set_names(c("url", "token", + "usuario", "persistencia")) %>% + dplyr::mutate(persistencia = as.logical(persistencia)) + + } + + if(credenciales$persistencia == FALSE) { + keyring::key_delete(paste0("token_", instance)) + } + + ui <- miniPage( + miniTitleBar("Tiquetes actuales", + right = miniTitleBarCancelButton(inputId = "done", + label = "Listo", + primary = TRUE) + ), + verbatimTextOutput("warning", placeholder = FALSE), + miniTabstripPanel( + miniTabPanel("Mis tiquetes", icon = icon("user"), + miniContentPanel( + tableOutput("my_tickets") + ) + ), + miniTabPanel("Tiquetes del equipo", icon = icon("users"), + miniContentPanel( + tableOutput("team_tickets") + ) + ), + miniTabPanel("Enlaces", icon = icon("link"), + miniContentPanel( + tableOutput("quick_links") + ) + ) + ) + ) + + server <- function(input, output, session){ + + output$warning <- renderText({ + msg <- ifelse (credenciales == "no_credenciales", + "No hay archivo de credenciales disponible", "") + return(msg) + }) + + # Get tickets and configurate credentials + tickets <- tryCatch({ + + gitear::get_issues_open_state( + base_url = paste0("https://", credenciales$url), + api_key = credenciales$token, + owner = owner, + repo = repository) + + }, + error = function(cond) { + tickets <- "Invalid" + }) + + + + output$my_tickets <- function() { + if (class(tickets) != "data.frame") { + tickets_kable <- "Credenciales inválidas. Por favor use el gadget de autentificación." + } else if (nrow(tickets) == 0) { + tickets_kable <- "No se encontraron tiquetes en el repositorio." + } else { + # Select tickets by user and tickets link creation + tickets <- tickets %>% + dplyr::filter(assignee.login == credenciales$usuario) %>% + dplyr:: select(number, title, due_date, url) %>% + tidyr::separate(col = due_date, into = c("due_date", "hour"), + sep = "T") %>% + dplyr::select(-hour) %>% + dplyr::mutate(due_date = lubridate::ymd(due_date) - + lubridate::today()) %>% + tidyr::separate(col = url, + into = c("borrar", "issue_url"), sep = "repos/") %>% + dplyr::select(-borrar) %>% + dplyr::mutate( + issue_url = paste(base_url = paste0("https://", credenciales$url), + issue_url, sep = "/")) %>% + dplyr::arrange(desc(due_date)) %>% + dplyr::rename(Title = title, Nr = number, Due = due_date) + + suppressWarnings(verdes <- RColorBrewer::brewer.pal(nrow(tickets), "Greens")) + suppressWarnings(rojos <- RColorBrewer::brewer.pal(nrow(tickets), "Reds")) + + tickets_kable <- tickets %>% + dplyr::mutate(Due = ifelse(Due < 0, kableExtra::cell_spec(Due, color = "white", + bold = TRUE, background = rojos), + kableExtra::cell_spec(Due, color = "white", + bold = TRUE, background = verdes)), + Nr = kableExtra::text_spec(Nr, link = issue_url), + Due = ifelse(is.na(Due), "-", Due)) %>% + dplyr::select(-issue_url) %>% + kableExtra::kable(escape = FALSE) %>% + kableExtra::kable_styling("striped", "condensed") + } + return(tickets_kable) + } + + output$team_tickets <- function() { + if (class(tickets) != "data.frame") { + tickets_kable <- "Credenciales inválidas. Por favor use el gadget de autentificación." + } else if (nrow(tickets) == 0) { + tickets_kable <- "No se encontraron tiquetes en el repositorio." + } else { + # Select tickets by open status + tickets <- tickets %>% + dplyr::select(assignee.login, number, title, due_date, url) %>% + dplyr::mutate(assignee.login = ifelse(is.na(assignee.login), "-", + assignee.login)) %>% + dplyr::filter(assignee.login != credenciales$usuario) %>% + tidyr::separate(col = due_date, into = c("due_date", "hour"), + sep = "T") %>% + dplyr::select(-hour) %>% + dplyr::mutate(due_date = lubridate::ymd(due_date) - + lubridate::today()) %>% + dplyr::mutate(due_date = as.numeric(due_date)) %>% + tidyr::separate(col = url, + into = c("borrar", "issue_url"), sep = "repos/") %>% + dplyr::select(-borrar) %>% + dplyr::mutate(issue_url = paste(base_url = paste0("https://", credenciales$url), + issue_url, sep = "/")) %>% + dplyr::arrange(desc(due_date)) %>% + dplyr::rename(Title = title, Nr = number, Due = due_date, + User = assignee.login) + + suppressWarnings(verdes <- RColorBrewer::brewer.pal(nrow(tickets), "Greens")) + suppressWarnings(rojos <- RColorBrewer::brewer.pal(nrow(tickets), "Reds")) + + tickets_kable <- tickets %>% + dplyr::mutate( + Due = ifelse(Due < 0, + kableExtra::cell_spec(Due, color = "white", + bold = TRUE, background = rojos), + kableExtra::cell_spec(Due, color = "white", + bold = TRUE, background = verdes)), + Nr = kableExtra::text_spec(Nr, link = issue_url), + Due = ifelse(is.na(Due), "-", Due)) %>% + dplyr::select(-issue_url) %>% + kableExtra::kable(escape = FALSE) %>% + kableExtra::kable_styling("striped", "condensed") + } + return(tickets_kable) + + } + + output$quick_links <- function() { + if (class(tickets) != "data.frame") { + quick_links <- "Credenciales inválidas. Por favor use el gadget de autentificación." + } else { + # Get closed tickets link + close_tickets_url <- "issues?q=&type=all&sort=&state=closed&labels=0&milestone=0&assignee=0" + ixurl <- paste0("https://", credenciales$url) + close_tickets_url <- paste(ixurl, owner, repository, + close_tickets_url, sep = "/") + + # Get milestones link + milestones_url <- paste(ixurl, owner, repository, "milestones", sep = "/") + + # Get Wiki link + wiki_url <- paste(ixurl, owner, repository, "wiki", sep = "/") + + # Get project link + project_url <- paste(ixurl, owner, sep = "/") + + # Final table + links <- c(close_tickets_url, milestones_url, wiki_url, project_url) + URL <- c("Closed tickets", "Milestones", "Wiki", "Project") + quick_links <- data.frame(links, URL) + + # Table with kableExtra + quick_links <- quick_links %>% + dplyr::mutate( + URL = kableExtra::text_spec(URL, link = links)) %>% + dplyr::select(-links) %>% + kableExtra::kable(escape = FALSE, align = "c") %>% + kableExtra::kable_styling("striped", "condensed", position = "center", + font_size = 20) + quick_links <- gsub(".*", "", quick_links) + } + return(quick_links) + } + + observeEvent(input$done, { + stopApp(TRUE) + }) + + } + + runGadget(ui, server, viewer = dialogViewer("ixplorer")) + + +} + + + diff --git a/R/git.R b/R/git.R new file mode 100644 index 0000000..a29e25b --- /dev/null +++ b/R/git.R @@ -0,0 +1,45 @@ +#' @title Añade el upstream al repositorio que está activo en RStudio +#' @description Añade el upstream al repositorio que está activo en RStudio en +#' este momento +#' +#' @param instance instancia de ixplorer (Ejm: "secure", "masterclass", "prueba") +#' @param owner el nombre del proyecto donde se encuentra el repositorio en +#' ixplorer +#' +#' @export +incluye_upstream <- function(instance, owner) { + + camino <- here::here() + + repository <- basename(rstudioapi::getActiveProject()) + + credenciales <- tryCatch( + keyring::key_get(paste0("token_", instance)), + error = function(cond) "no_credenciales") + + + if(credenciales != "no_credenciales") { + credenciales <- credenciales %>% + stringr::str_split("/", simplify = TRUE) %>% + tibble::as_tibble() %>% + magrittr::set_names(c("url", "token", + "usuario", "persistencia")) %>% + dplyr::mutate(persistencia = as.logical(persistencia)) + + } else { + stop(paste("Aún no existen credenciales para", instance)) + } + + if(credenciales$persistencia == FALSE) { + keyring::key_delete(paste0("token_", instance)) + } + + proyecto_madre = paste0( + "https://", + credenciales$url, "/", + owner, "/", + repository, + ".git") + + git2r::remote_add(repo = camino, name = "upstream", url = proyecto_madre) +} diff --git a/R/ixplorer.R b/R/ixplorer.R index d69afbf..1904bee 100644 --- a/R/ixplorer.R +++ b/R/ixplorer.R @@ -1,4 +1,7 @@ #' `ixplorer` package + +#' \code{ixplorer.es} package +#' `ixplorer` package #' #' ixplorer for dataops #' diff --git a/R/verify_authenticacion.R b/R/verify_authenticacion.R deleted file mode 100644 index bd7c5d5..0000000 --- a/R/verify_authenticacion.R +++ /dev/null @@ -1,123 +0,0 @@ -#' @import dplyr -NULL - -#' Verify authentication to ixplorer -#' -#' Verify if there is a .ixplorer file in your working directory and set -#' the variables. -#' -#' -verify_ixplorer_file <- function() { - api_creds <- list() - working_directory <- rstudioapi::getActiveProject() - ixplorer_file <- paste0(working_directory, "/.ixplorer") - # Leer ixplorer y poner condicionales ------------------------- - if (Sys.getenv("IXTOKEN") != "" & - Sys.getenv("IXURL") != "" & - Sys.getenv("IXPROJECT") != "" & - Sys.getenv("IXREPO") != "" & - Sys.getenv("IXUSER") != "") { - - token <- paste0("IXTOKEN=", Sys.getenv("IXTOKEN")) - url <- paste0("IXURL=", Sys.getenv("IXURL")) - project <- paste0("IXPROJECT=", Sys.getenv("IXPROJECT")) - repo <- paste0("IXREPO=", Sys.getenv("IXREPO")) - user <- paste0("IXUSER=", Sys.getenv("IXUSER")) - - lines <- c(token, url, project, repo, user) - lines <- as.data.frame(lines) - api_creds$empty <- FALSE - api_creds$gitear_access <- tidyr::separate(lines, lines, - into = c("variable", "value"), - sep = "=") - - } else if (file.exists(ixplorer_file)) { - readRenviron(ixplorer_file) - conn <- file(ixplorer_file, open = "r") - lines <- readLines(conn) - close(conn) - - gitear_access <- as.data.frame(lines) - api_creds$empty <- FALSE - api_creds$gitear_access <- tidyr::separate(gitear_access, lines, - into = c("variable", "value"), sep = "=") - - } else { - api_creds$empty <- TRUE - } - return(api_creds) -} - -#' Verify ixtoken -#' -#' Verify if there is a token to your ixplorer repository -#' -verify_ixtoken <- function(gitear_access){ - if (!(TRUE %in% stringr::str_detect(gitear_access$variable, "IXTOKEN") && - FALSE %in% any(is.na(gitear_access[1,2])))) { - print("There is no ixplorer TOKEN, please use the Authentication gadget") - } -} - -#' Verify ixurl -#' -#' Verify if there is an URL to your ixplorer repository -#' -verify_ixurl <- function(gitear_access){ - if (!(TRUE %in% stringr::str_detect(gitear_access$variable, "IXURL") && - FALSE %in% any(is.na(gitear_access[2,2])))) { - print("There is no ixplorer URL, please use the Authentication gadget") - } -} - - ## IXPROJECT ---- -#' Verify ixproject -#' -#' Verify if there is a project name where your ixplorer repository belongs. -#' -verify_ixproject <- function(gitear_access){ - if (!(TRUE %in% stringr::str_detect(gitear_access$variable, "IXPROJECT") && - FALSE %in% any(is.na(gitear_access[3,2])))) { - print("There is no ixplorer PROJECT name, please use the Authentication gadget") - } -} - - ## IXREPO ---- -#' Verify ixrepo -#' -#' Verify if there is the name of your ixplorer repository -#' -verify_ixrepo <- function(gitear_access){ - if (!(TRUE %in% stringr::str_detect(gitear_access$variable, "IXREPO") && - FALSE %in% any(is.na(gitear_access[4,2])))) { - print("There is no ixplorer REPOSITORY, please use the Authentication gadget") - } -} - - ## IXUSER ---- -#' Verify ixuser -#' -#' Verify if there is an user name. -#' -verify_ixuser <- function(gitear_access) { - if (!(TRUE %in% stringr::str_detect(gitear_access$variable, "IXUSER") && - FALSE %in% any(is.na(gitear_access[5,2])))) { - print("There is no ixplorer USER, please use the Authentication gadget") - } -} - -#' Verify each of the steps -#' -#' Verify each of the elements needed to access your repository from a gadget -#' -#' -set_authentication <- function(access_data) { - ixurl <- verify_ixurl(access_data) - ixtoken <- verify_ixtoken(access_data) - ixproject <- verify_ixproject(access_data) - ixrepo <- verify_ixrepo(access_data) - ixuser <- verify_ixuser(access_data) - msj <- c(ixurl, ixtoken, ixproject, ixrepo, ixuser) - return(msj) -} - diff --git a/README.md b/README.md index b4d1bd6..4355582 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,4 @@ You can now install ixplorer from GitHub with: ``` r devtools::install_github("ixpantia/ixplorer") ``` + diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..44dd56a --- /dev/null +++ b/docs/404.html @@ -0,0 +1,153 @@ + + + + + + + + +Page not found (404) • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +Content not found. Please use links in the navbar. + +
+ +
+ + + + +
+ + + + + + + + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html new file mode 100644 index 0000000..5a4ad00 --- /dev/null +++ b/docs/LICENSE-text.html @@ -0,0 +1,158 @@ + + + + + + + + +License • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
Proprietary
+
+Copyright 2018 ixpantia S.R.L.
+
+All rights reserved. Do not distribute.
+
+ +
+ +
+ + + + +
+ + + + + + + + diff --git a/docs/articles/credentials.html b/docs/articles/credentials.html new file mode 100644 index 0000000..2c63663 --- /dev/null +++ b/docs/articles/credentials.html @@ -0,0 +1,193 @@ + + + + + + + +ixplorer credentials • ixplorer + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+

+Where can I get my credentials? +

+

If you are wondering where you can get your API token or you are not sure about the url, name of the upstream project, the ixplorer repository name or the user name, this vignette will show how to get them.

+
+

+Getting the API token

+

The first thing you should do is to go to the settings option that it’s below your account avatar.

+

+

Once there, there is a tab with the applications name on it. Click there and you will hace the option to generate an API token. You have to put a name to your token and then create it.

+

+

After you click on Generate token you will see a large number that it’s the API token. Please make sure to save this, it’s the credential that you will need to put on your Authentication gadget to access the data of your repositories from RStudio.

+

+
+
+

+Getting your ixplorer url

+

This is an easy one because you just need to search for your ixplorer environment on internet and paste the url. Just add a / at the end of the url.

+

As an example, the credential ixplorer url from the image below would be:

+ +

+
+
+

+Name of the upstream projet

+

This is the name of the project where your repository of interest it’s related. You have to be careful to write the name of the upstream project as it appears on the url. For example, in the image below we can see that the name of the project is Credit risk model and API and it has two repositories under it.

+

But the actual name of the project its abbreviated and it is the one that appears on the url as credit_risk. This one is the piece needed to access your data through your ixplorer gadgets.

+

+
+
+

+Repository

+

When you start a session, basically you are going to work focused on one repository. If we continue with the example, we saw two repositories under the Credit risk model and API: mod_credit_risk and api_credit_risk.

+

If we want to work on the mod_credit_risk we have to write this name on the authentication gadget.

+

+
+
+

+User name

+

This is just the same user name that you use to access to your ixplorer environment. On this example case it would be sasha

+

+
+
+

+How the authentication gadget would look like?

+

Finally, to confirm all the steps, the authentication gadget with the credentials we look for would like this:

+

+
+
+
+ + + +
+ + + + +
+ + + + + + diff --git a/docs/articles/dictionary.html b/docs/articles/dictionary.html new file mode 100644 index 0000000..a664e69 --- /dev/null +++ b/docs/articles/dictionary.html @@ -0,0 +1,211 @@ + + + + + + + +Dictionary to the ixplorer • ixplorer + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+

+Dictionary purpose

+

The aim of this dictionary is to provide you with short explanations about the main components of the ixplorer. This will help you with your everyday project workflow and communicate better with you Data Science team.

+
+
+

+What is a project?

+

A project is your work subject where you try to reach specific goals. Within a project you can have several repositories up to your needs of organization.

+

A project can be for example a credit risk modelling and under this project you can have the exploratory_analysis repo, the model repository and the R package repository to keep code separated but code that it’s referred to the same topic.

+

The page of a project would like similar to this one:

+

+
+
+

+What is a repository?

+

A repository can be viewed as a folder where you keep all your files. This files can be share with other team members to start to collaborate on differente tickets.

+

+

There are ways to keep an organized repository either if you are working in a R package or in a single RStudio project with R files or others.

+

Our recommendation is:

+
    +
  • To have a data folder inside your repository where you can put all different sources of data
  • +
  • image folder if you need to include images or binaries files.
  • +
  • The .Rproject should be visible
  • +
  • The R scripts shouldnot be in a folder and names should be without spaces, points or combining lower/upper cases.
  • +
+
+
+

+What is upstream?

+

Upstream is the standard name that we use to refer to the “central” repository which is the one that have the functional clean code. From this central repository everyone in the team have to make a fork from in order to work on their tickets.

+
+
+

+Fork

+

This is a “copy” of the central repository. It’s going to be under your user name. You fork a repository when you want to contribute with code to the central repository. At the moment when you are ready to offer your improvements, you do a pull request. In your fork (unless you do a pull request) only your work is going to affect your forked repository, not the original one. You have to be aware that all the changes made in the upstream repository are not going to appear automatically in your fork unless you follow a process with git to update your project.

+
+
+

+Ticket

+

Tickets are made for document things that need to be donde inside a repository. Tickets can have differente categories:

+
    +
  • Question: a question related to the topics of the repository.
  • +
  • New: a new feature that can be achieve in the code.
  • +
  • Improve: an idea or remark of an improvement that can be done.
  • +
  • Error: when something in the code it’s not working and needs to be resolve.
  • +
  • Wish: a feature that can be done but it have no priority.
  • +
+
+
+

+Milestone

+

A way to organize your project priorities, assigning tikects to each of the milestone that you define. An example of a milestone can be a release of a package.

+
+
+

+Wiki

+

The place of your repository where you can document, define and keep information needed to communicate to your team to solve doubts, to get informed about the project.

+
+
+

+Release

+

Release is made to establish a release of your code, or what it means: that you have a due date where all the code it’s ready so it has a review, clean and functional code.

+

All this code that can be an R package is labeled as a release so it marks an specific point on your git project history.

+
+
+

+Configuration

+

On this place you can configure your repository, people who have access, who can collaborate, write or change code. If you want to eliminate your repository, change the rights this is the place to go.

+
+
+ + + +
+ + + + +
+ + + + + + diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 0000000..2815858 --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,159 @@ + + + + + + + + +Articles • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + + +
+
+ + + +
+ + + + + + + + diff --git a/docs/articles/ixplorer.html b/docs/articles/ixplorer.html new file mode 100644 index 0000000..4a52efe --- /dev/null +++ b/docs/articles/ixplorer.html @@ -0,0 +1,199 @@ + + + + + + + +ixplorer gadgets • ixplorer + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+

+ixplorer gadgets

+

ixplorer gadgets are a way to create and check your project tickets without leaving RStudio and more important: without interrupting your workflow.

+
+
+

+How to use the ixplorer gadgets

+

First you have to install the ixplorer package:

+
devtools::install_github("ixpantia/gitear")
+

When you are done with the installation, you will see three options under the IXPLORER header, in the Addins menu:

+
    +
  • Authenticate
  • +
  • Create ticket
  • +
  • Current tickets
  • +
  • ixplorer dashboard
  • +
+

+
+

+Authenticate gadget

+

This is the first step in order to be able to create tickets or check you project tickets with the ixplorer gadgets. You will need an API key (provided by your project manager).

+

+

At the ixplorer url make sure to include the internet address of your ixplorer repository. It will be similar to: https://ixplorer_name.ixpantia.com/

+

The next step is to fill the name of the upstream project. This is the project where the source version of the repository resides. From this source you, and other members of your team, will have forked your own clone of this repository to make changes and propose pull requests. In our workflow we manage all the tickets centrally in the upstream project. Any tickets that you create in your personal fork will not be visible through the ixplorer gadget (and in general we recommend not to work with personal tickets).

+

At the ixplorer repository name please write the name of the specific repository where we are going to work with in the current RStudio project that is active.

+

Finally you have to speficy your user name in the section ixplorer user name This is the same user name that we use to access to the ixplorer environment.

+

There is an persist token option. If you are working in your personal computer, you can select this option. It will keep a copy of all your authentication data in a local file to reuse it the next time you open the project in RStudio. Otherwise you will have to authenticate each time that you are going to work on the same project.

+

Be careful because if you are working in somebody else’s computer, your personal authentication data is going to be stored on that machine. If you are going to work on a shared or public computer, it it best to leave the persist token option without a checkmark.

+
+

+How the .ixplorer looks like?

+

At the end of your authentication through yout authentication gadget, a resulting ixplorer file with your credentials will look like this:

+

IXTOKEN= 08864824783ec0b589101191f65e643e54c8ad76c IXURL= https://ixplorer_name.ixpantia.com/ IXPROJECT= your_project_name IXREPO= your_repo_name IXUSER= your_user_name

+

Every time you use the other gadgets, they are going to check this .ixplorer file and make this credentials part of your session environment variables.

+

If you use the function Sys.getenv() you are going to be able to see this credentials with the IX names on it.

+
+
+
+

+Create ticket gadget

+

At this point you should have all your authentication process done. If that is correct you will to be able to create a ticket without getting out of RStudio!

+

If everything is okay, you are just going to see the ticket title and Description section. If not, you are going to see a text warning you what is missing.

+

+

In this gadget you can create a ticket without loosing your workflow and ideas. If you came up with a new ticket (wish/improvement/question) you can go to Addins > Create ticket and under the ticket title write the title of your new ticket and under the Description section write your idea.

+

This ticket is going to appear on your ixplorer repository open tickets

+
+
+

+Current tickets

+

This gadget is designed to give you a quick overview of active tickets and their status. Also you will find some quick links that will take you to the ixplorer if you want to check details such as ticket comments or make changes like due dates of assignments.

+

At the first tab My tickets, you are going to be able to check the tickets assigned to you with the number id that also is a quick link to the ticket on your ixplorer environment. Also you will see a column with the number of days left (on green) or days passed the due date (red).

+

+

On the second tab Team tickets you will see all open tickets related to the current (active) project, not just the ones assigned to you. The ID number is a quick link to the complete ticket on your ixplorer and the Due column is the days left on green for the due date or red if the due date was missed.

+

+

Finally the Quick links you have the links to the principal components of your project repository, so you don’t have to type to much in your browser to find a specific direction.

+

This quick links will allow you to find faster specific details of your project repository as closed tickets, milestones, the wiki, or the project place where all the repositories concerning to the project are.

+

+
+
+
+ + + +
+ + + + +
+ + + + + + diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..b85ccb8 --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,166 @@ + + + + + + + + +Authors • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
    +
  • +

    ixpantia, SRL. Copyright holder. +

    +
  • +
  • +

    Frans van Dunne. Maintainer, author. +

    +
  • +
  • +

    Ronny Hernández Mora. Author. +

    +
  • +
+ +
+ +
+ + + + +
+ + + + + + + + diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..e5f1fe1 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,148 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/docs/docsearch.js b/docs/docsearch.js new file mode 100644 index 0000000..b35504c --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..532d8ec --- /dev/null +++ b/docs/index.html @@ -0,0 +1,174 @@ + + + + + + + +Easy DataOps For R Users • ixplorer + + + + + + + + + + +
+
+ + + + +
+
+
+ + + +
+

+Español

+

El paquete ixplorer trae la funcionalidad de ixplorer mas cerca tuyo.

+
+

+Instalación

+

Gracias por usar ixplorer.

+

Para installar ixplorer, primero necesitas installar el paquete devtools (o remotes). Si no lo has hecho aún, puedes instalarlo con:

+
install.packages("devtools")
+

Ahora puedes instalar ixplorer de GitHub con:

+
devtools::install_github("ixpantia/ixplorer")
+
+
+
+

+English

+

The ixplorer package brings the functionality of ixplorer closer to you.

+
+

+Installation

+

In case you do not have the devtools package installed on your computer, you can do it with:

+
install.packages("devtools")
+

You can now install ixplorer from GitHub with:

+
devtools::install_github("ixpantia/ixplorer")
+
+
+
+
+ + +
+ + + +
+ + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..9145958 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,256 @@ +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + +body > .container { + display: flex; + height: 100%; + flex-direction: column; +} + +body > .container .row { + flex: 1 0 auto; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; + flex-shrink: 0; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +img { + max-width: 100%; +} + +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents .page-header { + margin-top: calc(-60px + 1em); +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + margin-left: -30px; + display:inline-block; + width: 30px; + height: 30px; + visibility: hidden; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +.hasAnchor:hover a.anchor { + visibility: visible; +} + +@media (max-width: 767px) { + .hasAnchor:hover a.anchor { + visibility: hidden; + } +} + + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -40px; +} + +/* Sidebar --------------------------*/ + +#sidebar { + margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; +} +#sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#sidebar h2:first-child { + margin-top: 0; +} + +#sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +.orcid { + height: 16px; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} + +.ref-index td {vertical-align: top;} +.ref-index .icon {width: 40px;} +.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre { + word-wrap: normal; + word-break: normal; + border: 1px solid #eee; +} + +pre, code { + background-color: #f8f8f8; + color: #333; +} + +pre code { + overflow: auto; + word-wrap: normal; + white-space: pre; +} + +pre .img { + margin: 5px 0; +} + +pre .img img { + background-color: #fff; + display: block; + height: auto; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.message { color: black; font-weight: bolder;} +.error { color: orange; font-weight: bolder;} +.warning { color: #6A0366; font-weight: bolder;} + +/* Clipboard --------------------------*/ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} + +/* vertical spacing after htmlwidgets */ +.html-widget { + margin-bottom: 10px; +} + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 0000000..087a762 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,113 @@ +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); + + $('body').scrollspy({ + target: '#sidebar', + offset: 60 + }); + + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } + } + + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); + + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } + + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); + + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } + + return(haystack.length); + } + + /* Clipboard --------------------------*/ + + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); + } + + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $(".examples, div.sourceCode").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent; + } + }); + + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); + + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); + }); + } +})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml new file mode 100644 index 0000000..526139d --- /dev/null +++ b/docs/pkgdown.yml @@ -0,0 +1,8 @@ +pandoc: 2.7.2 +pkgdown: 1.4.1 +pkgdown_sha: ~ +articles: + credentials: credentials.html + dictionary: dictionary.html + ixplorer: ixplorer.html + diff --git a/docs/reference/add_token.html b/docs/reference/add_token.html new file mode 100644 index 0000000..766b258 --- /dev/null +++ b/docs/reference/add_token.html @@ -0,0 +1,169 @@ + + + + + + + + +Authenticate to ixplorer — add_token • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Make the connection to your repository through the ixplorer gadget and be +able to create tickets, review tickets without re-writing your credentials

    +
    + +
    add_token()
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/create_tickets.html b/docs/reference/create_tickets.html new file mode 100644 index 0000000..a601aa8 --- /dev/null +++ b/docs/reference/create_tickets.html @@ -0,0 +1,171 @@ + + + + + + + + +Create ticket — create_tickets • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Create tickets (Title and body) from the ixplorer addin without loosing the +ideas during your workflow. tickets will be in the repository that corresponds +to the information youo give in the authenticate gadget.

    +
    + +
    create_tickets()
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/current_tickets.html b/docs/reference/current_tickets.html new file mode 100644 index 0000000..6ab5bcc --- /dev/null +++ b/docs/reference/current_tickets.html @@ -0,0 +1,169 @@ + + + + + + + + +Current tickets — current_tickets • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Visualize the tickets of a specific user, a team and get the quick links to +your ixplorer based on the credentials used in gadget authenticate.

    +
    + +
    current_tickets()
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/dashboard.html b/docs/reference/dashboard.html new file mode 100644 index 0000000..daed284 --- /dev/null +++ b/docs/reference/dashboard.html @@ -0,0 +1,167 @@ + + + + + + + + +Show ixplorer dashboard — dashboard • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Show ixplorer dashboard

    +
    + +
    dashboard()
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 0000000..96f18f1 --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,252 @@ + + + + + + + + +Function reference • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    All functions

    +

    +
    +

    add_token()

    +

    Authenticate to ixplorer

    +

    create_tickets()

    +

    Create ticket

    +

    current_tickets()

    +

    Current tickets

    +

    dashboard()

    +

    Show ixplorer dashboard

    +

    ixplorer

    +

    ixplorer package

    +

    list_open_tickets() list_closed_tickets()

    +

    List open and closed tickets.

    +

    set_authentication()

    +

    Verify each of the steps

    +

    verify_ixplorer_file()

    +

    Verify authentication to ixplorer

    +

    verify_ixproject()

    +

    Verify ixproject

    +

    verify_ixrepo()

    +

    Verify ixrepo

    +

    verify_ixtoken()

    +

    Verify ixtoken

    +

    verify_ixurl()

    +

    Verify ixurl

    +

    verify_ixuser()

    +

    Verify ixuser

    +
    + + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/ixplorer.html b/docs/reference/ixplorer.html new file mode 100644 index 0000000..051dbd7 --- /dev/null +++ b/docs/reference/ixplorer.html @@ -0,0 +1,170 @@ + + + + + + + + +<code>ixplorer</code> package — ixplorer • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    ixplorer for dataops

    +
    + + + +

    Details

    + +

    See the README on

    + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/list_tickets.html b/docs/reference/list_tickets.html new file mode 100644 index 0000000..44726df --- /dev/null +++ b/docs/reference/list_tickets.html @@ -0,0 +1,194 @@ + + + + + + + + +List open and closed tickets. — list_tickets • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    list_open_tickets() and list_closed_tickets list open and closed +tickets. The "current" respository is the one linked to the active RStudio +project.

    +
    + +
    list_open_tickets(lag = 7, repository = "current", clip = TRUE)
    +
    +list_closed_tickets(lag = 7, repository = "current", clip = TRUE)
    + +

    Arguments

    + + + + + + + + + + + + + + +
    lag

    FIXME

    repository

    FIXME

    clip

    FIXME

    + +

    Value

    + +

    FIXME

    + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/set_authentication.html b/docs/reference/set_authentication.html new file mode 100644 index 0000000..d6ef0d6 --- /dev/null +++ b/docs/reference/set_authentication.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify each of the steps — set_authentication • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify each of the elements needed to access your repository from a gadget

    +
    + +
    set_authentication(access_data)
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixplorer_file.html b/docs/reference/verify_ixplorer_file.html new file mode 100644 index 0000000..8e21cbd --- /dev/null +++ b/docs/reference/verify_ixplorer_file.html @@ -0,0 +1,169 @@ + + + + + + + + +Verify authentication to ixplorer — verify_ixplorer_file • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is a .ixplorer file in your working directory and set +the variables.

    +
    + +
    verify_ixplorer_file()
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixproject.html b/docs/reference/verify_ixproject.html new file mode 100644 index 0000000..101d366 --- /dev/null +++ b/docs/reference/verify_ixproject.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify ixproject — verify_ixproject • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is a project name where your ixplorer repository belongs.

    +
    + +
    verify_ixproject(gitear_access)
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixrepo.html b/docs/reference/verify_ixrepo.html new file mode 100644 index 0000000..31dd643 --- /dev/null +++ b/docs/reference/verify_ixrepo.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify ixrepo — verify_ixrepo • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is the name of your ixplorer repository

    +
    + +
    verify_ixrepo(gitear_access)
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixtoken.html b/docs/reference/verify_ixtoken.html new file mode 100644 index 0000000..f06fc7c --- /dev/null +++ b/docs/reference/verify_ixtoken.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify ixtoken — verify_ixtoken • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is a token to your ixplorer repository

    +
    + +
    verify_ixtoken(gitear_access)
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixurl.html b/docs/reference/verify_ixurl.html new file mode 100644 index 0000000..f8da472 --- /dev/null +++ b/docs/reference/verify_ixurl.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify ixurl — verify_ixurl • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is an URL to your ixplorer repository

    +
    + +
    verify_ixurl(gitear_access)
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/verify_ixuser.html b/docs/reference/verify_ixuser.html new file mode 100644 index 0000000..696f902 --- /dev/null +++ b/docs/reference/verify_ixuser.html @@ -0,0 +1,167 @@ + + + + + + + + +Verify ixuser — verify_ixuser • ixplorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Verify if there is an user name.

    +
    + +
    verify_ixuser(gitear_access)
    + + + +
    + +
    + + + +
    + + + + + + + + diff --git a/inst/dashboard/global.R b/inst/dashboard/global.R index 208d491..3ed3de0 100644 --- a/inst/dashboard/global.R +++ b/inst/dashboard/global.R @@ -9,12 +9,12 @@ library(gitear) # Set global options ---------------------------------------------------------- ## Si pongo estas funciones no sirve el dashboard. da un error -access_file <- ixplorer:::verify_ixplorer_file() +access_file <- ixplorer.es:::verify_ixplorer_file() msg <- if (access_file$empty == TRUE) { "no credential file available" } else { - ixplorer:::set_authentication(access_data = access_file$gitear_access) + ixplorer.es:::set_authentication(access_data = access_file$gitear_access) } warning(msg) diff --git a/inst/rstudio/addins.dcf b/inst/rstudio/addins.dcf index 902a1ee..3716873 100644 --- a/inst/rstudio/addins.dcf +++ b/inst/rstudio/addins.dcf @@ -1,14 +1,14 @@ -Name: Authenticate -Description: Add credentials to authenticate to your ixplorer +Name: Autentificación +Description: Agregue credenciales para su autentificación a ixplorer Binding: add_token Interactive: true -Name: Create ticket -Description: Create a ticket on ixplorer +Name: Crear tiquete +Description: Crear tiquete en ixplorer Binding: create_tickets Interactive: true -Name: Current tickets -Description: Get overview of current tickets in this repository +Name: Tiquetes actuales +Description: Obtenga un vistazo de los tiquetes actuales en el repositorio Binding: current_tickets Interactive: true diff --git a/ixplorer.Rproj b/ixplorer.Rproj index cba1b6b..08d5ab1 100644 --- a/ixplorer.Rproj +++ b/ixplorer.Rproj @@ -1,21 +1,21 @@ -Version: 1.0 - -RestoreWorkspace: No -SaveWorkspace: No -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace +Version: 1.0 + +RestoreWorkspace: No +SaveWorkspace: No +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace diff --git a/man/add_token.Rd b/man/add_token.Rd index 3dd0c60..8052787 100644 --- a/man/add_token.Rd +++ b/man/add_token.Rd @@ -2,11 +2,16 @@ % Please edit documentation in R/authenticate.R \name{add_token} \alias{add_token} -\title{Authenticate to ixplorer} +\title{Autentificación en ixplorer} \usage{ add_token() } \description{ -Make the connection to your repository through the ixplorer gadget and be -able to create tickets, review tickets without re-writing your credentials +Guarda en su computadora por medio del sistema de + autentificación del OS de su computadora. +} +\details{ +En caso de que los credenciales ya existan solo se ingresa el url +y se confirma si quiere conservar los credenciales en su computador o quiere +borrarlos luego de la siguiente consulta. } diff --git a/man/create_tickets.Rd b/man/create_tickets.Rd index 66ad016..28a11e5 100644 --- a/man/create_tickets.Rd +++ b/man/create_tickets.Rd @@ -2,12 +2,19 @@ % Please edit documentation in R/create_ticket.R \name{create_tickets} \alias{create_tickets} -\title{Create ticket} +\title{Crear tiquete} \usage{ -create_tickets() +create_tickets(instance, owner, repository = "current") +} +\arguments{ +\item{instance}{instancia de ixplorer (Ejm: "secure", "masterclass", "prueba")} + +\item{owner}{el nombre del proyecto donde se encuentra el repositorio en +ixplorer} + +\item{repository}{el nombre del repositorio donde están los tiquetes} } \description{ -Create tickets (Title and body) from the ixplorer addin without loosing the -ideas during your workflow. tickets will be in the repository that corresponds -to the information youo give in the authenticate gadget. +Crear tiquetes (título y cuerpo) desde el addin de ixplorer sin +perder las ideas durante su flujo de trabajo. } diff --git a/man/current_tickets.Rd b/man/current_tickets.Rd index b137bbd..958e822 100644 --- a/man/current_tickets.Rd +++ b/man/current_tickets.Rd @@ -2,11 +2,20 @@ % Please edit documentation in R/current_tickets.R \name{current_tickets} \alias{current_tickets} -\title{Current tickets} +\title{Tiquetes actuales} \usage{ -current_tickets() +current_tickets(instance, owner, repository = "current") +} +\arguments{ +\item{instance}{instancia de ixplorer (Ejm: "secure", "masterclass", "prueba")} + +\item{owner}{el nombre del proyecto donde se encuentra el repositorio en +ixplorer} + +\item{repository}{el nombre del repositorio donde están los tiquetes} } \description{ -Visualize the tickets of a specific user, a team and get the quick links to -your ixplorer based on the credentials used in gadget authenticate. +Visualice los tiquetes de un usuario en específico, de un equipo + y obtenga los enlaces a su ixplorer basado en las credenciales utilizadas en el +gadget de autentificación. } diff --git a/man/incluye_upstream.Rd b/man/incluye_upstream.Rd new file mode 100644 index 0000000..07dcc77 --- /dev/null +++ b/man/incluye_upstream.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/git.R +\name{incluye_upstream} +\alias{incluye_upstream} +\title{Añade el upstream al repositorio que está activo en RStudio} +\usage{ +incluye_upstream(instance, owner) +} +\arguments{ +\item{instance}{instancia de ixplorer (Ejm: "secure", "masterclass", "prueba")} + +\item{owner}{el nombre del proyecto donde se encuentra el repositorio en +ixplorer} +} +\description{ +Añade el upstream al repositorio que está activo en RStudio en +este momento +} diff --git a/man/ixplorer.Rd b/man/ixplorer.Rd index 150a176..770051b 100644 --- a/man/ixplorer.Rd +++ b/man/ixplorer.Rd @@ -3,8 +3,7 @@ \docType{package} \name{ixplorer} \alias{ixplorer} -\alias{ixplorer-package} -\title{\code{ixplorer} package} +\title{\code{ixplorer.es} package} \description{ ixplorer for dataops } diff --git a/man/set_authentication.Rd b/man/set_authentication.Rd deleted file mode 100644 index 710d3dd..0000000 --- a/man/set_authentication.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{set_authentication} -\alias{set_authentication} -\title{Verify each of the steps} -\usage{ -set_authentication(access_data) -} -\description{ -Verify each of the elements needed to access your repository from a gadget -} diff --git a/man/verify_ixplorer_file.Rd b/man/verify_ixplorer_file.Rd deleted file mode 100644 index 57983b6..0000000 --- a/man/verify_ixplorer_file.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixplorer_file} -\alias{verify_ixplorer_file} -\title{Verify authentication to ixplorer} -\usage{ -verify_ixplorer_file() -} -\description{ -Verify if there is a .ixplorer file in your working directory and set -the variables. -} diff --git a/man/verify_ixproject.Rd b/man/verify_ixproject.Rd deleted file mode 100644 index c50137d..0000000 --- a/man/verify_ixproject.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixproject} -\alias{verify_ixproject} -\title{Verify ixproject} -\usage{ -verify_ixproject(gitear_access) -} -\description{ -Verify if there is a project name where your ixplorer repository belongs. -} diff --git a/man/verify_ixrepo.Rd b/man/verify_ixrepo.Rd deleted file mode 100644 index d0c163c..0000000 --- a/man/verify_ixrepo.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixrepo} -\alias{verify_ixrepo} -\title{Verify ixrepo} -\usage{ -verify_ixrepo(gitear_access) -} -\description{ -Verify if there is the name of your ixplorer repository -} diff --git a/man/verify_ixtoken.Rd b/man/verify_ixtoken.Rd deleted file mode 100644 index 2aec203..0000000 --- a/man/verify_ixtoken.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixtoken} -\alias{verify_ixtoken} -\title{Verify ixtoken} -\usage{ -verify_ixtoken(gitear_access) -} -\description{ -Verify if there is a token to your ixplorer repository -} diff --git a/man/verify_ixurl.Rd b/man/verify_ixurl.Rd deleted file mode 100644 index 3f88900..0000000 --- a/man/verify_ixurl.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixurl} -\alias{verify_ixurl} -\title{Verify ixurl} -\usage{ -verify_ixurl(gitear_access) -} -\description{ -Verify if there is an URL to your ixplorer repository -} diff --git a/man/verify_ixuser.Rd b/man/verify_ixuser.Rd deleted file mode 100644 index e518309..0000000 --- a/man/verify_ixuser.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/verify_authenticacion.R -\name{verify_ixuser} -\alias{verify_ixuser} -\title{Verify ixuser} -\usage{ -verify_ixuser(gitear_access) -} -\description{ -Verify if there is an user name. -} diff --git a/vignettes/credentials.Rmd b/vignettes/credentials.Rmd index 3ef4777..4e2941b 100644 --- a/vignettes/credentials.Rmd +++ b/vignettes/credentials.Rmd @@ -1,9 +1,10 @@ --- -title: "ixplorer credentials" +title: "ixplorer gestión credenciales" author: "ixpantia" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > + %\VignetteIndexEntry{Gestión de credenciales} %\VignetteIndexEntry{ixplorer credentials} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdown} @@ -18,74 +19,73 @@ knitr::opts_chunk$set( ) ``` -# **Where can I get my credentials?** +# **¿Dónde puedo obtener mis credenciales** -If you are wondering where you can get your API token or you are not sure about -the url, name of the upstream project, the ixplorer repository name or the -user name, this vignette will show how to get them. +Si se ha preguntado dónde puede obtener su token API o no está seguro de la +dirección url, el nombre del proyecto 'upstream', el nombre del repositorio +ixplorer o el nombre del usuario, este vignette le ayudará a obtenerlos. -## Getting the API token -The first thing you should do is to go to the **settings** option that it's -below your account avatar. +## Obteniendo el token API +Lo primero que tiene que hacer es ir a la sección de **configuración** que está +debajo del avatar de su cuenta. ![](img/api_token.png) -Once there, there is a tab with the **applications** name on it. Click there -and you will hace the option to generate an API token. You have to put a name -to your token and then create it. +Una vez allí se encuentra una pestaña con el nombre de **aplicaciones**. Se debe +de hacer click en esta opción y así la opción de generar un token API estará +disponible. Para obtenerlo hay que colocarle un nombre al API y luego crearlo. ![](img/api_token_2.png) -After you click on **Generate token** you will see a large number that it's -the API token. Please make sure to save this, it's the credential that you will -need to put on your **Authentication gadget** to access the data of your -repositories from RStudio. +Después de hacer click en **Generar token** usted verá un número compuesto de +varios dígitos. Este es el token API. Asegúrese de anotarlo y guardarlo en algún +sitio ya que es la credencial que usted necesitará colocar en el +**gadget de autentificación** para lograr acceder a los datos de su repositorio +desde RStudio. ![](img/api_token_3.png) -## Getting your ixplorer url -This is an easy one because you just need to search for your ixplorer -environment on internet and paste the url. Just add a **/** at the end of the +## Obteniendo el url del ixplorer + +Este segmento es simple ya que sólamente es necesario buscar su entorno ixplorer +en internet y copiar el url. Únicamente hay que agrear un **/** al final del url. -As an example, the credential ixplorer url from the image below would be: +Como ejemplo, la credencial url del ixplorer de la imagen abajo mostrada sería: - https:://prueba.ixpantia.com/ ![](img/credential_url.png) -## Name of the upstream projet -This is the name of the project where your repository of interest it's related. -You have to be careful to write the name of the upstream project as it appears -on the url. For example, in the image below we can see that the name of the -project is **Credit risk model and API** and it has two repositories under it. +## Nombre del proyecto upstream -But the actual name of the project its abbreviated and it is the one that -appears on the url as **credit_risk**. This one is the piece needed to access -your data through your ixplorer gadgets. +Este es el nombre del proyecto donde sus repositorios de interés están albergados. +Hay que tener precaución de escribir el nombre del proyect upstream tal cual +como aparece en el url. Por ejemplo, en la imagen abajo podemos ver que el nombre +del proyecto es **Credit risk model and API** y contiene dos repositorios. ![](img/credential_1.png) -## Repository -When you start a session, basically you are going to work focused on one -repository. If we continue with the example, we saw two repositories under the -_Credit risk model and API_: **mod_credit_risk** and **api_credit_risk**. +## Repositorio +Cuando se inicia la sesión, basicamente estará enfocado en un sólo repositorio. +Si continuamos con el ejemplo, tenemos dos repositorios bajo +_Credit risk model and API_: **mod_credit_risk** y **api_credit_risk**. -If we want to work on the **mod_credit_risk** we have to write this name on the -authentication gadget. +Si queremos trabajar en el repositorio **mod_credit_risk** tenemos que escribir +este nombre en el gadget de autentificación. ![](img/credential_2.png) -## User name -This is just the same user name that you use to access to your ixplorer -environment. On this example case it would be **sasha** +## Nombre de usuario +En este punto corresponde solamente el nombre del usuario que se utiliza para +ingresar a la cuenta de su entorno ixplorer. En este ejemplo tendríamos por +nombre a la usuaria **sasha** ![](img/credential_3.png) -## How the authentication gadget would look like? - -Finally, to confirm all the steps, the authentication gadget with the -credentials we look for would like this: +## ¿Cómo luciría el gadget de autentificación? +Finalmente, para confirmar todos los pasos, el gadger de autentificación con las +credenciales lucirían como la imagen abajo: ![](img/credential_4.png) diff --git a/vignettes/dictionary.Rmd b/vignettes/dictionary.Rmd index 6accd23..51a04f6 100644 --- a/vignettes/dictionary.Rmd +++ b/vignettes/dictionary.Rmd @@ -1,10 +1,10 @@ --- -title: "ixplorer diccionary" +title: "ixplorer diccionario de términos" author: "ixpantia" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{ixplorer diccionary} + %\VignetteIndexEntry{Dictionary to the ixplorer} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -16,95 +16,100 @@ knitr::opts_chunk$set( ) ``` -## Dictionary purpose +## Propósito del diccionario. -The aim of this dictionary is to provide you with short explanations about the -main components of the ixplorer. This will help you with your everyday project -workflow and communicate better with you Data Science team. +El propósito de este diccionario es proveerlo con explicaciones cortas sobre +los principales componentes del ixplorer. Esto le ayudará con el flujo de +trabajo diario de su proyecto y a comunicar mejor con su equipo de ciencia de +datos. -## What is a project? +## ¿Qué es un proyecto? -A project is your work subject where you try to reach specific goals. Within a -project you can have several repositories up to your needs of organization. +Un proyecto es el lugar de trabajo donde se persiguen metas específicas. Dentro +de un proyecto se pueden tener varios repositorios hasta la cantidad necesaria +para satisfacer a la organización. -A project can be for example a credit risk modelling and under this project you -can have the exploratory_analysis repo, the model repository and the R package -repository to keep code separated but code that it's referred to the same topic. +Un proyecto puede ser por ejemplo un modelo de riesgo crediticio y bajo este +proyecto se puede encontrar el repositorio "analisis_exploratorio", el repositorio +"modelo" y el repositorio "paquete_r", con lo que se mantiene el código separado +de acuerdo a distintas finalidades pero todo referido a un mismo tema de proyecto. -The page of a project would like similar to this one: +La página del proyecto será similar a esta: ![](img/project.png) -## What is a repository? +## ¿Qué es un repositorio? -A repository can be viewed as a folder where you keep all your files. This files -can be share with other team members to start to collaborate on differente tickets. +Un repositorio puede ser visto como un folder donde se mantienen todos los archivos. +Estos archivos pueden ser compartidos con otros miembros del equipo para empezar +a colaborar en diferentes tiquetes que implican acciones. ![](img/repo.png) -There are ways to keep an organized repository either if you are working in a -R package or in a single RStudio project with R files or others. +Hay maneras de mantener un repositorio organizado sea que se está trabajando en +un paquete o en un proyecto de RStudio con archivos R u otros. -Our recommendation is: +Nuestra recomendación es: -- To have a data folder inside your repository where you can put all different -sources of data -- image folder if you need to include images or binaries files. -- The .Rproject should be visible -- The R scripts shouldnot be in a folder and names should be without spaces, -points or combining lower/upper cases. +- Tener una carpeta de datos dentro del repositorio donde se coloquen todas las +fuentes de datos. +- Una carpeta de imágenes donde se incluyan las imágenes o archivos binarios. +- El .Rproject debe de ser visible +- Los scripts de R deben de estar en una carpeta y los nombres deben de ser sin +espacios, puntos o combinando mayúsculas/minúsculas. -## What is upstream? +## ¿Qué es upstream? -Upstream is the standard name that we use to refer to the "central" repository -which is the one that have the functional clean code. From this central repository -everyone in the team have to make a fork from in order to work on their tickets. +Upstream es el nomhbre estandar que usamos para referirnos al repositorio +"central" el cual corresponde al repositorio que contiene código limpio y +funcional. Desde este repositorio central, los miembros en el equipo deberán +de realizar su bifurcación para poder trabajar en sus tiquetes. -## Fork +## Bifurcación -This is a "copy" of the central repository. It's going to be under your user -name. You fork a repository when you want to contribute with code to the -central repository. At the moment when you are ready to offer your improvements, -you do a pull request. In your fork (unless you do a pull request) only your -work is going to affect your forked repository, not the original one. -You have to be aware that all the changes made in the upstream repository -are not going to appear automatically in your fork unless you follow a process -with git to update your project. +Esta es una "copia" del repositorio central. Estará bajo su nombre de usuario. +Usted bifurca un repositorio cuando quiere contribuir con código al repositorio +central. Al momento en que usted está listo para ofrecer sus mejoras, usted hace +una solicitud de fusión. En su bifurcación (a menos de que realice una solicitud +de fusión) únicamente su trabajo afectará su repositorio bifurcado, no el +repositorio central. Se debe de estar atento a que todos los cambios en el +repositorio central no aparecerán de manera automática en su bifircación a menos +de que siga el debido proceso con git para actualizar su repositorio. -## Ticket +## Tiquetes -Tickets are made for document things that need to be donde inside a repository. -Tickets can have differente categories: +Los tiquetes se crean para documentar acciones que necesitan ser realizadas +en un repositorio. Los tiquetes pueden tener diferentes categorías: - - Question: a question related to the topics of the repository. - - New: a new feature that can be achieve in the code. - - Improve: an idea or remark of an improvement that can be done. - - Error: when something in the code it's not working and needs to be resolve. - - Wish: a feature that can be done but it have no priority. + - Pregunta: una pregunta relacionada a los temas del repositorio. + - Nuevo: una nueva característica que puede ser lograda en el código. + - Mejora: una idea u observación que puede ser realizada. + - Error: cuando algo en el código no funciona y necesita ser resuelto. + - Deseo: una característica que puede ser realizada pero no tiene prioridad. -## Milestone +## Hito -A way to organize your project priorities, assigning tikects to each of the -milestone that you define. An example of a milestone can be a release of a package. +Una manera de organizar las prioridades de su proyecto es asignando tiquetes +a cada uno de los hitos que usted define. Un ejemplo de un hito puede ser el +lanzamiento de un paquete. ## Wiki -The place of your repository where you can document, define and keep information -needed to communicate to your team to solve doubts, to get informed about the -project. +El lugar del repositorio donde se puede documentar, definir y mantener información +necesaria para comunicar a su equipo para resolver dudas y mantenerse informado +sobre el proyecto. -## Release +## Lanzamiento -Release is made to establish a release of your code, or what it means: that you -have a due date where all the code it's ready so it has a review, clean and -functional code. +Un lanzamientos está creado para establecer el lanzamiento de su código, lo que +significa: que usted tiene una fecha límite donde el código estará listo, por lo +que estará revisado, limpio y funcional. -All this code that can be an R package is labeled as a release so it marks an -specific point on your git project history. +Todo este código puede ser un paquete de R, estará etiquetado como un lanzamiento, +lo que marca un punto específico en la historia del proyecto. -## Configuration - -On this place you can configure your repository, people who have access, who -can collaborate, write or change code. If you want to eliminate your repository, -change the rights this is the place to go. +## COnfiguración +En este lugar se puede configurar el repositorio, las personas que tienen acceso, +quiénes pueden colaborar, escribir o cambiar código. Si se desea eliminar el +repositorio, cambiar derechos, este es el lugar para hacerlo. diff --git a/vignettes/ixplorer.Rmd b/vignettes/ixplorer.Rmd index b724712..9689e62 100644 --- a/vignettes/ixplorer.Rmd +++ b/vignettes/ixplorer.Rmd @@ -16,129 +16,139 @@ knitr::opts_chunk$set( ) ``` -# ixplorer gadgets +# Gadgets de ixplorer -ixplorer gadgets are a way to create and check your project tickets without -leaving RStudio and more important: without interrupting your workflow. +Los gadgets de ixplorer son una forma de crear y revisar los tiquetes de su +proyecto sin tener de salir de RStudio y más importante aún: sin tener que +interrumpir su flujo de trabajo. -# How to use the ixplorer gadgets +# ¿Cómo usar los gadgets de ixplorer? -First you have to install the ixplorer package: +Primero tenemos que instalar el paquete ixplorer: ```{r, eval = FALSE} devtools::install_github("ixpantia/gitear") ``` -When you are done with the installation, you will see three options under the -IXPLORER header, in the *Addins* menu: +Cuando estamos listos con la instalación podremos ver tres opciones en el +menú de *Addins* bajo el encabezado IXPLORER - - Authenticate - - Create ticket - - Current tickets - - ixplorer dashboard + - Autentificación + - Crear tiquete + - Tiquetes actuales + - Dashboard de ixplorer ![](img/addins.png) -## Authenticate gadget +## Gadget de Autentificación -This is the first step in order to be able to create tickets or check you project -tickets with the ixplorer gadgets. You will need an API key (provided by your -project manager). +Este es el primer paso para poder generar tiquetes o revisarlos dentro de su +repositorio de determinado proyecto. Necesitará un token API. (Que será +proveído por su administración del proyecto.) ![](img/authentication_gadget.png) -At the **ixplorer url** make sure to include the internet address of your -ixplorer repository. It will be similar to: `https://ixplorer_name.ixpantia.com/` - -The next step is to fill the name of the **upstream project**. This is the -project where the source version of the repository resides. From this source -you, and other members of your team, will have *forked* your own clone of this -repository to make changes and propose pull requests. In our workflow we manage -all the tickets centrally in the **upstream project**. Any tickets that you -create in your personal fork will not be visible through the ixplorer gadget -(and in general we recommend not to work with personal tickets). - -At the **ixplorer repository name** please write the name of the specific -repository where we are going to work with in the current RStudio project that -is active. - -Finally you have to speficy your user name in the section **ixplorer user name** -This is the same user name that we use to access to the ixplorer environment. - -There is an **persist token** option. If you are working in your personal -computer, you can select this option. It will keep a copy of all your -authentication data in a local file to reuse it the next time you open the -project in RStudio. Otherwise you will have to authenticate each -time that you are going to work on the same project. - -Be careful because if you are working in somebody else's computer, your -personal authentication data is going to be stored on that machine. If you -are going to work on a shared or public computer, it it best to leave the -**persist token** option without a checkmark. - -#### How the .ixplorer looks like? - -At the end of your authentication through yout authentication gadget, a -resulting ixplorer file with your credentials will look like this: +En el segmento del **URL ixplorer** es necesario asegurarse de incluir la +dirección de internet de su repositorio ixplorer. Deberá de ser similar +a `https://ixplorer_name.ixpantia.com/` + +El siguiente paso es llenar el nombre del **proyecto upstream**. Este es el +proyecto donde la versión fuente de su repositorio reside. Desde ésta fuente, +usted y otros miembros del equipo habrán bifurcado y clonado el repositorio +para generar cambios y proponerlos como solicitudes de fusión. En el flujo de +trabajo, todos los tiquetes se manejan de manera centralizada en el proyecto +**upstream**. Cualquier tiquete que sea generado un su bifurcación personal, no +será visualizado a través del ixplorer gadget (y en general no recomendamos +trabajar con tiquetes personales) + +En el segmento de **nombre del repositorio ixplorer** por favor escriba el +nombre del repositorio en específico sobre el cual desea trabajar en la +sesión activa del proyeto de RStudio. + +Finalmente usted tiene que especificar su nombre de usuario en la sección +**nombre de usuario de ixplorer**. Es el mismo nombre de usuario que se utiliza +para acceder a su entorno ixplorer. + +Existe una opción de **persistencia del token**. Si se encuentra trabajando en +su computadora personal puede elegir esta opción. Esto ayudará a mantener una +copia de sus datos de autentificación en un archivo local que se reutilizará +la siguiente ocasión que abra su proyecto en RStudio. Caso contrario deberá de +repetir el proceso de autentificación cada ocasión que vaya a trabajar en el +mismo proyecto. + +Tener precaución en este paso si se encuentra trabajando sobre la computadora +de alguien más, ya que sus datos de autentificación serán guardado en esa +computadora. Por ende si va a trabajar en la computadora de alguien más o en +una computadora compartida, lo mejor es dejar la opción de +**persistencia del token** sin marcar. + +#### ¿Cómo es el archivo .ixplorer? + +Al final del proceso de autentificación a través del gadget de autentificación, +un archivo .ixplorer quedará como resultado y contendrá las credenciales que se +verán similar a: IXTOKEN= 08864824783ec0b589101191f65e643e54c8ad76c -IXURL= https://ixplorer_name.ixpantia.com/ -IXPROJECT= your_project_name -IXREPO= your_repo_name -IXUSER= your_user_name +IXURL= https://ixplorer_nombre.ixpantia.com/ +IXPROJECT= su_nombre_de_proyecto +IXREPO= su_nombre_de_repositorio +IXUSER= su_nombre_de_usuario -Every time you use the other gadgets, they are going to check this .ixplorer -file and make this credentials part of your session environment variables. +Cada vez que use otros gadgets, se estará revisando este archivo .ixplorer +que hará las credenciales parte de sus variables de ambiente de la sesión. -If you use the function `Sys.getenv()` you are going to be able to see this -credentials with the IX names on it. +Si usted hace uso de la función `Sys.getenv()` será capaz de revisar las +credenciales con los nombres IX identificádolos. -## Create ticket gadget +## Gadget crear un tiquete -At this point you should have all your authentication process done. If that is -correct you will to be able to create a ticket without getting out of RStudio! +A este punto deberá de haber concluido el proceso de autentificación. Si esto +es correcto usted será capaz de crear un tiquete ¡sin tener que salir de RStudio! -If everything is okay, you are just going to see the **ticket title** and -**Description** section. If not, you are going to see a text warning you what -is missing. +Si todo está correcto, usted verá la sección de **título del tiquete** y +**Descripcción**. Sino es así, verá un texto de advertencia mencionando lo que +está faltando. ![](img/create_ticket_gadget.png) -In this gadget you can create a ticket without loosing your workflow and ideas. -If you came up with a new ticket (wish/improvement/question) you can go to -Addins > Create ticket and under the **ticket title** write the title of your -new ticket and under the **Description** section write your idea. +En este gadget usted puede crear un tiquete sin perder su flujo de trabajo o ideas. +Si necesita crear un nuevo tiquete (deseo/mejora/pregunta/error) usted puede ir +a Addins > Crear tiquete y bajo la sección **Titulo del tiquete** puede escribir +el título que identifica el nuevo tiquete y bajo la sección **Descripción** +ingrese la idea del tiquete. -This ticket is going to appear on your ixplorer repository open tickets +Este tiquete aparecerá en su repositorio de ixplorer bajo los tiquetes abiertos. -## Current tickets +## Tiquete actuales -This gadget is designed to give you a quick overview of active tickets and -their status. Also you will find some quick links that will take you to the -ixplorer if you want to check details such as ticket comments or make changes -like due dates of assignments. +Este gadget está diseñado para darle un vistazo rápido de los tiquetes activos +y su estado. Además encontrará los enlaces que lo llevarán al ixplorer si desea +revisar detalles tales como comentarios o hacer cambios a los tiquetes tales +como fechas límites de asignaciones. -At the first tab **My tickets**, you are going to be able to check the tickets -assigned to you with the number id that also is a quick link to the ticket on -your ixplorer environment. Also you will see a column with the number of days -left (on green) or days passed the due date (red). +En la primera pestaña **Mis tiquetes** podrá encontrar los tiquetes asignados a +usted con el número de identificación que también es un enlace al tiquete +en el entorno ixplorer. Así mismo verá la columna con el número de días +que restan (en color verde) o días pasados la fecha límite (en color rojo). ![](img/my_tickets.png) -On the second tab **Team tickets** you will see all open tickets related to the -current (active) project, not just the ones assigned to you. The ID number is a -quick link to the complete ticket on your ixplorer and the Due column is the -days left on green for the due date or red if the due date was missed. +En la segunda pestaña **Tiquete del equipo** podrá revisar todos los tiquetes +abiertos relacionados al proyecto actual y asignados a todos los miembros del +equipo menos a usted. El número de identificación es un enlace a la información +completa del tiquete en el entorno ixplorer y la columna "fecha límite" es +cuántos días restan (en verde) o cuántos días han sido sobrepasados (en rojo) con +respecto a la fecha límite. ![](img/team_tickets.png) -Finally the **Quick links** you have the links to the principal components -of your project repository, so you don't have to type to much in your browser to -find a specific direction. +Finalmente la pestaña de **Enlaces rápidos** tiene los enlaces a los componentes +principales del repositorio del proyecto, así no tendrá que escribir mucho en +su navegdor web para encontrar una dirección en específico. -This quick links will allow you to find faster specific details of your project -repository as closed tickets, milestones, the wiki, or the project place where -all the repositories concerning to the project are. +Estos enlaces le permitirán encontrar de una manera más rápida detalles +específicos del repositorio de su proyecto como tiquetes cerrados, hitos, el +wiki o el sitio del proyecto donde se encuentran otros repositorios concernientes. ![](img/quick_links.png)