From 738cea22881708651825c8eec2c5656a1896ae17 Mon Sep 17 00:00:00 2001 From: thomaszwagerman Date: Wed, 16 Oct 2024 11:50:34 +0100 Subject: [PATCH] add codemate.json --- .Rbuildignore | 1 + DESCRIPTION | 1 + NAMESPACE | 1 + R/butterfly-package.R | 7 ++ README.Rmd | 13 ++- README.md | 19 ++- codemeta.json | 135 ++++++++++++++++++++++ man/butterfly-package.Rd | 23 ++++ man/figures/lifecycle-archived.svg | 21 ++++ man/figures/lifecycle-defunct.svg | 21 ++++ man/figures/lifecycle-deprecated.svg | 21 ++++ man/figures/lifecycle-experimental.svg | 21 ++++ man/figures/lifecycle-maturing.svg | 21 ++++ man/figures/lifecycle-questioning.svg | 21 ++++ man/figures/lifecycle-soft-deprecated.svg | 21 ++++ man/figures/lifecycle-stable.svg | 29 +++++ man/figures/lifecycle-superseded.svg | 21 ++++ vignettes/butterfly.Rmd | 18 +++ 18 files changed, 413 insertions(+), 2 deletions(-) create mode 100644 R/butterfly-package.R create mode 100644 codemeta.json create mode 100644 man/butterfly-package.Rd create mode 100644 man/figures/lifecycle-archived.svg create mode 100644 man/figures/lifecycle-defunct.svg create mode 100644 man/figures/lifecycle-deprecated.svg create mode 100644 man/figures/lifecycle-experimental.svg create mode 100644 man/figures/lifecycle-maturing.svg create mode 100644 man/figures/lifecycle-questioning.svg create mode 100644 man/figures/lifecycle-soft-deprecated.svg create mode 100644 man/figures/lifecycle-stable.svg create mode 100644 man/figures/lifecycle-superseded.svg diff --git a/.Rbuildignore b/.Rbuildignore index 0c37df0..bf71665 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,4 @@ ^_pkgdown\.yml$ ^docs$ ^pkgdown$ +^codemeta\.json$ diff --git a/DESCRIPTION b/DESCRIPTION index 9bfbf30..af496fa 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,6 +12,7 @@ RoxygenNote: 7.3.2 Imports: cli, dplyr, + lifecycle, waldo Suggests: knitr, diff --git a/NAMESPACE b/NAMESPACE index a76c5dc..b2020df 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,3 +3,4 @@ export(catch) export(loupe) export(release) +importFrom(lifecycle,deprecated) diff --git a/R/butterfly-package.R b/R/butterfly-package.R new file mode 100644 index 0000000..425b3c1 --- /dev/null +++ b/R/butterfly-package.R @@ -0,0 +1,7 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +#' @importFrom lifecycle deprecated +## usethis namespace: end +NULL diff --git a/README.Rmd b/README.Rmd index 70df464..d027d6f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,6 +18,7 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/thomaszwagerman/butterfly/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/thomaszwagerman/butterfly/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/thomaszwagerman/butterfly/branch/main/graph/badge.svg)](https://app.codecov.io/gh/thomaszwagerman/butterfly?branch=main) +[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) The goal of butterfly is to aid in the quality assurance of continually updating and overwritten time-series data, where we expect new values over time, but want to ensure previous data remains unchanged. @@ -42,7 +43,15 @@ You can install the development version of butterfly from [GitHub](https://githu devtools::install_github("thomaszwagerman/butterfly") ``` -## Example +## Overview +The butterfly package contains the following: + + * `butterfly::loupe()` - examines in detail whether previous values have changed, and reports them using `waldo::compare()`. + * `butterfly::catch()` - returns rows which contain previously changed values in a dataframe. + * `butterfly::release()` - drops rows which contain previously changed values, and returns a dataframe containing new and unchanged rows. + * `butterflycount` - a list of monthly dataframes, which contain fictional butterfly counts for a given date. + +## Examples This is a basic example which shows you how to use butterfly: @@ -114,5 +123,7 @@ There are other R packages and functions which handle object comparison, which m * [waldo](https://github.com/r-lib/waldo) * [diffdf](https://github.com/gowerc/diffdf) +* [assertr](https://github.com/tonyfischetti/assertr) +* [daquiri](https://github.com/ropensci/daiquiri/) Other functions include `all.equal()` or [dplyr](https://github.com/tidyverse/dplyr)'s `setdiff()` diff --git a/README.md b/README.md index 2963e33..cd35727 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ [![R-CMD-check](https://github.com/thomaszwagerman/butterfly/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/thomaszwagerman/butterfly/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/thomaszwagerman/butterfly/branch/main/graph/badge.svg)](https://app.codecov.io/gh/thomaszwagerman/butterfly?branch=main) +[![Lifecycle: +experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) The goal of butterfly is to aid in the quality assurance of continually @@ -39,7 +41,20 @@ You can install the development version of butterfly from devtools::install_github("thomaszwagerman/butterfly") ``` -## Example +## Overview + +The butterfly package contains the following: + +- `butterfly::loupe()` - examines in detail whether previous values have + changed, and reports them using `waldo::compare()`. +- `butterfly::catch()` - returns rows which contain previously changed + values in a dataframe. +- `butterfly::release()` - drops rows which contain previously changed + values, and returns a dataframe containing new and unchanged rows. +- `butterflycount` - a list of monthly dataframes, which contain + fictional butterfly counts for a given date. + +## Examples This is a basic example which shows you how to use butterfly: @@ -197,6 +212,8 @@ which may suit your specific needs better: - [waldo](https://github.com/r-lib/waldo) - [diffdf](https://github.com/gowerc/diffdf) +- [assertr](https://github.com/tonyfischetti/assertr) +- [daquiri](https://github.com/ropensci/daiquiri/) Other functions include `all.equal()` or [dplyr](https://github.com/tidyverse/dplyr)’s `setdiff()` diff --git a/codemeta.json b/codemeta.json new file mode 100644 index 0000000..052e16e --- /dev/null +++ b/codemeta.json @@ -0,0 +1,135 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@type": "SoftwareSourceCode", + "identifier": "butterfly", + "description": "QA/QC of continually updating timeseries data where we expect new values, but want to ensure previous data remains unchanged.", + "name": "butterfly: QA/QC For Continually Updating Timeseries Data", + "codeRepository": "https://github.com/thomaszwagerman/butterfly", + "issueTracker": "https://github.com/thomaszwagerman/butterfly/issues", + "license": "https://spdx.org/licenses/MIT", + "version": "0.0.0.9000", + "programmingLanguage": { + "@type": "ComputerLanguage", + "name": "R", + "url": "https://r-project.org" + }, + "runtimePlatform": "R version 4.4.1 (2024-06-14)", + "author": [ + { + "@type": "Person", + "givenName": "Thomas", + "familyName": "Zwagerman", + "email": "thozwa@bas.ac.uk", + "@id": "https://orcid.org/0009-0003-3742-3234" + } + ], + "maintainer": [ + { + "@type": "Person", + "givenName": "Thomas", + "familyName": "Zwagerman", + "email": "thozwa@bas.ac.uk", + "@id": "https://orcid.org/0009-0003-3742-3234" + } + ], + "softwareSuggestions": [ + { + "@type": "SoftwareApplication", + "identifier": "knitr", + "name": "knitr", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=knitr" + }, + { + "@type": "SoftwareApplication", + "identifier": "rmarkdown", + "name": "rmarkdown", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=rmarkdown" + }, + { + "@type": "SoftwareApplication", + "identifier": "testthat", + "name": "testthat", + "version": ">= 3.0.0", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=testthat" + } + ], + "softwareRequirements": { + "1": { + "@type": "SoftwareApplication", + "identifier": "cli", + "name": "cli", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=cli" + }, + "2": { + "@type": "SoftwareApplication", + "identifier": "dplyr", + "name": "dplyr", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=dplyr" + }, + "3": { + "@type": "SoftwareApplication", + "identifier": "lifecycle", + "name": "lifecycle", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=lifecycle" + }, + "4": { + "@type": "SoftwareApplication", + "identifier": "waldo", + "name": "waldo", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=waldo" + }, + "5": { + "@type": "SoftwareApplication", + "identifier": "R", + "name": "R", + "version": ">= 2.10" + }, + "SystemRequirements": null + }, + "fileSize": "330.734KB", + "readme": "https://github.com/thomaszwagerman/butterfly/blob/main/README.md", + "contIntegration": ["https://github.com/thomaszwagerman/butterfly/actions/workflows/R-CMD-check.yaml", "https://app.codecov.io/gh/thomaszwagerman/butterfly?branch=main"], + "keywords": ["qaqc", "timeseries"] +} diff --git a/man/butterfly-package.Rd b/man/butterfly-package.Rd new file mode 100644 index 0000000..64fcbd6 --- /dev/null +++ b/man/butterfly-package.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/butterfly-package.R +\docType{package} +\name{butterfly-package} +\alias{butterfly} +\alias{butterfly-package} +\title{butterfly: QA/QC For Continually Updating Timeseries Data} +\description{ +QA/QC of continually updating timeseries data where we expect new values, but want to ensure previous data remains unchanged. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/thomaszwagerman/butterfly} + \item Report bugs at \url{https://github.com/thomaszwagerman/butterfly/issues} +} + +} +\author{ +\strong{Maintainer}: Thomas Zwagerman \email{thozwa@bas.ac.uk} (\href{https://orcid.org/0009-0003-3742-3234}{ORCID}) + +} +\keyword{internal} diff --git a/man/figures/lifecycle-archived.svg b/man/figures/lifecycle-archived.svg new file mode 100644 index 0000000..745ab0c --- /dev/null +++ b/man/figures/lifecycle-archived.svg @@ -0,0 +1,21 @@ + + lifecycle: archived + + + + + + + + + + + + + + + lifecycle + + archived + + diff --git a/man/figures/lifecycle-defunct.svg b/man/figures/lifecycle-defunct.svg new file mode 100644 index 0000000..d5c9559 --- /dev/null +++ b/man/figures/lifecycle-defunct.svg @@ -0,0 +1,21 @@ + + lifecycle: defunct + + + + + + + + + + + + + + + lifecycle + + defunct + + diff --git a/man/figures/lifecycle-deprecated.svg b/man/figures/lifecycle-deprecated.svg new file mode 100644 index 0000000..b61c57c --- /dev/null +++ b/man/figures/lifecycle-deprecated.svg @@ -0,0 +1,21 @@ + + lifecycle: deprecated + + + + + + + + + + + + + + + lifecycle + + deprecated + + diff --git a/man/figures/lifecycle-experimental.svg b/man/figures/lifecycle-experimental.svg new file mode 100644 index 0000000..5d88fc2 --- /dev/null +++ b/man/figures/lifecycle-experimental.svg @@ -0,0 +1,21 @@ + + lifecycle: experimental + + + + + + + + + + + + + + + lifecycle + + experimental + + diff --git a/man/figures/lifecycle-maturing.svg b/man/figures/lifecycle-maturing.svg new file mode 100644 index 0000000..897370e --- /dev/null +++ b/man/figures/lifecycle-maturing.svg @@ -0,0 +1,21 @@ + + lifecycle: maturing + + + + + + + + + + + + + + + lifecycle + + maturing + + diff --git a/man/figures/lifecycle-questioning.svg b/man/figures/lifecycle-questioning.svg new file mode 100644 index 0000000..7c1721d --- /dev/null +++ b/man/figures/lifecycle-questioning.svg @@ -0,0 +1,21 @@ + + lifecycle: questioning + + + + + + + + + + + + + + + lifecycle + + questioning + + diff --git a/man/figures/lifecycle-soft-deprecated.svg b/man/figures/lifecycle-soft-deprecated.svg new file mode 100644 index 0000000..9c166ff --- /dev/null +++ b/man/figures/lifecycle-soft-deprecated.svg @@ -0,0 +1,21 @@ + + lifecycle: soft-deprecated + + + + + + + + + + + + + + + lifecycle + + soft-deprecated + + diff --git a/man/figures/lifecycle-stable.svg b/man/figures/lifecycle-stable.svg new file mode 100644 index 0000000..9bf21e7 --- /dev/null +++ b/man/figures/lifecycle-stable.svg @@ -0,0 +1,29 @@ + + lifecycle: stable + + + + + + + + + + + + + + + + lifecycle + + + + stable + + + diff --git a/man/figures/lifecycle-superseded.svg b/man/figures/lifecycle-superseded.svg new file mode 100644 index 0000000..db8d757 --- /dev/null +++ b/man/figures/lifecycle-superseded.svg @@ -0,0 +1,21 @@ + + lifecycle: superseded + + + + + + + + + + + + + + + lifecycle + + superseded + + diff --git a/vignettes/butterfly.Rmd b/vignettes/butterfly.Rmd index 93e7ba9..a1e22f5 100644 --- a/vignettes/butterfly.Rmd +++ b/vignettes/butterfly.Rmd @@ -35,6 +35,14 @@ You can install the development version of butterfly from [GitHub](https://githu devtools::install_github("thomaszwagerman/butterfly") ``` +## Overview +The butterfly package contains the following: + + * `butterfly::loupe()` - examines in detail whether previous values have changed, and reports them using `waldo::compare()`. + * `butterfly::catch()` - returns rows which contain previously changed values in a dataframe. + * `butterfly::release()` - drops rows which contain previously changed values, and returns a dataframe containing new and unchanged rows. + * `butterflycount` - a list of monthly dataframes, which contain fictional butterfly counts for a given date. + ## How to use butterfly This is a basic example which shows you how to use butterfly: @@ -100,6 +108,16 @@ df_released <- butterfly::release( df_released ``` +## The butterflycount dataset + +This packages includes a small dummy dataset, `butterflycount`, which contains a list of monthly dataframes of butterfly counts for a given date. + +```{r butterfly_count} +butterflycount +``` + +This dataset is entirely fictional, and merely included to aid demonstrating butterfly's functionality. + ## Incorporating in data pipeline Examples of using applying butterfly in a pipeline.