diff --git a/.github/workflows/r_docs.yml b/.github/workflows/r_docs.yml new file mode 100644 index 00000000000..37d6192932e --- /dev/null +++ b/.github/workflows/r_docs.yml @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: R documentation + +on: + push: + paths: + - '.github/workflows/r_docs.yml' + - 'r/R/*.R' + branches-ignore: + - master + +jobs: + roxygen: + name: Build and Push + runs-on: ubuntu-latest + if: github.repository != 'apache/arrow' + steps: + - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v1 + - name: Install dependencies + run: Rscript -e 'source("ci/etc/rprofile"); install.packages(c("remotes", "roxygen2")); remotes::install_deps("r")' + - name: Render docs + run: Rscript -e 'roxygen2::roxygenize("r")' + - name: Commit results + run: | + git config user.name "$(git log -1 --pretty=format:%an)" + git config user.email "$(git log -1 --pretty=format:%ae)" + git commit -a -m 'Update docs [automated commit]' || echo "No changes to commit" + git push origin ${{ github.ref }} || echo "No changes to commit" diff --git a/r/R/message.R b/r/R/message.R index 51e0f965e27..82b6e2b95d5 100644 --- a/r/R/message.R +++ b/r/R/message.R @@ -17,7 +17,7 @@ #' @include arrow-package.R -#' @title class arrow::Message +#' @title Message #' #' @usage NULL #' @format NULL @@ -25,7 +25,13 @@ #' #' @section Methods: #' -#' TODO +#' * `$Equals(other)`: Test for equality +#' * `$body_length()`: +#' * `$Verify()`: +#' @section Active bindings: +#' * `$type`: +#' * `$metadata`: +#' * `$body`: #' #' @rdname Message #' @name Message @@ -74,7 +80,7 @@ MessageReader$create <- function(stream) { #' Read a Message from a stream #' #' @param stream an InputStream -#' +#' @return A [Message] #' @export read_message <- function(stream) { UseMethod("read_message") diff --git a/r/man/Message.Rd b/r/man/Message.Rd index 84dd90a6459..4e3909ed27d 100644 --- a/r/man/Message.Rd +++ b/r/man/Message.Rd @@ -3,13 +3,25 @@ \docType{class} \name{Message} \alias{Message} -\title{class arrow::Message} +\title{Message} \description{ -class arrow::Message +Message } \section{Methods}{ +\itemize{ +\item \verb{$Equals(other)}: Test for equality +\item \verb{$body_length()}: +\item \verb{$Verify()}: +} +} -TODO +\section{Active bindings}{ + +\itemize{ +\item \verb{$type}: +\item \verb{$metadata}: +\item \verb{$body}: +} } diff --git a/r/man/read_message.Rd b/r/man/read_message.Rd index 444c76c862f..7339dba3a34 100644 --- a/r/man/read_message.Rd +++ b/r/man/read_message.Rd @@ -9,6 +9,9 @@ read_message(stream) \arguments{ \item{stream}{an InputStream} } +\value{ +A \link{Message} +} \description{ Read a Message from a stream }