Skip to content

Commit

Permalink
Move from Rcpp+RcppEigen to cpp11 (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 authored Feb 1, 2024
1 parent f1cbb31 commit d3dfcfe
Show file tree
Hide file tree
Showing 21 changed files with 541 additions and 519 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ggforce
Type: Package
Title: Accelerating 'ggplot2'
Version: 0.4.1.9000
Version: 0.5.0
Authors@R:
c(person(given = "Thomas Lin",
family = "Pedersen",
Expand All @@ -24,7 +24,6 @@ Depends:
ggplot2 (>= 3.3.6),
R (>= 3.3.0)
Imports:
Rcpp (>= 0.12.2),
grid,
scales,
MASS,
Expand All @@ -41,7 +40,8 @@ Imports:
cli,
vctrs,
systemfonts
LinkingTo: Rcpp, RcppEigen
LinkingTo:
cpp11
RoxygenNote: 7.2.3
Suggests:
sessioninfo,
Expand All @@ -51,7 +51,6 @@ Suggests:
units (>= 0.8.0),
covr
Collate:
'RcppExports.R'
'aaa.R'
'shape.R'
'arc_bar.R'
Expand All @@ -64,6 +63,7 @@ Collate:
'bspline_closed.R'
'circle.R'
'concaveman.R'
'cpp11.R'
'diagonal.R'
'diagonal_wide.R'
'ellipse.R'
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ import(ggplot2)
import(rlang)
import(vctrs)
importFrom(MASS,fractions)
importFrom(Rcpp,sourceCpp)
importFrom(ggplot2,label_parsed)
importFrom(ggplot2,layer)
importFrom(grDevices,chull)
Expand Down Expand Up @@ -241,3 +240,4 @@ importFrom(tweenr,tween_t)
importFrom(utils,packageVersion)
importFrom(withr,with_seed)
useDynLib(ggforce)
useDynLib(ggforce, .registration = TRUE)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ggforce (development version)
# ggforce 0.5.0

* Fixed a bug that would cause reordering of data in some geoms (#314)
* The concaveman package is no longer a dependency for `geom_mark_hull()` (#308)
Expand Down
35 changes: 0 additions & 35 deletions R/RcppExports.R

This file was deleted.

33 changes: 33 additions & 0 deletions R/cpp11.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by cpp11: do not edit by hand

splinePath <- function(x, y, degree, knots, detail, type) {
.Call(`_ggforce_splinePath`, x, y, degree, knots, detail, type)
}

getSplines <- function(x, y, id, detail, type) {
.Call(`_ggforce_getSplines`, x, y, id, detail, type)
}

bezierPath <- function(x, y, detail) {
.Call(`_ggforce_bezierPath`, x, y, detail)
}

getBeziers <- function(x, y, id, detail) {
.Call(`_ggforce_getBeziers`, x, y, id, detail)
}

concaveman_c <- function(p, h, concavity, threshold) {
.Call(`_ggforce_concaveman_c`, p, h, concavity, threshold)
}

enclose_ellip_points <- function(x, y, id, tol) {
.Call(`_ggforce_enclose_ellip_points`, x, y, id, tol)
}

enclose_points <- function(x, y, id) {
.Call(`_ggforce_enclose_points`, x, y, id)
}

points_to_path <- function(pos, path, close) {
.Call(`_ggforce_points_to_path`, pos, path, close)
}
4 changes: 2 additions & 2 deletions R/ggforce-package.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#' @useDynLib ggforce
#' @import ggplot2
#' @importFrom Rcpp sourceCpp
#'
#' @examples
#' rocketData <- data.frame(
Expand Down Expand Up @@ -57,8 +56,9 @@
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecated
#' @import rlang
#' @import vctrs
#' @importFrom lifecycle deprecated
#' @useDynLib ggforce, .registration = TRUE
## usethis namespace: end
NULL
11 changes: 10 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Quick release to address the sanitizer issues reported by CRAN
Bigger patch release addressing a range of bugs, as well as removing the
concaveman, Rcpp, and RcppEigen dependency in favor of cpp11

## revdepcheck results

We checked 82 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

Binary file modified man/figures/README-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
# Revdeps

## Failed to check (1)

|package |version |error |warning |note |
|:-------|:-------|:-----|:-------|:----|
|NA |? | | | |

## New problems (1)

|package |version |error |warning |note |
|:----------------------------|:-------|:-----|:-------|:----|
|[cubble](problems.md#cubble) |0.1.1 | |__+1__ | |

12 changes: 2 additions & 10 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
## revdepcheck results

We checked 66 reverse dependencies (65 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 82 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 1 new problems
* We saw 0 new problems
* We failed to check 0 packages

Issues with CRAN packages are summarised below.

### New problems
(This reports the first line of each new failure)

* cubble
checking re-building of vignette outputs ... WARNING

36 changes: 1 addition & 35 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -1,35 +1 @@
# NA

<details>

* Version: NA
* GitHub: NA
* Source code: https://github.com/cran/NA
* Number of recursive dependencies: 0

Run `cloud_details(, "NA")` for more info

</details>

## Error before installation

### Devel

```
```
### CRAN

```
```
*Wow, no problems at all. :)*
42 changes: 1 addition & 41 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -1,41 +1 @@
# cubble

<details>

* Version: 0.1.1
* GitHub: https://github.com/huizezhang-sherry/cubble
* Source code: https://github.com/cran/cubble
* Date/Publication: 2022-06-02 12:30:06 UTC
* Number of recursive dependencies: 136

Run `cloud_details(, "cubble")` for more info

</details>

## Newly broken

* checking re-building of vignette outputs ... WARNING
```
Error(s) in re-building vignettes:
--- re-building ‘aggregation.Rmd’ using rmarkdown
`summarise()` has grouped output by 'id'. You can override using the `.groups`
argument.
`summarise()` has grouped output by 'cluster', 'id'. You can override using the
`.groups` argument.
`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
Adding missing grouping variables: `id`
Quitting from lines 123-131 (aggregation.Rmd)
Error: processing vignette 'aggregation.Rmd' failed with diagnostics:
...
The key variable is named differently in the two datasets. Coerce the key to id
to bind them together.
Only bind the common variables from both datasets.
--- finished re-building ‘matching.Rmd’
SUMMARY: processing the following file failed:
‘aggregation.Rmd’
Error: Vignette re-building failed.
Execution halted
```

*Wow, no problems at all. :)*
Loading

0 comments on commit d3dfcfe

Please sign in to comment.