Skip to content

Commit

Permalink
Merge branch 'main' into rc/0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 authored Feb 19, 2024
2 parents 9e41661 + d3dfcfe commit 084e818
Show file tree
Hide file tree
Showing 76 changed files with 8,882 additions and 788 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,27 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}

- {os: windows-latest, r: 'release'}

# Use older ubuntu to maximise backward compatibility
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-18.04, r: 'release'}
- {os: ubuntu-18.04, r: 'oldrel-1'}
- {os: ubuntu-18.04, r: 'oldrel-2'}
#- {os: ubuntu-18.04, r: 'oldrel-3'}
#- {os: ubuntu-18.04, r: 'oldrel-4'}
# Use 3.6 to trigger usage of RTools35
- {os: windows-latest, r: '3.6'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,7 +41,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected].4
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -27,5 +27,24 @@ jobs:
needs: coverage

- name: Test coverage
run: covr::codecov(quiet = FALSE)
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
12 changes: 6 additions & 6 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.2
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,18 +40,17 @@ Imports:
cli,
vctrs,
systemfonts
LinkingTo: Rcpp, RcppEigen
RoxygenNote: 7.3.1
LinkingTo:
cpp11
Suggests:
sessioninfo,
concaveman,
deldir,
latex2exp,
reshape2,
units (>= 0.4-6),
units (>= 0.8.0),
covr
Collate:
'RcppExports.R'
'aaa.R'
'shape.R'
'arc_bar.R'
Expand All @@ -64,6 +62,8 @@ Collate:
'bspline.R'
'bspline_closed.R'
'circle.R'
'concaveman.R'
'cpp11.R'
'diagonal.R'
'diagonal_wide.R'
'ellipse.R'
Expand Down
53 changes: 53 additions & 0 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
--------------------------------------------------------------------------------
The concaveman.h file is redistributed with the following license

BSD 2-Clause License

Copyright (c) 2019, sadaszewski
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
The robust-predicates code used in concaveman is redistributed with the
following license

`Robust-Predicate` is licensed under the following terms:

This program may be freely redistributed under the condition that the copyright
notices (including this entire header) are not removed, and no compensation is
received through use of the software. Private, research, and institutional use
is free. You may distribute modified versions of this code `UNDER THE CONDITION
THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER
COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY
AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS`.
Distribution of this code as part of a commercial system is permissible `ONLY BY
DIRECT ARRANGEMENT WITH THE AUTHOR`. (If you are not directly supplying this
code to a customer, and you are instead telling them how they can obtain it for
free, then you are not required to make any arrangement with me.)

`DISCLAIMER`: Neither I nor: Columbia University, the Massachusetts Institute of
Technology, the University of Sydney, nor the National Aeronautics and Space
Administration warrant this code in any way whatsoever. This code is provided
"as-is" to be used at your own risk.

