Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First release on CRAN #41

Merged
merged 10 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
^sticker$
^tic\.R$
^.*\.Rproj$
^cran-comments\.md$
^CRAN-RELEASE$
40 changes: 30 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ deploy:
script: R -q -e 'tic::deploy()'
on:
branch: master
dist: xenial
condition:
- $TRAVIS_PULL_REQUEST = false
- $TRAVIS_EVENT_TYPE != cron
Expand All @@ -28,24 +29,43 @@ after_script: R -q -e 'tic::after_script()'

# Header
language: r
r:
- oldrel
- release
- devel
latex: false
matrix:
include:
- dist: trusty
r: oldrel
addons:
apt:
packages:
- libgit2-dev
- dist: xenial
r: release
addons:
apt:
packages:
- libgit2-dev
- dist: xenial
r: devel
addons:
apt:
packages:
- libgit2-dev
- os: osx
r: release
brew_packages: openssl
sudo: false
dist: trusty
cache: packages
addons:
apt:
packages:
- libgit2-dev
latex: false

#env
env:
global:
- _R_CHECK_FORCE_SUGGESTS_=false
- MAKEFLAGS="-j 2"

notifications:
email:
on_success: change
on_failure: change

#services
services:
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Imports:
methods,
yaml
Suggests:
spelling,
ggplot2,
knitr,
microbenchmark,
Expand Down Expand Up @@ -52,3 +53,4 @@ Collate:
'relabel.R'
'upgrade_data.R'
VignetteBuilder: knitr
Language: en-GB
12 changes: 6 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ git2rdata 0.0.4 (2019-05-16)
* Use a faster algorithm to detect duplicates (suggestion by @brodieG).
* Improve documentation.
* Fix typo's in documentation, vignettes and README.
* Add a ROpenSci review badge to the README.
* Add a rOpenSci review badge to the README.
* The README mentions on upper bound on the size of dataframes.
* Set lifecycle to "maturing" and repo status to "active".
* The functions handle `root` containing regex expressions.
Expand All @@ -62,11 +62,11 @@ git2rdata 0.0.2 (2019-02-26)

### NEW FEATURES

