Adds user-created parameters in fread's yaml#4123
Adds user-created parameters in fread's yaml#4123eliocamp wants to merge 33 commits intoRdatatable:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4123 +/- ##
=======================================
Coverage 99.60% 99.60%
=======================================
Files 72 72
Lines 13918 13918
=======================================
Hits 13863 13863
Misses 55 55 Continue to review full report at Codecov.
|
| dec=dec, qmethod=qmethod, logical01=logical01 | ||
| ) | ||
| if (is.list(yaml)) { | ||
| yaml_header <- c(yaml_header, yaml) |
There was a problem hiding this comment.
(open-ended) is there any extra checks we should do on the data.table side here of the user input? or will it be fine to leave it up to yaml::as.yaml to do all validation?
There was a problem hiding this comment.
That was my thought, yes.
|
Thanks! Looks good overall. What do you think of an API like this? A bit more cumbersome, but offers the flexibility to fully customize the YAML header (potentially excluding/editing some key-values we put in there, e.g.). PS please edit the |
|
LGTMT. Great. Can see some outstanding (e.g. news item and man page) so I added the WIP tag. When you remove the WIP tag, and @MichaelChirico has approved with green tick, I'll merge. |
|
those new tests has to be escaped, they uses |
I like the flexibility with this, but, yeah, it's very verbose. Also I don't like the idea of having to repeat the name of the object inside I like fwrite(x, yaml = list(TRUE, and_now = "something completely different"))I'm also toying around the possibility of making it so that the Then, you could write: fwrite(x, yaml = my_yaml_function)for maximum flexibility and portability. |
|
I've added some logic and tests for the proposed interface. |
|
@eliocamp are you still planning to address the feedback provided here? so we can remove WIP label and have it ready to merge. |
|
Sorry, had forgotten about this PR. Thanks for the reminder. I think I addressed all the feeback. What's left is maybe expanding the functionality as detailed on my previous comment: #4123 (comment) Although maybe that's best left for another PR? Let me know if you think anything's missing. |
|
Yes, functionality is there, but we should also have entry in news, description, etc. @mattdowle commented pointed out that well #4123 (comment) |
|
Ok, there it is. I had to change Test numbers too. |
|
Woah, all the memories! Yeah, I don't think lots of people are clamoring for this to be implemented. I would be fine with dropping this PR. |
Part of #3540