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

Different archiveTags option for artifact tags and user tags #309

Closed
julian-urbano opened this issue Jan 7, 2017 · 4 comments
Closed

Different archiveTags option for artifact tags and user tags #309

julian-urbano opened this issue Jan 7, 2017 · 4 comments

Comments

@julian-urbano
Copy link

In saveToLocalRepo, there is option archiveTags (boolean) to decide whether to store the tags along with the artifact. Currently, this controls whether to save artifact tags and user tags at the same time, but it'd be nice if we could control them separately.

For instance:

> d <- data.frame(a = 1:2, b = 3:4, c = 5:6)
> saveToLocalRepo(d, archiveTags = TRUE, userTags = c("tag1:val1", "tag2:val2"))
[1] "fbade4980847650272e6d755f6a2e5f4"
> showLocalRepo(method = "tags")
                           artifact                                           tag         createdDate
1  fbade4980847650272e6d755f6a2e5f4                                    format:rda 2017-01-07 19:49:26
2  fbade4980847650272e6d755f6a2e5f4                                        name:d 2017-01-07 19:49:26
3  fbade4980847650272e6d755f6a2e5f4                              class:data.frame 2017-01-07 19:49:26
4  fbade4980847650272e6d755f6a2e5f4                                     varname:a 2017-01-07 19:49:26
5  fbade4980847650272e6d755f6a2e5f4                                     varname:b 2017-01-07 19:49:26
6  fbade4980847650272e6d755f6a2e5f4                                     varname:c 2017-01-07 19:49:26
7  fbade4980847650272e6d755f6a2e5f4                      date:2017-01-07 19:49:26 2017-01-07 19:49:26
8  fbade4980847650272e6d755f6a2e5f4                                     tag1:val1 2017-01-07 19:49:26
9  fbade4980847650272e6d755f6a2e5f4                                     tag2:val2 2017-01-07 19:49:26
10 088e5cc79672b5c70b258e4a23618f42                                    format:rda 2017-01-07 19:49:26
11 fbade4980847650272e6d755f6a2e5f4 session_info:088e5cc79672b5c70b258e4a23618f42 2017-01-07 19:49:26
12 fbade4980847650272e6d755f6a2e5f4                                    format:txt 2017-01-07 19:49:26

It saves the artifact tags (column names), as well as the user tags. If we set archiveTags=FALSE we get:

> d <- data.frame(a = 1:2, b = 3:4, c = 5:6)
> saveToLocalRepo(d, archiveTags = FALSE, userTags = c("tag1:val1", "tag2:val2"))
[1] "fbade4980847650272e6d755f6a2e5f4"
> showLocalRepo(method = "tags")
                          artifact                                           tag         createdDate
1 fbade4980847650272e6d755f6a2e5f4                                    format:rda 2017-01-07 19:51:09
2 088e5cc79672b5c70b258e4a23618f42                                    format:rda 2017-01-07 19:51:10
3 fbade4980847650272e6d755f6a2e5f4 session_info:088e5cc79672b5c70b258e4a23618f42 2017-01-07 19:51:10
4 fbade4980847650272e6d755f6a2e5f4                                    format:txt 2017-01-07 19:51:10

It saves no tag.

So I think it'd be good if we could control whether to save (or not) artifact tags and user tags separately.

@MarcinKosinski
Copy link
Collaborator

@julian-urbano thanks for the idea. I think this might be doable : ) I'll consider this and let you know.

@MarcinKosinski
Copy link
Collaborator

It requires small changes in https://github.com/pbiecek/archivist/blob/master/R/saveToRepo.R#L198

@MarcinKosinski
Copy link
Collaborator

@julian-urbano this should now be possible (with ver 2.1.3 available from GitHub)

@julian-urbano
Copy link
Author

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants