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

Make map/reduce APIs more intuitive #1686

Merged
merged 1 commit into from
Dec 13, 2019
Merged

Commits on Dec 11, 2019

  1. Make map/reduce APIs more intuitive

    Right now, specifying a FunctionSource along with function parameters makes for a confusing function call.
    
    For instance, `Map('divide', 2, module=FunctionSource.np)` means the FunctionSource comes last, which is not intuitive.
    
    This adds the ability for `FunctionSource`s to be called and return a Bundle that includes both the package name and the function name.  The call above would then become: `Map(FunctionSource.np('divide'), 2)`.
    
    Backwards compatibility with the prior API is maintained, but a warning is generated.
    
    If the top-level package is provided twice, it is treated as an error.
    
    Test plan: added test cases to cover the new approach, the old approach that should generate the warning, and the ugly combination that should fail.
    Tony Tung committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    4e9ccad View commit details
    Browse the repository at this point in the history