Skip to content

Commit

Permalink
Update repo tools
Browse files Browse the repository at this point in the history
  • Loading branch information
phgrosjean committed May 1, 2024
1 parent 363e711 commit 416f07b
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 74 deletions.
11 changes: 6 additions & 5 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
^\.DS_Store$
^\.Rproj\.user$
^.+\.Rproj$
^\.gitignore$
^\.git$
^\.github$
^\.DS_Store$
^Makefile$
^\.Rprofile$
^revdep$
^codecov\.yml$
^_pkgdown\.yml$
^pkgdown$
^docs$
^CODE_OF_CONDUCT\.md$
^FAQ\.md$
^LICENSE\.md$
^README\.Rmd$
^README\.Rmd$
^README\.md$
^TODO\.md$
^_pkgdown\.yml$
^pkgdown$
^docs$
data-raw
5 changes: 4 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v4
Expand All @@ -28,10 +29,12 @@ jobs:

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

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ rsconnect/
# More files
inst/doc
docs
Meta
42 changes: 21 additions & 21 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ Maintainer: Philippe Grosjean <phgrosjean@sciviews.org>
Depends:
R (>= 4.2.0),
ggplot2 (>= 3.0),
lattice
lattice (>= 0.21.0)
Imports:
cowplot,
data.io,
ggplotify,
ggpubr,
graphics,
grDevices,
latticeExtra,
pryr,
rlang,
scales,
stats,
utils,
viridis,
svMisc
cowplot (>= 1.1.1),
data.io (>= 1.5.0),
ggplotify (>= 0.1.0),
ggpubr (>= 0.6.0),
graphics (>= 4.2.0),
grDevices (>= 4.2.0),
latticeExtra (>= 0.6.30),
pryr (>= 0.1.6),
rlang (>= 1.1.1),
scales (>= 1.2.1),
stats (>= 4.2.0),
svMisc (>= 1.4.0),
utils (>= 4.2.0),
viridis (>= 0.6.2)
Suggests:
MASS,
knitr,
rmarkdown,
spelling,
MASS (>= 7.3.58.3),
knitr (>= 1.42),
rmarkdown (>= 2.21),
spelling (>= 2.2.1),
testthat (>= 3.0.0)
Remotes:
SciViews/data.io,
SciViews/svMisc
License: MIT + file LICENSE
URL: https://github.com/SciViews/chart, https://www.sciviews.org/chart/
BugReports: https://github.com/SciViews/chart/issues
ByteCompile: yes
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Config/testthat/edition: 3
VignetteBuilder: knitr
Encoding: UTF-8
Language: en-US
ByteCompile: yes
Config/testthat/edition: 3
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chart 1.5.2

- Documentation (vignettes et README file) are completed.
- Documentation (vignettes and README file) are completed.

- License change to MIT for better reusability.

Expand Down
6 changes: 5 additions & 1 deletion R/chart-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#'
#' @section Important functions:
#'
#'- [chart()] constructs a `Chart` object.
#'- [chart()] constructs a **Chart** object.
#'
#'- [combine_charts()] combines multiple **Chart** objects into a single plot.
#'
#'- [f_aes()] creates a formula for aesthetics mapping (use it instead of [ggplot2::aes()].
#'
#' @docType package
#' @name chart-package
Expand Down
9 changes: 4 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ output: github_document

<!-- badges: start -->

