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

Allow for depends files to be a list of character vectors? #11

Open
kendonB opened this issue Apr 11, 2017 · 3 comments
Open

Allow for depends files to be a list of character vectors? #11

kendonB opened this issue Apr 11, 2017 · 3 comments

Comments

@kendonB
Copy link
Contributor

kendonB commented Apr 11, 2017

Currently, it looks like the commands function with depends works something like this:

datasets <- commands(
  `filename.rds` = file_maker(target_name))
datasets$depends <- large_vector_of_file_paths %>% paste0(collapse = ", ")

Printing this data.frame as a tibble doesn't look nice. It seems like a more natural way to do this is to allow the large_vector_of_file_paths to be a list containing that vector. As in:

datasets$depends <- list(large_vector_of_file_paths)

Seems tidier? Am I doing this wrong? I want filename.rds to depend on a large number of files.

@wlandau
Copy link
Owner

wlandau commented Apr 11, 2017

Nice idea. To be honest, I have been resisting it because I like the idea of forcing YAML-like lists to be flat, but I agree that your proposal is more natural and tidy for depends. I think it should be possible to accommodate both kinds of input.

In general, I have sometimes been thinking about with how to display workflow plan data frames with unavoidably long entries, such as complicated commands. I am not sure tibble's print method is adequate because it seems to skip cumbersome columns. Would you be interested in a special S3 print method that shows truncated versions of all or most entries?

Also, I am curious as to why your use case requires a large number of files. Are you feeding the output into another program? Personally, I love that remake keeps non-file targets in a storr cache so I do not have to worry about generating files most of the time.

@kendonB
Copy link
Contributor Author

kendonB commented Apr 11, 2017

The large number of files are weather data. I have no control over the format. Though, a large number of small files is better for the provider as it doesn't force people who want a single day of data to download 50 years.

@kendonB
Copy link
Contributor Author

kendonB commented Apr 11, 2017

Also, I don't think it's worth it to make another print method for these. I'm really only going to print these to make sure the generating code worked and seeing a vector of the correct length is good enough for me.

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