-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeposits_tutorials.R
41 lines (27 loc) · 1.12 KB
/
deposits_tutorials.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# install and load the package
remotes::install_github ("ropenscilabs/deposits")
library (deposits)
# make sure env vars are set
# usethis::edit_r_environ()
## maybe include a reference to JSONlite and/or an example of mapping the
## json schema to the list items
metadata <- list (
creator = list (list (name = "C.J. Schwantes",
orcid = "0000-0002-9882-941X")),
title = "Building Blocks of Reproducibility Repository",
description = "A github repository for reproducibility best practices"
)
cli <- depositsClient$new (service = "zenodo", sandbox = TRUE, metadata = metadata)
cli$deposit_fill_metadata (metadata)
cli$metadata
## add items to deposit
## deposits is expecting CSV files -- additional arguments to supply appropriate
# file types? A check?
cli$deposit_add_resource("./deposits_overview.md")
cli$deposit_add_resource("./deposits_tutorials.R")
cli$deposit_add_resource("./mtt.csv")
### Is there a method for adding all local resource to
## remote? deposit_sync()?
cli$deposit_new()
cli$deposit_upload_file(path = "deposits_overview.md")
cli$deposit_upload_file(path = "deposits_tutorials.R")