[![R-CMD-check](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml) [![Coverage status](https://img.shields.io/codecov/c/github/SciViews/chart/master.svg)](https://codecov.io/github/SciViews/chart?branch=main) [![CRAN status](https://www.r-pkg.org/badges/version/chart)](https://cran.r-project.org/package=chart) [![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-2.0.html) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![Codecov test coverage](https://codecov.io/gh/SciViews/chart/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SciViews/chart?branch=main)
[![R-CMD-check](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/SciViews/chart/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SciViews/chart?branch=main) [![CRAN status](https://www.r-pkg.org/badges/version/chart)](https://cran.r-project.org/package=chart) [![r-universe status](https://sciviews.r-universe.dev/badges/chart)](https://sciviews.r-universe.dev/chart) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)

<!-- badges: end -->

```{r setup, include=FALSE}
Expand All @@ -18,7 +18,7 @@ library(chart)
```


{chart} provides an alternate formula interface to {ggplot2}, and it also homogenize plot outputs from base R plots, {lattice} and {ggplot}. If labels and/or units attributes are defined for variables in the data, they are used automatically to construct the label (with units) of the axes. See <https://www.sciviews.org/chart/> for more details.
The {chart} package provides an alternate formula interface to {ggplot2}, and it also homogenize plot outputs from base R plots, {lattice} and {ggplot}. If labels and/or units attributes are defined for variables in the data, they are used automatically to construct the label (with units) of the axes. See <https://www.sciviews.org/chart/> for more details.

## Installation

Expand Down Expand Up @@ -57,7 +57,6 @@ airquality <- data.io::labelise(airquality, label = list(
))
```


here is a first {chart}:

```{r}
Expand All @@ -80,4 +79,4 @@ vignette("chart") # Not installed with install_github()

## Code of Conduct

Please note that the {chart} package is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
Please note that the {chart} package is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
Chart - Unified Interface (with Formula) for R Plots
Unified Interface (with Formula) for R Plots
<a href='https://www.sciviews.org/chart'><img src='man/figures/logo.png' align='right' height='139'/></a>
================

<!-- Do not edit the README.md file directly. It is generated from README.Rmd. -->
<!-- badges: start -->

[![R-CMD-check](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/SciViews/chart/actions/workflows/R-CMD-check.yaml)
[![Coverage
status](https://img.shields.io/codecov/c/github/SciViews/chart/master.svg)](https://codecov.io/github/SciViews/chart?branch=main)
[![Codecov test
coverage](https://codecov.io/gh/SciViews/chart/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SciViews/chart?branch=main)
[![CRAN
status](https://www.r-pkg.org/badges/version/chart)](https://cran.r-project.org/package=chart)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
[![r-universe
status](https://sciviews.r-universe.dev/badges/chart)](https://sciviews.r-universe.dev/chart)
[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Lifecycle:
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)

<!-- badges: end -->

{chart} provides an alternate formula interface to {ggplot2}, and it
also homogenize plot outputs from base R plots, {lattice} and {ggplot}.
If labels and/or units attributes are defined for variables in the data,
they are used automatically to construct the label (with units) of the
axes. See <https://www.sciviews.org/chart/> for more details.
The {chart} package provides an alternate formula interface to
{ggplot2}, and it also homogenize plot outputs from base R plots,
{lattice} and {ggplot}. If labels and/or units attributes are defined
for variables in the data, they are used automatically to construct the
label (with units) of the axes. See <https://www.sciviews.org/chart/>
for more details.

## Installation

Expand Down Expand Up @@ -108,5 +112,5 @@ vignette("chart") # Not installed with install_github()

Please note that the {chart} package is released with a [Contributor
Code of
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ development:

template:
package: svPkgdown
bootstrap: 5
params:
bootswatch: spacelab
mathjax: true
Expand Down
10 changes: 8 additions & 2 deletions chart.Rproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
Expand All @@ -14,8 +14,14 @@ LaTeX: XeLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
LineEndingConversion: Posix

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace,vignette

QuitChildProcessesOnExit: Yes

SpellingDictionary: en_US
7 changes: 4 additions & 3 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
citHeader("To cite SciViews-R in publications, please use:")
citHeader("To cite SciViews-R in publications use:")

citEntry(
entry = "Manual",
title = "SciViews::R",
author = personList(as.person("Philippe Grosjean")),
author = personList(as.person("Philippe Grosjean"),
as.person("Guyliann Engels")),
organization = "UMONS",
address = "MONS, Belgium",
year = version$year,
url = "https://sciviews.r-universe.dev/",

textVersion =
paste("Grosjean, Ph. (", version$year, "). ",
paste("Grosjean, Ph. & Engels, G. (", version$year, "). ",
"SciViews::R. ",
"UMONS, Mons, Belgium. ",
"URL https://sciviews.r-universe.dev/.",
Expand Down
4 changes: 4 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
aes
appveyor
customizable
devtools
exploreit
ggplot
GitHub
modelit
OSX
pipeable
reusability
subsettable
thetics
viridis
6 changes: 4 additions & 2 deletions man/chart-package.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-chart.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("chart creates 'Chart' objects", {
test_that("chart() creates Chart objects", {
dtf <- data.frame(x = 1:2, y = 1:2)
expect_s3_class(chart(dtf, y ~ x), 'Chart')
})
2 changes: 0 additions & 2 deletions vignettes/.gitignore

This file was deleted.

4 changes: 4 additions & 0 deletions vignettes/chart.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(chart)

17 changes: 7 additions & 10 deletions vignettes/chart.Rmd
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
---
title: "Chart - Unified Interface (with Formula) for R Plots"
author: "Philippe Grosjean (phgrosjean@sciviews.org)"
title: "Unified Interface (with Formula) for R Plots"
author: "Philippe Grosjean"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: true
toc_depth: 3
fig_caption: yes
vignette: >
%\VignetteIndexEntry{Chart - Unified Interface (with Formula) for R Plots}
%\VignetteIndexEntry{Unified Interface (with Formula) for R Plots}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(chart)
```

Expand All @@ -28,11 +25,11 @@ In R, there are several plotting engines, but the three major ones are the base
The goal of {chart} is:

- to provide a unified interface to the three major plotting engines in R;
- to make all three types of plots intercompatible in a composite figure;
- to make all three types of plots compatible in a composite figure;
- to propose a default style for the plots that is consistent across the three engines and close enough to a publication-ready style;
- to use automatically labels and units for axes, when possible;
- to expose an formula-base interface as an alternative for {ggplot2} users;
- to implement various (customisable) plot types for different R objects.
- to implement various (customizable) plot types for different R objects.


## {chart} for {ggplot2} users
Expand Down
Loading

0 comments on commit 416f07b

Please sign in to comment.