--------------------------------------------------------------------------------
7 changes: 4 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ S3method(makeContent,ellip_enc)
S3method(makeContent,hull_enc)
S3method(makeContent,rect_enc)
S3method(makeContent,shape)
S3method(single_val,default)
S3method(single_val,factor)
S3method(single_value,default)
S3method(single_value,factor)
S3method(widthDetails,mark_label)
export(FacetCol)
export(FacetGridPaginate)
Expand Down Expand Up @@ -127,6 +127,7 @@ export(scale_depth_continuous)
export(scale_depth_discrete)
export(scale_x_unit)
export(scale_y_unit)
export(shapeGrob)
export(stat_arc)
export(stat_arc0)
export(stat_arc2)
Expand Down Expand Up @@ -160,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 @@ -240,3 +240,4 @@ importFrom(tweenr,tween_t)
importFrom(utils,packageVersion)
importFrom(withr,with_seed)
useDynLib(ggforce)
useDynLib(ggforce, .registration = TRUE)
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# 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)
* Setting both label and description to `NA` will now turn off label drawing for
that mark completely while still drawing the mark
* Fix a bug in `geom_mark_rect()` where the mark would not be shown in all
panels (#307)
* Fixed a bug in the `geom_mark_*()` geoms where having `NA` values in the
`filter` aesthetic would lead to weird errors. `NA` is now treated as `FALSE`
(#306)
* `shapeGrob()` is now exported for use by other packages (#303)
* Fix a bug in `geom_autohistogram()` that prevented it to be used with
continuous data (#297)
* `facet_zoom()` now throws a better error when used with `coord_flip()` (#143)
* You can now use `"inherit"`, `"inherit_fill"`, and `"inherit_col"` for the
styling of the label box and connector in the `geom_mark_*()` family of geoms
(#240)

# ggforce 0.4.2

* Fix a documentation issue reported by CRAN
Expand Down
31 changes: 0 additions & 31 deletions R/RcppExports.R

This file was deleted.

12 changes: 12 additions & 0 deletions R/aaa.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@ combine_aes <- function(aes1, aes2) {
empty_data <- function(x) {
length(x) == 0 || nrow(x) == 0
}

# This function is like base::make.unique, but it
# maintains the ordering of the original names if the values
# are sorted.
make_unique <- function(x, sep = '.') {
if (!anyDuplicated(x)) return(x)
groups <- match(x, unique(x))
suffix <- unsplit(lapply(split(x, groups), seq_along), groups)
max_chars <- nchar(max(suffix))
suffix_format <- paste0('%0', max_chars, 'd')
paste0(x, sep, sprintf(suffix_format, suffix))
}
12 changes: 6 additions & 6 deletions R/arc.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ stat_arc <- function(mapping = NULL, data = NULL, geom = 'arc',
layer(
stat = StatArc, data = data, mapping = mapping, geom = geom,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, n = n, ...)
params = list2(na.rm = na.rm, n = n, ...)
)
}
#' @rdname ggforce-extensions
Expand All @@ -126,7 +126,7 @@ geom_arc <- function(mapping = NULL, data = NULL, stat = 'arc',
layer(
data = data, mapping = mapping, stat = stat, geom = GeomArc,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(arrow = arrow, n = n, lineend = lineend, na.rm = na.rm, ...)
params = list2(arrow = arrow, n = n, lineend = lineend, na.rm = na.rm, ...)
)
}
#' @rdname ggforce-extensions
Expand All @@ -148,7 +148,7 @@ stat_arc2 <- function(mapping = NULL, data = NULL, geom = 'path_interpolate',
layer(
stat = StatArc2, data = data, mapping = mapping, geom = geom,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, n = n, ...)
params = list2(na.rm = na.rm, n = n, ...)
)
}
#' @rdname geom_arc
Expand All @@ -160,7 +160,7 @@ geom_arc2 <- function(mapping = NULL, data = NULL, stat = 'arc2',
layer(
data = data, mapping = mapping, stat = stat, geom = GeomPathInterpolate,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(arrow = arrow, n = n, lineend = lineend, na.rm = na.rm, ...)
params = list2(arrow = arrow, n = n, lineend = lineend, na.rm = na.rm, ...)
)
}
#' @rdname ggforce-extensions
Expand Down Expand Up @@ -189,7 +189,7 @@ stat_arc0 <- function(mapping = NULL, data = NULL, geom = 'arc0',
layer(
stat = StatArc0, data = data, mapping = mapping, geom = geom,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, ...)
params = list2(na.rm = na.rm, ...)
)
}
#' @rdname ggforce-extensions
Expand Down Expand Up @@ -235,7 +235,7 @@ geom_arc0 <- function(mapping = NULL, data = NULL, stat = 'arc0',
layer(
data = data, mapping = mapping, stat = stat, geom = GeomArc0,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(
params = list2(
arrow = arrow, ncp = ncp, lineend = lineend, na.rm = na.rm,
...
)
Expand Down
Loading

0 comments on commit 084e818

Please sign in to comment.