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

Upgrade to 0.0.5 #36

Merged
merged 5 commits into from
May 28, 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: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
============================

Expand Down
7 changes: 5 additions & 2 deletions R/upgrade_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
}
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<p style="display:none">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.</p>

## Rationale
Expand Down
28 changes: 22 additions & 6 deletions codemeta.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand All @@ -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",
Expand Down Expand Up @@ -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"
]
}
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions sticker/sticker.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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()

Expand All @@ -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,
Expand All @@ -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")
7 changes: 7 additions & 0 deletions tests/testthat/test_e_upgrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down