diff --git a/DESCRIPTION b/DESCRIPTION index e9324c5..f5f818e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: git2rdata Title: Store and Retrieve Data.frames in a Git Repository -Version: 0.0.4 +Version: 0.0.5 Authors@R: c( person( "Thierry", "Onkelinx", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index b95a2fe..8736d97 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +git2rdata 0.0.5 (2019-05-21) +============================ + + * `upgrade_data()` uses the same order of the metadata as `write_vc()`. + git2rdata 0.0.4 (2019-05-16) ============================ diff --git a/R/upgrade_data.R b/R/upgrade_data.R index 333b59d..ec99d71 100644 --- a/R/upgrade_data.R +++ b/R/upgrade_data.R @@ -80,13 +80,16 @@ upgrade_data.character <- function( } return(target) } + meta_data[["..generic"]][["git2rdata"]] <- NULL } assert_that( meta_data[["..generic"]][["hash"]] == metadata_hash(meta_data), msg = paste(target, "has corrupt metadata: mismatching hash.") ) - meta_data[["..generic"]][["git2rdata"]] <- - as.character(packageVersion("git2rdata")) + meta_data[["..generic"]] <- c( + git2rdata = as.character(packageVersion("git2rdata")), + meta_data[["..generic"]] + ) if (!has_name(meta_data[["..generic"]], "data_hash")) { meta_data[["..generic"]][["data_hash"]] <- hashfile(file["raw_file"]) } diff --git a/README.md b/README.md index 2887919..d271921 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,18 @@ [![](https://badges.ropensci.org/263_status.svg)](https://github.com/ropensci/software-review/issues/263) [![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) -[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.4.0-6666ff.svg)](https://cran.r-project.org/) +[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.5.0-6666ff.svg)](https://cran.r-project.org/) [![DOI](https://zenodo.org/badge/147685405.svg)](https://zenodo.org/badge/latestdoi/147685405) [![Travis-CI Build Status](https://travis-ci.org/inbo/git2rdata.svg?branch=master)](https://travis-ci.org/inbo/git2rdata) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/a3idhi9f6ls9xu8r/branch/master?svg=true)](https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master) [![codecov](https://codecov.io/gh/inbo/git2rdata/branch/master/graph/badge.svg)](https://codecov.io/gh/inbo/git2rdata) +![GitHub forks](https://img.shields.io/github/forks/inbo/git2rdata.svg?style=social) +![GitHub stars](https://img.shields.io/github/stars/inbo/git2rdata.svg?style=social) +![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/inbo/git2rdata.svg) +![GitHub repo size](https://img.shields.io/github/repo-size/inbo/git2rdata.svg) +

Please visit the git2rdata website at https://inbo.github.io/git2rdata/. The vignette code on the website link to a rendered version of the vignette. Functions have a link to their help file.

## Rationale diff --git a/codemeta.json b/codemeta.json index 1872de9..e45203f 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,5 +1,8 @@ { - "@context": ["https://doi.org/10.5063/schema/codemeta-2.0", "http://schema.org"], + "@context": [ + "https://doi.org/10.5063/schema/codemeta-2.0", + "http://schema.org" + ], "@type": "SoftwareSourceCode", "identifier": "git2rdata", "description": "Make versioning of data.frame easy and efficient using git repositories.", @@ -8,7 +11,7 @@ "relatedLink": "https://doi.org/10.5281/zenodo.1485309", "issueTracker": "https://github.com/inbo/git2rdata/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.0.4", + "version": "0.0.5", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -171,8 +174,21 @@ ], "releaseNotes": "https://github.com/inbo/git2rdata/blob/master/NEWS.md", "readme": "https://github.com/inbo/git2rdata/blob/master/README.md", - "fileSize": "347.568KB", - "contIntegration": ["https://travis-ci.org/inbo/git2rdata", "https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master", "https://codecov.io/gh/inbo/git2rdata"], - "developmentStatus": ["https://www.repostatus.org/#active", "https://www.tidyverse.org/lifecycle/#maturing"], - "keywords": ["r", "rstats", "r-package", "version-control", "reproducible-research"] + "fileSize": "348.673KB", + "contIntegration": [ + "https://travis-ci.org/inbo/git2rdata", + "https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master", + "https://codecov.io/gh/inbo/git2rdata" + ], + "developmentStatus": [ + "https://www.repostatus.org/#active", + "https://www.tidyverse.org/lifecycle/#maturing" + ], + "keywords": [ + "r", + "rstats", + "r-package", + "version-control", + "reproducible-research" + ] } diff --git a/man/figures/logo.png b/man/figures/logo.png index 7ad1e57..9f56815 100644 Binary files a/man/figures/logo.png and b/man/figures/logo.png differ diff --git a/sticker/sticker.R b/sticker/sticker.R index 8b3b42b..609d839 100644 --- a/sticker/sticker.R +++ b/sticker/sticker.R @@ -1,5 +1,11 @@ library(tidyverse) +library(magick) library(cowplot) +transparent <- TRUE +image_read("../man/figures/logo_en.png") %>% + image_rotate(30) %>% + image_transparent(color = ifelse(transparent, "white", "black")) %>% + image_write("inbo.png") scale <- 1 dx <- 1 dy <- sqrt(2) @@ -58,7 +64,7 @@ hexagon <- tibble( y = range * sin(angle) ) %>% ggplot(aes(x = x, y = y)) + - geom_polygon(fill = NA, colour = git_colour, size = 3) + + geom_polygon(fill = NA, colour = git_colour, size = 3 * scale) + coord_fixed() + theme_void() @@ -79,6 +85,7 @@ df <- crossing( coord_fixed(1/2) + theme_void() sticker <- ggdraw() + + draw_image("inbo.png", x = -0.2, y = -0.28, scale = 0.45) + draw_plot(hexagon) + draw_label( "git2rdata", x = 0.5, y = 0.8, @@ -102,5 +109,6 @@ save_plot( base_height = scale * 278 / 72, base_width = scale * 240 / 72, dpi = 72, - bg = NA + bg = ifelse(transparent, NA, "white") ) +file.remove("inbo.png") diff --git a/tests/testthat/test_e_upgrade.R b/tests/testthat/test_e_upgrade.R index 1d9817f..887bb4c 100644 --- a/tests/testthat/test_e_upgrade.R +++ b/tests/testthat/test_e_upgrade.R @@ -52,6 +52,13 @@ test_that("upgrade_data() validates metadata", { correct_yaml <- yaml::read_yaml(file.path(root, junk[2])) junk_yaml <- correct_yaml + junk_yaml[["..generic"]][["git2rdata"]] <- "0.0.4" + yaml::write_yaml(junk_yaml, file.path(root, junk[2])) + expect_identical( + unname(upgrade_data(file = file, root = root)), + file + ) + junk_yaml <- correct_yaml junk_yaml[["..generic"]][["git2rdata"]] <- NULL junk_yaml[["test_Date"]] <- NULL yaml::write_yaml(junk_yaml, file.path(root, junk[2]))