DataFramesMeta.jl icon indicating copy to clipboard operation
DataFramesMeta.jl copied to clipboard

Allow for keyword arguments

Open pdeffebach opened this issue 4 years ago • 5 comments

This just adds keyword arguments for calls of the form @subset(df, :a; view = true), rather than the multi-line version

@subset df begin 
    :a 
end

I have added this for @subset but not others yet.

pdeffebach avatar Jan 20 '22 15:01 pdeffebach

@jkrumbiegel can I get a quick check on the implementation? It borrows from DataFrameMacros.jl.

With your approval I will add the same structure to everything else.

pdeffebach avatar Jan 20 '22 16:01 pdeffebach

Yeah looks ok from a quick glance. I still haven't decided how keyword arguments could work for non-parentheses style.

jkrumbiegel avatar Jan 23 '22 21:01 jkrumbiegel

I guess the current code isn't very DRY, but each 4-line *_helper function is unique and it seems overly abstract to make an outer function right now.

Will plug away with tests.

pdeffebach avatar Jan 30 '22 16:01 pdeffebach

I think I have the pipeline figured out for how to process arguments. I've written it for @rtransform but need to port it to the rest of the macros.

pdeffebach avatar Sep 15 '22 13:09 pdeffebach

Nice!

bkamins avatar Sep 15 '22 16:09 bkamins

Okay! I think this is all done @bkamins @nalimilan @jkrumbiegel

Please take a look!

pdeffebach avatar Oct 14 '22 14:10 pdeffebach

Thanks!

pdeffebach avatar Oct 14 '22 20:10 pdeffebach

Okay I'm ready to merge this. There will always be more docs to add but I think this is now pretty comprehensive.

pdeffebach avatar Oct 18 '22 20:10 pdeffebach