From 208eb6e9f3870ab8e64e07b9d23491562a96a6c5 Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 16 Aug 2023 11:17:09 -0400 Subject: [PATCH 1/4] Fix Class docs --- R/chromote.R | 2 ++ man/Chromote.Rd | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/R/chromote.R b/R/chromote.R index cbc19e4..54cf0f4 100644 --- a/R/chromote.R +++ b/R/chromote.R @@ -1,7 +1,9 @@ #' Chromote class #' +#' @description #' This class represents the browser as a whole. #' +#' @details #' A `Chromote` object represents the browser as a whole, and it can have #' multiple _targets_, which each represent a browser tab. In the Chrome #' DevTools Protocol, each target can have one or more debugging _sessions_ to diff --git a/man/Chromote.Rd b/man/Chromote.Rd index 9594cdc..db7b868 100644 --- a/man/Chromote.Rd +++ b/man/Chromote.Rd @@ -4,13 +4,9 @@ \alias{Chromote} \title{Chromote class} \description{ -Chromote class - -Chromote class +This class represents the browser as a whole. } \details{ -This class represents the browser as a whole. - A \code{Chromote} object represents the browser as a whole, and it can have multiple \emph{targets}, which each represent a browser tab. In the Chrome DevTools Protocol, each target can have one or more debugging \emph{sessions} to From a6ffce0fc44a2594e194cd14b6ded6562e6957bb Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 16 Aug 2023 11:26:32 -0400 Subject: [PATCH 2/4] Adjust docs for other R6 classes. --- R/browser.R | 2 ++ R/chrome.R | 4 +++- R/chromote_session.R | 4 ++++ man/Browser.Rd | 8 ++------ man/Chrome.Rd | 5 ----- man/ChromeRemote.Rd | 2 -- man/ChromoteSession.Rd | 2 -- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/R/browser.R b/R/browser.R index c6a793c..a32a1c9 100644 --- a/R/browser.R +++ b/R/browser.R @@ -2,10 +2,12 @@ globals <- new.env() #' Browser base class #' +#' @description #' Base class for browsers like Chrome, Chromium, etc. Defines the interface #' used by various browser implementations. It can represent a local browser #' process or one running remotely. #' +#' @details #' The \code{initialize()} method of an implementation should set private$host #' and private$port. If the process is local, the \code{initialize()} method #' should also set private$process. diff --git a/R/chrome.R b/R/chrome.R index f7a82fa..b7643a2 100644 --- a/R/chrome.R +++ b/R/chrome.R @@ -1,5 +1,6 @@ #' Local Chrome process #' +#' @description #' This is a subclass of [`Browser`] that represents a local browser. It extends #' the [`Browser`] class with a [`processx::process`] object, which represents #' the browser's system process. @@ -231,7 +232,8 @@ launch_chrome_impl <- function(path, args, port) { #' Remote Chrome process #' -#' +#' @description +#' Remote Chrome process #' #' @export ChromeRemote <- R6Class("ChromeRemote", diff --git a/R/chromote_session.R b/R/chromote_session.R index 4a06da3..05ec145 100644 --- a/R/chromote_session.R +++ b/R/chromote_session.R @@ -4,6 +4,10 @@ # can have more than one session connected to it. #' ChromoteSession class +#' +#' @description +#' ChromoteSession class +#' #' @export #' @param timeout_ Number of seconds for \pkg{chromote} to wait for a Chrome #' DevTools Protocol response. If `timeout_` is [`rlang::missing_arg()`] and diff --git a/man/Browser.Rd b/man/Browser.Rd index 2354fbb..1f6338c 100644 --- a/man/Browser.Rd +++ b/man/Browser.Rd @@ -4,15 +4,11 @@ \alias{Browser} \title{Browser base class} \description{ -Browser base class - -Browser base class -} -\details{ Base class for browsers like Chrome, Chromium, etc. Defines the interface used by various browser implementations. It can represent a local browser process or one running remotely. - +} +\details{ The \code{initialize()} method of an implementation should set private$host and private$port. If the process is local, the \code{initialize()} method should also set private$process. diff --git a/man/Chrome.Rd b/man/Chrome.Rd index dc312b4..f3a5180 100644 --- a/man/Chrome.Rd +++ b/man/Chrome.Rd @@ -4,11 +4,6 @@ \alias{Chrome} \title{Local Chrome process} \description{ -Local Chrome process - -Local Chrome process -} -\details{ This is a subclass of \code{\link{Browser}} that represents a local browser. It extends the \code{\link{Browser}} class with a \code{\link[processx:process]{processx::process}} object, which represents the browser's system process. diff --git a/man/ChromeRemote.Rd b/man/ChromeRemote.Rd index 683ca01..0d5cc49 100644 --- a/man/ChromeRemote.Rd +++ b/man/ChromeRemote.Rd @@ -4,8 +4,6 @@ \alias{ChromeRemote} \title{Remote Chrome process} \description{ -Remote Chrome process - Remote Chrome process } \section{Super class}{ diff --git a/man/ChromoteSession.Rd b/man/ChromoteSession.Rd index 41cdb06..5a5bce9 100644 --- a/man/ChromoteSession.Rd +++ b/man/ChromoteSession.Rd @@ -4,8 +4,6 @@ \alias{ChromoteSession} \title{ChromoteSession class} \description{ -ChromoteSession class - ChromoteSession class } \section{Public fields}{ From 186ea897f262f25691de3e95d27fe8460ee52058 Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Wed, 31 Jan 2024 08:19:50 -0500 Subject: [PATCH 3/4] Update R/chromote.R --- R/chromote.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/R/chromote.R b/R/chromote.R index ab18b03..6f6633f 100644 --- a/R/chromote.R +++ b/R/chromote.R @@ -1,9 +1,6 @@ #' Chromote class #' #' @description -#' This class represents the browser as a whole. -#' -#' @details #' A `Chromote` object represents the browser as a whole, and it can have #' multiple _targets_, which each represent a browser tab. In the Chrome #' DevTools Protocol, each target can have one or more debugging _sessions_ to From 6d35cc885b8d808751b18c15c650896e42e5614b Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 31 Jan 2024 07:28:42 -0600 Subject: [PATCH 4/4] Re-document --- man/Chromote.Rd | 3 --- 1 file changed, 3 deletions(-) diff --git a/man/Chromote.Rd b/man/Chromote.Rd index db7b868..861be18 100644 --- a/man/Chromote.Rd +++ b/man/Chromote.Rd @@ -4,9 +4,6 @@ \alias{Chromote} \title{Chromote class} \description{ -This class represents the browser as a whole. -} -\details{ A \code{Chromote} object represents the browser as a whole, and it can have multiple \emph{targets}, which each represent a browser tab. In the Chrome DevTools Protocol, each target can have one or more debugging \emph{sessions} to