Skip to content

Commit

Permalink
Merge branch 'main' into angle_heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Aug 28, 2024
2 parents 8396b5f + 7ce155b commit 6b59c18
Show file tree
Hide file tree
Showing 255 changed files with 8,233 additions and 8,219 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -25,15 +27,15 @@ jobs:
- {os: macos-latest, r: 'release'}

- {os: windows-latest, r: 'release'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}
# use 4.0 or 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: 'oldrel-4'}

- {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'}
- {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 }}
Expand All @@ -46,7 +48,7 @@ jobs:
VDIFFR_LOG_PATH: "../vdiffr.Rout.fail"

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

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

Expand All @@ -62,9 +64,10 @@ jobs:
extra-packages: >
any::rcmdcheck,
Hmisc=?ignore-before-r=4.1.0,
quantreg=?ignore-before-r=4.3.0,
quantreg=?ignore-before-r=4.3.0
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
10 changes: 7 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -19,8 +21,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@v3
- uses: actions/checkout@v4

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

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

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

jobs:
document:
Expand All @@ -13,8 +15,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down Expand Up @@ -50,8 +54,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +17,45 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

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

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

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

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
13 changes: 4 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,19 @@ Each of these steps are described in more detail below. This might feel
overwhelming the first time you get set up, but it gets easier with practice.
If you get stuck at any point, please reach out for help on the [ggplot2-dev](https://groups.google.com/forum/#!forum/ggplot2-dev) mailing list.

If you're not familiar with git or github, please start by reading <http://r-pkgs.had.co.nz/git.html>
If you're not familiar with git or github, please start by reading <https://r-pkgs.org/software-development-practices.html>

<!--
* [ ] Motivate the change in one paragraph, and include it in NEWS.
In parentheses, reference your github user name and this issue:
`(@hadley, #1234)`
* [ ] Check pull request only includes relevant changes.
* [ ] Use the [official style](http://adv-r.had.co.nz/Style.html).
* [ ] Use the [official style](https://style.tidyverse.org).
* [ ] Update documentation and re-run roxygen2
* [ ] Add test, if bug in non-graphical function
* [ ] Add visual test, if bug in graphical function
* [ ] Add minimal example, if new graphical feature
See http://docs.ggplot2.org/dev/vignettes/development.html for more details.
--->

Pull requests will be evaluated against a seven point checklist:
Expand All @@ -100,20 +99,16 @@ Pull requests will be evaluated against a seven point checklist:
and don't submit any others until the first one has been processed.

1. __Use ggplot2 coding style__. Please follow the
[official tidyverse style](http://style.tidyverse.org). Maintaining
[official tidyverse style](https://style.tidyverse.org). Maintaining
a consistent style across the whole code base makes it much easier to
jump into the code. If you're modifying existing ggplot2 code that
doesn't follow the style guide, a separate pull request to fix the
style would be greatly appreciated.

1. If you're adding new parameters or a new function, you'll also need
to document them with [roxygen](https://github.com/klutometis/roxygen).
to document them with [roxygen2](https://github.com/r-lib/roxygen2).
Make sure to re-run `devtools::document()` on the code before submitting.

Currently, ggplot2 uses the development version of roxygen2, which you
can get with `install_github("klutometis/roxygen")`. This will be
available on CRAN in the near future.

1. If fixing a bug or adding a new feature to a non-graphical function,
please add a [testthat](https://github.com/r-lib/testthat) unit test.

Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ Imports:
isoband,
lifecycle (> 1.0.1),
MASS,
mgcv,
rlang (>= 1.1.0),
scales (>= 1.3.0),
stats,
tibble,
vctrs (>= 0.6.0),
withr (>= 2.5.0)
Suggests:
Expand All @@ -55,6 +53,7 @@ Suggests:
knitr,
mapproj,
maps,
mgcv,
multcomp,
munsell,
nlme,
Expand All @@ -67,6 +66,7 @@ Suggests:
sf (>= 0.7-3),
svglite (>= 2.1.2),
testthat (>= 3.1.5),
tibble,
vdiffr (>= 1.0.6),
xml2
Enhances:
Expand All @@ -78,7 +78,7 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'ggproto.R'
'ggplot-global.R'
Expand Down
7 changes: 6 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export(draw_key_vpath)
export(dup_axis)
export(el_def)
export(element_blank)
export(element_geom)
export(element_grob)
export(element_line)
export(element_rect)
Expand All @@ -367,6 +368,7 @@ export(find_panel)
export(flip_data)
export(flipped_names)
export(fortify)
export(from_theme)
export(geom_abline)
export(geom_area)
export(geom_bar)
Expand Down Expand Up @@ -422,11 +424,13 @@ export(geom_violin)
export(geom_vline)
export(get_alt_text)
export(get_element_tree)
export(get_geom_defaults)
export(get_guide_data)
export(get_last_plot)
export(get_layer_data)
export(get_layer_grob)
export(get_panel_scales)
export(get_strip_labels)
export(get_theme)
export(gg_dep)
export(gg_par)
Expand Down Expand Up @@ -512,6 +516,8 @@ export(remove_missing)
export(render_axes)
export(render_strips)
export(replace_theme)
export(reset_geom_defaults)
export(reset_stat_defaults)
export(reset_theme_settings)
export(resolution)
export(scale_alpha)
Expand Down Expand Up @@ -732,7 +738,6 @@ importFrom(grid,unit)
importFrom(lifecycle,deprecated)
importFrom(scales,alpha)
importFrom(stats,setNames)
importFrom(tibble,tibble)
importFrom(utils,.DollarNames)
importFrom(utils,head)
importFrom(utils,tail)
64 changes: 63 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,53 @@
* `guide_bins()`, `guide_colourbar()` and `guide_coloursteps()` gain an `angle`
argument to overrule theme settings, similar to `guide_axis(angle)`
(@teunbrand, #4594).
* (internal) rearranged the code of `Facet$draw_paensl()` method (@teunbrand).
* `coord_*(expand)` can now take a logical vector to control expansion at any
side of the panel (top, right, bottom, left) (@teunbrand, #6020)
* (Breaking) The defaults for all geoms can be set at one in the theme.
(@teunbrand based on pioneering work by @dpseidel, #2239)
* A new `theme(geom)` argument is used to track these defaults.
* The `element_geom()` function can be used to populate that argument.
* The `from_theme()` function allows access to the theme default fields from
inside the `aes()` function.
* Passing empty unmapped aesthetics to layers raises a warning instead of
throwing an error (@teunbrand, #6009).
* Moved {mgcv} from Imports to Suggests (@teunbrand, #5986)
* New `reset_geom_defaults()` and `reset_stat_defaults()` to restore all geom or
stat default aesthetics at once (@teunbrand, #5975).
* `facet_wrap()` can have `space = "free_x"` with 1-row layouts and
`space = "free_y"` with 1-column layouts (@teunbrand)
* Secondary axes respect `n.breaks` setting in continuous scales (@teunbrand, #4483).
* Layers can have names (@teunbrand, #4066).
* (internal) improvements to `pal_qualitative()` (@teunbrand, #5013)
* `coord_radial(clip = "on")` clips to the panel area when the graphics device
supports clipping paths (@teunbrand, #5952).
* (internal) Panel clipping responsibility moved from Facet class to Coord
class through new `Coord$draw_panel()` method.
* `theme(strip.clip)` now defaults to `"on"` and is independent of Coord
clipping (@teunbrand, 5952).
* (internal) rearranged the code of `Facet$draw_panels()` method (@teunbrand).
* Axis labels are now justified across facet panels (@teunbrand, #5820)
* Fixed bug in `stat_function()` so x-axis title now produced automatically
when no data added. (@phispu, #5647).
* geom_sf now accepts shape names (@sierrajohnson, #5808)
* Added `gg` class to `labs()` (@phispu, #5553).
* Missing values from discrete palettes are no longer translated
(@teunbrand, #5929).
* Fixed bug in `facet_grid(margins = TRUE)` when using expresssions
(@teunbrand, #1864).
* `geom_step()` now supports the `orientation` argument (@teunbrand, #5936).
* `position_dodge()` and `position_jitterdodge()` now have a `reverse` argument
(@teunbrand, #3610)
* `coord_radial(r.axis.inside)` can now take a numeric value to control
placement of internally placed radius axes (@teunbrand, #5805).
* (internal) default labels are derived in `ggplot_build()` rather than
in `ggplot_add.Layer()` (@teunbrand, #5894)
* An attempt is made to use a variable's label attribute as default label
(@teunbrand, #4631)
* Themes gain an additional `header_family` argument to easily set the font
for headers and titles (#5886).
* The `plot.subtitle`, `plot.caption` and `plot.tag` theme elements now inherit
from the root `text` element instead of the `title` element (#5886).
* ggplot2 no longer imports {glue} (@teunbrand, #5986).
* `geom_rect()` can now derive the required corners positions from `x`/`width`
or `y`/`height` parameterisation (@teunbrand, #5861).
Expand Down Expand Up @@ -111,8 +157,24 @@
the `nbin` argument (@teunbrand, #5882, #5036)
* `after_stat()` and `after_scale()` throw warnings when the computed aesthetics
are not of the correct length (#5901).
* `guide_colourbar()` now correctly hands off `position` and `available_aes`
parameters downstream (@teunbrand, #5930)
* `geom_hline()` and `geom_vline()` now have `position` argument
(@yutannihilation, #4285).
* New function `get_strip_labels()` to retrieve facet labels (@teunbrand, #4979)
* Fixed bug in `position_dodge2()`'s identification of range overlaps
(@teunbrand, #5938, #4327).
* Fixed bug where empty discrete scales weren't recognised as such
(@teunbrand, #5945).
* (internal) The summary function of `stat_summary()` and `stat_summary_bin()`
is setup once in total instead of once per group (@teunbrand, #5971)
* `facet_grid(space = "free")` can now be combined with `coord_fixed()`
(@teunbrand, #4584).
* `theme_classic()` now has black ticks and text instead of dark gray. In
addition, `theme_classic()`'s axis line end is `"square"` (@teunbrand, #5978).
* {tibble} is now suggested instead of imported (@teunbrand, #5986)
* The ellipsis argument is now checked in `fortify()`, `get_alt_text()`,
`labs()` and several guides (@teunbrand, #3196).

# ggplot2 3.5.1

Expand Down
Loading

0 comments on commit 6b59c18

Please sign in to comment.