* Vignette on [efficiency](../articles/efficiency.html) added (#2).
* Vignette on [efficiency](https://ropensci.github.io/git2rdata/articles/efficiency.html) added (#2).
* Three separate vignettes instead of one large vignette.
* Focus on the [plain text format](../arsticles/plain_text.html).
* Focus on [version control](../articles/version_control.html).
* Focus on [workflows](../articles/workflow.html).
* Focus on the [plain text format](https://ropensci.github.io/git2rdata/articles/plain_text.html).
* Focus on [version control](https://ropensci.github.io/git2rdata/articles/version_control.html).
* Focus on [workflows](https://ropensci.github.io/git2rdata/articles/workflow.html).
* S3 methods replace the old S4 methods (#8).
* Optimized factors use stable indices. Adding or removing levels result in smaller diffs (#13).
* Use `relabel()` to alter factor levels without changing their index (#13).
Expand All @@ -82,7 +82,7 @@ git2rdata 0.0.2 (2019-02-26)
* Each helpfile contains a working example (#11).
* README updated (#12).
* Updated the rationale with links to the vignettes.
* `git2rdata` has a hexsticker logo.
* `git2rdata` has a hexagon sticker logo.
* Add the [![DOI](https://zenodo.org/badge/147685405.svg)](https://zenodo.org/badge/latestdoi/147685405).
* The installation instructions use `remotes` and build the vignettes.
* We removed `auto_commit()` because of limited extra functionality over `git2r::commit()`.
Expand Down
4 changes: 2 additions & 2 deletions R/meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' Prepares a vector for storage. When relevant, `meta()`optimizes the object
#' for storage by changing the format to one which needs less characters. The
#' metadata stored in the `meta` attribute, contains all required information to
#' backtransform the optimized format into the original format.
#' back-transform the optimized format into the original format.
#' @param x the vector.
#' @param ... further arguments to the methods.
#' @return the optimized vector `x` with `meta` attribute.
Expand Down Expand Up @@ -185,7 +185,7 @@ meta.Date <- function(x, optimize = TRUE, ...){
#'
#' \code{\link{write_vc}} uses this function to prepare a dataframe for storage.
#' Existing metadata is passed through the optional `old` argument. This
#' argument intendent for internal use.
#' argument intended for internal use.
#' @rdname meta
#' @inheritParams write_vc
meta.data.frame <- function(x, optimize = TRUE, na = "NA", sorting, ...) {
Expand Down
4 changes: 2 additions & 2 deletions R/prune.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @param path the directory in which to clean all the data files. The directory
#' is relative to `root`.
#' @param recursive remove files in subdirectories too.
#' @return returns invisibily a vector of removed files names. The paths are
#' @return returns invisibly a vector of removed files names. The paths are
#' relative to `root`.
#' @inheritParams write_vc
#' @export
Expand Down Expand Up @@ -108,7 +108,7 @@ rm_data.git_repository <- function(
#' `vignette("workflow", package = "git2rdata")` for some examples on how to use
#' this.
#' @inheritParams rm_data
#' @return returns invisibily a vector of removed files names. The paths are
#' @return returns invisibly a vector of removed files names. The paths are
#' relative to `root`.
#' @inheritParams write_vc
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/read_vc.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description
#' `read_vc()` handles git2rdata objects stored by `write_vc()`. It reads and
#' verifies the metadata file (`.yml`). Then it reads and verifies the raw data.
#' The last step is backtransforming any transformation done by `meta()` to
#' The last step is back-transforming any transformation done by `meta()` to
#' return the `data.frame` as stored by `write_vc()`.
#'
#' `read_vc()` is an S3 generic on `root` which currently handles `"character"`
Expand Down
2 changes: 1 addition & 1 deletion R/recent_commit.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' Use this information to document the current version of file or git2rdata
#' object in an analysis. Since it refers to the most recent change of this
#' file, it remains unchanged by committing changes to other files. You can
#' also use it to track if data got updated, requirering an analysis to
#' also use it to track if data got updated, requiring an analysis to
#' be rerun. See `vignette("workflow", package = "git2rdata")`.
#' @inheritParams write_vc
#' @param root The root of a project. Can be a file path or a `git-repository`.
Expand Down
10 changes: 5 additions & 5 deletions R/reexport.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Reexported Function From `git2r`
#' Re-exported Function From `git2r`
#'
#' See \code{\link[git2r]{repository}} in `git2r`.
#' @name repository
Expand All @@ -7,7 +7,7 @@
#' @export
NULL

#' Reexported Function From `git2r`
#' Re-exported Function From `git2r`
#'
#' See \code{\link[git2r]{status}} in `git2r`.
#' @name status
Expand All @@ -16,7 +16,7 @@ NULL
#' @export
NULL

#' Reexported Function From `git2r`
#' Re-exported Function From `git2r`
#'
#' See \code{\link[git2r]{commit}} in `git2r`.
#' @name commit
Expand All @@ -25,7 +25,7 @@ NULL
#' @export
NULL

#' Reexported Function From `git2r`
#' Re-exported Function From `git2r`
#'
#' See \code{\link[git2r]{pull}} in `git2r`.
#' @name pull
Expand All @@ -34,7 +34,7 @@ NULL
#' @export
NULL

#' Reexported Function From `git2r`
#' Re-exported Function From `git2r`
#'
#' See \code{\link[git2r]{push}} in `git2r`.
#' @name push
Expand Down
6 changes: 3 additions & 3 deletions R/relabel.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' the factor indices and the metadata contains the link between the factor
#' index and the corresponding label. See
#' `vignette("version_control", package = "git2rdata")`. In such a case,
#' relabeling a factor can be fast and lightweight by updating the metadata.
#' relabelling a factor can be fast and lightweight by updating the metadata.
#' @inheritParams write_vc
#' @param change either a `list` or a `data.frame`. In case of a `list` is a
#' named `list` with named `vectors`. The names of list elements must match the
Expand Down Expand Up @@ -93,7 +93,7 @@ relabel.list <- function(file, root = ".", change) {
meta_data <- read_yaml(file["meta_file"])
optimize <- meta_data[["..generic"]][["optimize"]]
if (!optimize) {
stop("relabeling factors on verbose data leads to large diffs.
stop("relabelling factors on verbose data leads to large diffs.
Use write_vc() instead.")
}
assert_that(
Expand All @@ -117,7 +117,7 @@ Use write_vc() instead.")
meta_data[[id]][["labels"]] <- unname(meta_data[[id]][["labels"]])
assert_that(
anyDuplicated(meta_data[[id]][["labels"]]) == 0,
msg = sprintf("relabeling '%s' leads to duplicated labels", id)
msg = sprintf("relabelling '%s' leads to duplicated labels", id)
)
}
meta_data[["..generic"]][["hash"]] <- metadata_hash(meta_data)
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# The `git2rdata` package <img src="man/figures/logo.png" align="right" alt="" width="120" />

[![CRAN status](https://www.r-pkg.org/badges/version/git2rdata)](https://cran.r-project.org/package=git2rdata)
[![Rdoc](https://www.rdocumentation.org/badges/version/git2rdata)](https://www.rdocumentation.org/packages/git2rdata)

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![](https://badges.ropensci.org/263_status.svg)](https://github.com/ropensci/software-review/issues/263)
Expand Down Expand Up @@ -46,7 +49,13 @@ The `git2rdata` package is an R package for writing and reading dataframes as pl

## Installation

Install the development version
Install from CRAN

```r
install.packages("git2rdata")
```

Install the development version from GitHub

```r
# installation requires the "remotes" package
Expand Down Expand Up @@ -91,7 +100,7 @@ read_vc(file = "rel_path/filename", root = repo)

Please read `vignette("version_control", package = "git2rdata")` for more details on using git2rdata in combination with version control.

## What data sizes can `git2rdata` handle?
## What Data Sizes Can Git2rdata Handle?

The recommendation for git repositories is to use files smaller than 100 MiB, an overall repository size less than 1 GiB and less than 25k files. The individual file size is the limiting factor. Storing the airbag dataset ([`DAAG::nassCDS`](https://cran.r-project.org/package=DAAG)) with `write_vc()` requires on average 68 (optimized) or 97 (verbose) byte per record. The 100 MiB file limit for this data is reached after about 1.5 million (optimize) or 1 million (verbose) observations.

Expand Down Expand Up @@ -130,6 +139,6 @@ git2rdata

## Contributions

Contributions to `git2rdata` are welcome. Please read our [Contributing guidelines](.github/CONTRIBUTING.md) first. The `git2rdata` project is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
Contributions to `git2rdata` are welcome. Please read our [Contributing guidelines](https://github.com/ropensci/git2rdata/blob/master/.github/CONTRIBUTING.md) first. The `git2rdata` project is released with a [Contributor Code of Conduct](https://github.com/ropensci/git2rdata/blob/master/.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.

[![ropensci_footer](http://ropensci.org/public_images/github_footer.png)](https://ropensci.org)
[![rOpenSci footer](http://ropensci.org/public_images/github_footer.png)](https://ropensci.org)
29 changes: 25 additions & 4 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"description": "Make versioning of data.frame easy and efficient using git repositories.",
"name": "git2rdata: Store and Retrieve Data.frames in a Git Repository",
"codeRepository": "https://github.com/ropensci/git2rdata",
"relatedLink": "https://doi.org/10.5281/zenodo.1485309",
"relatedLink": [
"https://doi.org/10.5281/zenodo.1485309",
"https://CRAN.R-project.org/package=git2rdata"
],
"issueTracker": "https://github.com/ropensci/git2rdata/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1",
Expand Down Expand Up @@ -68,6 +71,18 @@
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "spelling",
"name": "spelling",
"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=spelling"
},
{
"@type": "SoftwareApplication",
"identifier": "ggplot2",
Expand Down Expand Up @@ -179,9 +194,9 @@
"sameAs": "https://CRAN.R-project.org/package=yaml"
}
],
"releaseNotes": "https://github.com/inbo/git2rdata/blob/master/NEWS.md",
"releaseNotes": "https://github.com/ropensci/git2rdata/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/git2rdata/blob/master/README.md",
"fileSize": "363.628KB",
"fileSize": "363.637KB",
"contIntegration": [
"https://travis-ci.org/inbo/git2rdata",
"https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master",
Expand All @@ -197,5 +212,11 @@
"r-package",
"version-control",
"reproducible-research"
]
],
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
}
}
19 changes: 19 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Test environments
* local
* ubuntu 18.04, R 3.6.0
* travis-ci
* trusty, oldrel
* xenial, release and devel
* osx, release
* AppVeyor
* Windows Server 2012, R 3.6.0 Patched
* r-hub
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit
* Ubuntu Linux 16.04 LTS, R-release, GCC
* Fedora Linux, R-devel, clang, gfortran

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
19 changes: 19 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
AppVeyor
Bitbucket
codecov
DAAG
ersion
Gitlab
kiB
lifecycle
microbenchmark
ontrol
POSIXct
rdata
regex
rOpenSci
Roxygen
sensu
testthat
tsv
YAML
2 changes: 1 addition & 1 deletion man/commit.Rd

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

Loading