Skip to content

Commit 796ba98

Browse files
authored
Merge pull request #36 from inbo/upgrade
Upgrade to 0.0.5
2 parents df1ba32 + 2d2d3b8 commit 796ba98

File tree

8 files changed

+56
-12
lines changed

8 files changed

+56
-12
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: git2rdata
22
Title: Store and Retrieve Data.frames in a Git Repository
3-
Version: 0.0.4
3+
Version: 0.0.5
44
Authors@R: c(
55
person(
66
"Thierry", "Onkelinx", role = c("aut", "cre"),

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
git2rdata 0.0.5 (2019-05-21)
2+
============================
3+
4+
* `upgrade_data()` uses the same order of the metadata as `write_vc()`.
5+
16
git2rdata 0.0.4 (2019-05-16)
27
============================
38

R/upgrade_data.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ upgrade_data.character <- function(
8080
}
8181
return(target)
8282
}
83+
meta_data[["..generic"]][["git2rdata"]] <- NULL
8384
}
8485
assert_that(
8586
meta_data[["..generic"]][["hash"]] == metadata_hash(meta_data),
8687
msg = paste(target, "has corrupt metadata: mismatching hash.")
8788
)
88-
meta_data[["..generic"]][["git2rdata"]] <-
89-
as.character(packageVersion("git2rdata"))
89+
meta_data[["..generic"]] <- c(
90+
git2rdata = as.character(packageVersion("git2rdata")),
91+
meta_data[["..generic"]]
92+
)
9093
if (!has_name(meta_data[["..generic"]], "data_hash")) {
9194
meta_data[["..generic"]][["data_hash"]] <- hashfile(file["raw_file"])
9295
}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
[![](https://badges.ropensci.org/263_status.svg)](https://github.com/ropensci/software-review/issues/263)
66

77
[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
8-
[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.4.0-6666ff.svg)](https://cran.r-project.org/)
8+
[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.5.0-6666ff.svg)](https://cran.r-project.org/)
99
[![DOI](https://zenodo.org/badge/147685405.svg)](https://zenodo.org/badge/latestdoi/147685405)
1010

1111
[![Travis-CI Build Status](https://travis-ci.org/inbo/git2rdata.svg?branch=master)](https://travis-ci.org/inbo/git2rdata)
1212
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/a3idhi9f6ls9xu8r/branch/master?svg=true)](https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master)
1313
[![codecov](https://codecov.io/gh/inbo/git2rdata/branch/master/graph/badge.svg)](https://codecov.io/gh/inbo/git2rdata)
1414

15+
![GitHub forks](https://img.shields.io/github/forks/inbo/git2rdata.svg?style=social)
16+
![GitHub stars](https://img.shields.io/github/stars/inbo/git2rdata.svg?style=social)
17+
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/inbo/git2rdata.svg)
18+
![GitHub repo size](https://img.shields.io/github/repo-size/inbo/git2rdata.svg)
19+
1520
<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>
1621

1722
## Rationale

codemeta.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"@context": ["https://doi.org/10.5063/schema/codemeta-2.0", "http://schema.org"],
2+
"@context": [
3+
"https://doi.org/10.5063/schema/codemeta-2.0",
4+
"http://schema.org"
5+
],
36
"@type": "SoftwareSourceCode",
47
"identifier": "git2rdata",
58
"description": "Make versioning of data.frame easy and efficient using git repositories.",
@@ -8,7 +11,7 @@
811
"relatedLink": "https://doi.org/10.5281/zenodo.1485309",
912
"issueTracker": "https://github.com/inbo/git2rdata/issues",
1013
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.0.4",
14+
"version": "0.0.5",
1215
"programmingLanguage": {
1316
"@type": "ComputerLanguage",
1417
"name": "R",
@@ -171,8 +174,21 @@
171174
],
172175
"releaseNotes": "https://github.com/inbo/git2rdata/blob/master/NEWS.md",
173176
"readme": "https://github.com/inbo/git2rdata/blob/master/README.md",
174-
"fileSize": "347.568KB",
175-
"contIntegration": ["https://travis-ci.org/inbo/git2rdata", "https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master", "https://codecov.io/gh/inbo/git2rdata"],
176-
"developmentStatus": ["https://www.repostatus.org/#active", "https://www.tidyverse.org/lifecycle/#maturing"],
177-
"keywords": ["r", "rstats", "r-package", "version-control", "reproducible-research"]
177+
"fileSize": "348.673KB",
178+
"contIntegration": [
179+
"https://travis-ci.org/inbo/git2rdata",
180+
"https://ci.appveyor.com/project/ThierryO/git2rdata/branch/master",
181+
"https://codecov.io/gh/inbo/git2rdata"
182+
],
183+
"developmentStatus": [
184+
"https://www.repostatus.org/#active",
185+
"https://www.tidyverse.org/lifecycle/#maturing"
186+
],
187+
"keywords": [
188+
"r",
189+
"rstats",
190+
"r-package",
191+
"version-control",
192+
"reproducible-research"
193+
]
178194
}

man/figures/logo.png

6.27 KB
Loading

sticker/sticker.R

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
library(tidyverse)
2+
library(magick)
23
library(cowplot)
4+
transparent <- TRUE
5+
image_read("../man/figures/logo_en.png") %>%
6+
image_rotate(30) %>%
7+
image_transparent(color = ifelse(transparent, "white", "black")) %>%
8+
image_write("inbo.png")
39
scale <- 1
410
dx <- 1
511
dy <- sqrt(2)
@@ -58,7 +64,7 @@ hexagon <- tibble(
5864
y = range * sin(angle)
5965
) %>%
6066
ggplot(aes(x = x, y = y)) +
61-
geom_polygon(fill = NA, colour = git_colour, size = 3) +
67+
geom_polygon(fill = NA, colour = git_colour, size = 3 * scale) +
6268
coord_fixed() +
6369
theme_void()
6470

@@ -79,6 +85,7 @@ df <- crossing(
7985
coord_fixed(1/2) +
8086
theme_void()
8187
sticker <- ggdraw() +
88+
draw_image("inbo.png", x = -0.2, y = -0.28, scale = 0.45) +
8289
draw_plot(hexagon) +
8390
draw_label(
8491
"git2rdata", x = 0.5, y = 0.8,
@@ -102,5 +109,6 @@ save_plot(
102109
base_height = scale * 278 / 72,
103110
base_width = scale * 240 / 72,
104111
dpi = 72,
105-
bg = NA
112+
bg = ifelse(transparent, NA, "white")
106113
)
114+
file.remove("inbo.png")

tests/testthat/test_e_upgrade.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ test_that("upgrade_data() validates metadata", {
5252

5353
correct_yaml <- yaml::read_yaml(file.path(root, junk[2]))
5454
junk_yaml <- correct_yaml
55+
junk_yaml[["..generic"]][["git2rdata"]] <- "0.0.4"
56+
yaml::write_yaml(junk_yaml, file.path(root, junk[2]))
57+
expect_identical(
58+
unname(upgrade_data(file = file, root = root)),
59+
file
60+
)
61+
junk_yaml <- correct_yaml
5562
junk_yaml[["..generic"]][["git2rdata"]] <- NULL
5663
junk_yaml[["test_Date"]] <- NULL
5764
yaml::write_yaml(junk_yaml, file.path(root, junk[2]))

0 commit comments

Comments
 (0)