From noreply at r-forge.r-project.org Sat Feb 22 00:30:58 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 22 Feb 2014 00:30:58 +0100 (CET) Subject: [Rprotobuf-commits] r869 - in pkg: . inst/unitTests Message-ID: <20140221233058.311F7186B83@r-forge.r-project.org> Author: murray Date: 2014-02-22 00:30:57 +0100 (Sat, 22 Feb 2014) New Revision: 869 Modified: pkg/ChangeLog pkg/inst/unitTests/runit.messages.R Log: Add a unit test for the deprecated groups feature which works fine with RProtoBuf. Modified: pkg/ChangeLog =================================================================== --- pkg/ChangeLog 2014-01-29 01:18:04 UTC (rev 868) +++ pkg/ChangeLog 2014-02-21 23:30:57 UTC (rev 869) @@ -1,3 +1,9 @@ +2014-02-21 Murray Stokely + + * inst/unitTests/runit.messages.R (test.message): Add a test for + the deprecated group feature which works fine with RProtoBuf. + The type is converted to lower case, which users often forget. + 2014-01-19 Dirk Eddelbuettel * DESCRIPTION: Finalize release 0.4.0 with initial Windows support Modified: pkg/inst/unitTests/runit.messages.R =================================================================== --- pkg/inst/unitTests/runit.messages.R 2014-01-29 01:18:04 UTC (rev 868) +++ pkg/inst/unitTests/runit.messages.R 2014-02-21 23:30:57 UTC (rev 869) @@ -23,6 +23,9 @@ readProtoFiles(file=unittest.proto.file) } a <- new(protobuf_unittest.TestAllTypes) + a$optionalgroup$a <- 3 + checkEquals(a$optionalgroup$a, 3) + a$repeated_nested_message <- list( new(protobuf_unittest.TestAllTypes.NestedMessage, bb=3), new(protobuf_unittest.TestAllTypes.NestedMessage, bb=4)) @@ -39,7 +42,7 @@ checkException(a$repeated_nested_message <- list( new(protobuf_unittest.TestAllTypes.NestedMessage, bb=4), - 3)) + 3)) checkException(a$repeated_nested_message <- list( new(protobuf_unittest.TestAllTypes.NestedMessage, bb=4), From noreply at r-forge.r-project.org Sat Feb 22 00:51:21 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 22 Feb 2014 00:51:21 +0100 (CET) Subject: [Rprotobuf-commits] r870 - in pkg: . vignettes Message-ID: <20140221235122.10759186CBF@r-forge.r-project.org> Author: murray Date: 2014-02-22 00:51:21 +0100 (Sat, 22 Feb 2014) New Revision: 870 Modified: pkg/ChangeLog pkg/vignettes/RProtoBuf-intro.Rnw Log: Add a subsection documenting protocol buffer groups. Modified: pkg/ChangeLog =================================================================== --- pkg/ChangeLog 2014-02-21 23:30:57 UTC (rev 869) +++ pkg/ChangeLog 2014-02-21 23:51:21 UTC (rev 870) @@ -3,6 +3,8 @@ * inst/unitTests/runit.messages.R (test.message): Add a test for the deprecated group feature which works fine with RProtoBuf. The type is converted to lower case, which users often forget. + * vignettes/RProtoBuf-intro.Rnw (subsection{Deprecated Feature: + Protocol Buffer Groups}): document groups. 2014-01-19 Dirk Eddelbuettel Modified: pkg/vignettes/RProtoBuf-intro.Rnw =================================================================== --- pkg/vignettes/RProtoBuf-intro.Rnw 2014-02-21 23:30:57 UTC (rev 869) +++ pkg/vignettes/RProtoBuf-intro.Rnw 2014-02-21 23:51:21 UTC (rev 870) @@ -2151,6 +2151,34 @@ options("RProtoBuf.int64AsString" = FALSE) @ +\subsection{Deprecated Feature: Protocol Buffer Groups} +\label{sec:groups} + +Groups are a deprecated feature that offered another way to nest +information in message definitions. For example, the +\texttt{TestAllTypes} message type in \texttt{unittest.proto} includes +an OptionalGroup type: + +\begin{verbatim} + optional group OptionalGroup = 16 { + optional int32 a = 17; + } +\end{verbatim} + +And although the feature is deprecated, it can be used with RProtoBuf: + +<>= +test <- new(protobuf_unittest.TestAllTypes) +test$optionalgroup$a <- 3 +test$optionalgroup$a +cat(as.character(test)) +@ + +Note that groups simply combine a nested message type and a field into +a single declaration. The field type is OptionalGroup in this +example, and the field name is converted to lower-case 'optionalgroup' +so as not to conflict with the type name. + \section{Other approaches} Saptarshi Guha wrote another package that deals with integration From noreply at r-forge.r-project.org Sat Feb 22 01:24:18 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 22 Feb 2014 01:24:18 +0100 (CET) Subject: [Rprotobuf-commits] r871 - in pkg: . inst Message-ID: <20140222002418.8C4F31868B2@r-forge.r-project.org> Author: murray Date: 2014-02-22 01:24:18 +0100 (Sat, 22 Feb 2014) New Revision: 871 Added: pkg/inst/CITATION Modified: pkg/ChangeLog pkg/DESCRIPTION Log: Add a CITATION file pointing to our JSS preprint on arxiv.org in addition to the normal auto-generated R package citation(). Also add a link to the arxiv.org paper in the DESCRIPTION file. Modified: pkg/ChangeLog =================================================================== --- pkg/ChangeLog 2014-02-21 23:51:21 UTC (rev 870) +++ pkg/ChangeLog 2014-02-22 00:24:18 UTC (rev 871) @@ -5,6 +5,9 @@ The type is converted to lower case, which users often forget. * vignettes/RProtoBuf-intro.Rnw (subsection{Deprecated Feature: Protocol Buffer Groups}): document groups. + * inst/CITATION: Add a manual CITATION file pointing to the JSS + preprint on arxiv.org in addition to the normal auto-generated + citation(). 2014-01-19 Dirk Eddelbuettel Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2014-02-21 23:51:21 UTC (rev 870) +++ pkg/DESCRIPTION 2014-02-22 00:24:18 UTC (rev 871) @@ -6,7 +6,10 @@ Title: R Interface to the Protocol Buffers API Description: Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all - of its internal RPC protocols and file formats. + of its internal RPC protocols and file formats. Additional + documentation is available in the arXiv.org preprint "RProtoBuf: + Efficient Cross-Language Data Serialization in R" by Eddelbuettel, + Stokely, and Ooms (2014) http://arxiv.org/abs/1401.7372 Depends: R (>= 3.0.0), methods Imports: utils, stats, tools, Rcpp, RCurl LinkingTo: Rcpp @@ -15,5 +18,5 @@ SystemRequirements: Protocol Buffer compiler (to create C++ header and source files from .proto descriptions) and library (version 2.2.0 or later) License: GPL-2 -URL: http://r-forge.r-project.org/projects/rprotobuf/, http://romainfrancois.blog.free.fr/index.php?category/R-package/RProtoBuf, http://dirk.eddelbuettel.com/blog/code/rprotobuf/ +URL: http://r-forge.r-project.org/projects/rprotobuf/, http://romainfrancois.blog.free.fr/index.php?category/R-package/RProtoBuf, http://dirk.eddelbuettel.com/blog/code/rprotobuf/, http://arxiv.org/abs/1401.7372 BugReports: http://r-forge.r-project.org/tracker/index.php?group_id=576&atid=2338 Added: pkg/inst/CITATION =================================================================== --- pkg/inst/CITATION (rev 0) +++ pkg/inst/CITATION 2014-02-22 00:24:18 UTC (rev 871) @@ -0,0 +1,19 @@ +citHeader("To cite RProtoBuf in publications use:") + +# Preprint of our JSS submission +citEntry(entry = "Article", + title = "{RProtoBuf}: Efficient Cross-Language Data Serialization in {R}", + author = personList(as.person("Dirk Eddelbuettel"), + as.person("Murray Stokely"), as.person("Jeroen Ooms")), + journal = "arXiv preprint arXiv:1401.7372", + year = "2014", + url = "http://arxiv.org/abs/1401.7372", + textVersion = + paste("Dirk Eddelbuettel, Murray Stokely, and Jeroen Ooms (2014).", + "RProtoBuf: Efficient Cross-Language Data Serialization in R.", + "arXiv preprint, arXiv:1401.7372", + "URL http://arxiv.org/abs/1401.7372") +) + +# Also include the normal auto-generated RProtoBuf citation() +citation(auto=meta)