-
Notifications
You must be signed in to change notification settings - Fork 129
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
Multiple output files per command: complete implementation #469
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Stop forcing `file_out()` files to be target names in the workflow plan. There will be one return value per command, which will no longer be a file (once the old file API is removed). - Allow multiple files in the `file_out()` function itself. - Explicitly give all target names in `my_plan` from `load_mtcars_example()`.
This ensures file_out()/file_in() connections among targets. This commit adds a test for this.
Not very elegant. I'm still fighting drake's data structures.
Now tracks output files
Codecov Report
@@ Coverage Diff @@
## master #469 +/- ##
======================================
Coverage 100% 100%
======================================
Files 68 67 -1
Lines 5685 5566 -119
======================================
- Hits 5685 5566 -119
Continue to review full report at Codecov.
|
This was referenced Jul 15, 2018
wlandau
pushed a commit
that referenced
this pull request
Jul 16, 2018
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
After 4 attempts over 5 months, we have an implementation! cc @tiernanmartin, @noamross.
From now on, targets (non-imports) are always R objects. Concomitant output files declared with
file_out("file1.csv", "file2.rds")
etc. are reproducibly tracked and can serve as input files to downstream targets viafile_in()
. Example:tests/testthat/test-intermediate-file.R
. Changes to file inputs and file outputs cause the corresponding target to rebuild. Changes to file outputs cause changes to downstream targets that accept them as file inputs.File outputs do not show up in
vis_drake_graph()
/sankey_drake_graph()
and friends becauseigraph
attributes. I think this is the most expedient solution: no extra data structures, no added heavy data processing.@tiernanmartin, do you have a favorite pedagogical GIS/shapefile workflow? I am considering a new chapter of the manual based on your thoughts from #257.
Related GitHub issues
Checklist
drake
's code of conduct, and I agree to follow its rules.testthat
unit tests totests/testthat
to confirm that any new features or functionality work correctly.devtools::check()