Skip to content

Commit b6deebe

Browse files
committed
don't include vignettes in CRAN build
1 parent de9d272 commit b6deebe

File tree

15 files changed

+511
-666
lines changed

15 files changed

+511
-666
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@
2727
^dev$
2828
^doc$
2929
^Meta$
30+
^softwarex-article$
31+
^vignettes$

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ TAGS
1919
/Meta/
2020
.vscode
2121
.cache
22+
softwarex-article
23+

CRAN-SUBMISSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Version: 0.1.0
2-
Date: 2025-10-02 21:42:57 UTC
3-
SHA: 0cda1b3fac94551d261e7ad451d08b6330658d3f
2+
Date: 2025-10-05 22:24:11 UTC
3+
SHA: de9d2726a3a8f06f11950958af81100035ced160

DESCRIPTION

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: cpp4r
2-
Title: A C++ Interface for R's C Interface
2+
Title: Header-Only C++ and R Interface
33
Version: 0.1.0
44
Authors@R: c(
55
person(
@@ -13,11 +13,14 @@ Authors@R: c(
1313
role = "aut",
1414
comment = c("Original cpp11 package"))
1515
)
16-
Description: Provides a header only, C++ interface to R's C
17-
interface. Compared to other approaches 'cpp4r' strives to be safe
18-
against long jumps from the C API as well as C++ exceptions, conform
19-
to normal R function semantics and supports interaction with 'ALTREP'
20-
vectors.
16+
Description: Provides a header only, C++ interface to R's C API with enhancements over 'cpp11'. Enforces copy-on-write
17+
semantics consistent with R's behavior. Offers improved safety when interfacing with R's C API, native support for
18+
ALTREP objects, UTF-8 string handling throughout, modern C++11 features and idioms, and faster compilation with
19+
reduced memory requirements. Avoids Application Binary Interface (ABI) compatibility issues by being header-only and
20+
allows for headers vendoring, making it useful for restricted environments. Compared to 'cpp11', it provides support
21+
for converting C++ maps to R lists, Roxygen documentation directly in C++ code, proper handling of matrix
22+
attributes, support for nullable external pointers, bidirectional copy of complex number types, flexibility in type
23+
conversions, use of nullable pointers, and various performance optimizations.
2124
License: Apache License (>= 2)
2225
URL: https://cpp4r.org, https://github.com/pachadotdev/cpp4r
2326
BugReports: https://github.com/pachadotdev/cpp4r/issues
@@ -33,11 +36,9 @@ Suggests:
3336
desc,
3437
ggplot2,
3538
glue,
36-
knitr,
3739
lobstr,
3840
mockery,
3941
progress,
40-
rmarkdown,
4142
roxygen2,
4243
Rcpp,
4344
scales,
@@ -47,7 +48,6 @@ Suggests:
4748
vctrs,
4849
withr,
4950
tintin
50-
VignetteBuilder: knitr
5151
Config/testthat/edition: 3
5252
Config/Needs/cpp4r/register:
5353
brio,

MAINTENANCE.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

R/unvendor.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#' unlink(dir, recursive = TRUE)
2222
unvendor <- function(path = "./src/vendor") {
2323
# Find the vendoring info file
24-
info_files <- list.files(path, pattern = "00-vendoring-info.txt", recursive = TRUE, full.names = TRUE)
24+
info_files <- list.files(path, pattern = "00-cpp4r-vendoring-info.txt", recursive = TRUE, full.names = TRUE)
2525

2626
if (length(info_files) != 1L) {
2727
if (is_interactive()) { message("Could not find vendored headers") }

R/vendor.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ vendor <- function(path = "./src/vendor") {
6363
cpp4r_version,
6464
Sys.Date()
6565
),
66-
file.path(path2, "00-vendoring-info.txt")
66+
file.path(path2, "00-cpp4r-vendoring-info.txt")
6767
)
6868

6969
file.copy(

cran-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This is a release with no expected breakage of any reverse dependencies.
1+
This is a new package submission.

dev/benchmark.R

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
library(cpp11test)
2+
library(cpp4rtest)
3+
4+
cases <- expand.grid(
5+
len = 1e7,
6+
vector = c("normal", "altrep"),
7+
method = c("for", "foreach", "accumulate"),
8+
pkg = c("cpp4r", "Rcpp"),
9+
stringsAsFactors = FALSE
10+
)
11+
12+
# Add special case
13+
cases <- rbind(list(len = 1e7, vector = "normal", method = "for2", pkg = "cpp4r"), cases)
14+
15+
b_sum <- bench::press(
16+
.grid = cases,
17+
{
18+
seq_real <- function(x) as.numeric(seq_len(x))
19+
funs <- c("normal" = rnorm, "altrep" = seq_real)
20+
x <- funs[[vector]](len)
21+
fun <- match.fun(sprintf("%ssum_dbl_%s_", ifelse(pkg == "cpp4r", "", paste0(pkg, "_")), method))
22+
bench::mark(
23+
fun(x)
24+
)
25+
}
26+
)[c("pkg", "method", "vector", "median", "mem_alloc")]
27+
28+
saveRDS(b_sum, "sum.Rds", version = 2)
29+
30+
grid <- expand.grid(len = seq(10000, 50000, by = 10000), pkg = c("cpp4r", "cpp11", "Rcpp"), stringsAsFactors = FALSE)
31+
b_release <- bench::press(.grid = grid, {
32+
fun <- match.fun(sprintf("%s_release_", pkg))
33+
bench::mark(
34+
fun(len),
35+
min_iterations = 100
36+
)
37+
})[c("len", "pkg", "median")]
38+
39+
saveRDS(b_release, "release.Rds", version = 2)

dev/build-vignettes.R

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)