Skip to content

Commit

Permalink
Merge branch 'release-0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHeun committed Nov 30, 2023
2 parents b1ba7cf + bedb324 commit 08bb70c
Show file tree
Hide file tree
Showing 104 changed files with 1,122 additions and 120 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

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

steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
53 changes: 53 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
# Build main daily at 8 AM UTC, 3 AM EST, 4 AM EDT, one hour after nightly builds
- cron: "0 8 * * *"

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

- 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
needs: coverage

- name: Test coverage
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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: MKHthemes
Type: Package
Title: Themes for ggplot2 Graphics
Version: 0.1.3
Date: 2023-09-16
Version: 0.1.4
Date: 2023-11-29
Authors@R: c(person("Matthew", "Heun", role = c("aut", "cre"),
email = "matthew.heun@me.com"))
Author: Matthew Heun [aut, cre]
Expand Down
14 changes: 12 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@ title: "Release notes for `MKHthemes`"
output: html_document
---


Cite all releases with doi [10.5281/zenodo.8349995](https://doi.org/10.5281/zenodo.8349995),
which always resolves to the latest release.


# MKHthemes 0.1.3 (2023-09-16)
# MKHthemes 0.1.4 (2023-11-29)

* Add continuous integration and upload to CodeCov.
* Breaking change: some argument names for `xy_theme()` have changed.
- x_strip_labels_spacing --> col_facet_labels_spacing
- y_strip_labels_spacing --> row_facet_labels_spacing
* No new tests.
- Still at 1 test, which passes.
- Test coverage is at 100%.


# MKHthemes 0.1.3 (2023-09-16) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8352370.svg)](https://doi.org/10.5281/zenodo.8352370)

* Now building and publishing website
* Reporting tests for the first time.
Expand Down
34 changes: 17 additions & 17 deletions R/Graphics.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#' Set a pleasing theme for graphs.
#'
#' This function provides a graphical style for `ggplot2` that includes
#' Provides a pleasing graphical style for `ggplot2` that includes
#' \itemize{
#' \item gray axes,
#' \item gray tic marks,
Expand Down Expand Up @@ -41,18 +41,18 @@
#' Default is `spacing_scale*font_size`, normally 2.4 points.
#' @param y_axis_labels_spacing The distance between y axis labels and the y axis itself in points.
#' Default is `spacing_scale*font_size`, normally 2.4 points.
#' @param x_strip_labels_spacing The distance between x strip text
#' (labels at the top of a faceted plot) and
#' the top border of the individual graphs
#' in points.
#' Default is `spacing_scale*font_size`, normally 2.4 points,
#' to leave space for descenders.
#' @param y_strip_labels_spacing The distance between y strip text
#' (labels to the right of a faceted plot) and
#' the right border of the individual graphs
#' in points.
#' Default is `spacing_scale*font_size`, normally 2.4 points,
#' to leave space for descenders.
#' @param col_facet_labels_spacing The distance between x strip text
#' (labels at the top of a faceted plot) and
#' the top border of the individual graphs
#' in points.
#' Default is `spacing_scale*font_size`, normally 2.4 points,
#' to leave space for descenders.
#' @param row_facet_labels_spacing The distance between y strip text
#' (labels to the right of a faceted plot) and
#' the right border of the individual graphs
#' in points.
#' Default is `spacing_scale*font_size`, normally 2.4 points,
#' to leave space for descenders.
#' @param tick_length The tick length in points. Default is `-1.5*spacing_scale*font_size`, normally -3.6 points,
#' so the ticks will be slightly longer than
#' the spacing between text and borders.
Expand All @@ -78,8 +78,8 @@ xy_theme <- function(font_size = 12,
spacing_scale = 0.2,
x_axis_labels_spacing = spacing_scale*font_size,
y_axis_labels_spacing = spacing_scale*font_size,
x_strip_labels_spacing = spacing_scale*font_size,
y_strip_labels_spacing = spacing_scale*font_size,
col_facet_labels_spacing = spacing_scale*font_size,
row_facet_labels_spacing = spacing_scale*font_size,
tick_length = -1.5*spacing_scale*font_size,
border_and_label_colour = "gray50") {
# See https://github.com/infotroph/ggplot-ticks if we want to mirror ticks on top and right.
Expand Down Expand Up @@ -118,9 +118,9 @@ xy_theme <- function(font_size = 12,
margin = ggplot2::margin(r = y_axis_labels_spacing, unit = "pt"),
size = font_size_scale*font_size,
hjust = 1), # Right justify
strip.text.x = ggplot2::element_text(margin = ggplot2::margin(b = x_strip_labels_spacing),
strip.text.x = ggplot2::element_text(margin = ggplot2::margin(b = col_facet_labels_spacing),
size = font_size_scale*font_size),
strip.text.y = ggplot2::element_text(margin = ggplot2::margin(l = y_strip_labels_spacing),
strip.text.y = ggplot2::element_text(margin = ggplot2::margin(l = row_facet_labels_spacing),
size = font_size_scale*font_size,
angle = 270)
)
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# MKHthemes

<!-- badges: start -->
[![R-CMD-check](https://github.com/MatthewHeun/MKHthemes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MatthewHeun/MKHthemes/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The `R` package `MKHthemes` provides
Expand Down
6 changes: 3 additions & 3 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08bb70c

Please sign in to comment.