frictionlessdata / datapackage-pipelines

Framework for processing data packages in pipelines of modular components.
https://frictionlessdata.io/
MIT License
119 stars 32 forks source link

Update function call of add_computed_field #165

Closed cschloer closed 5 years ago

cschloer commented 5 years ago

The add_computed_field function in data flow (https://github.com/datahq/dataflows/blob/master/dataflows/processors/add_computed_field.py#L73) looks like this:

def add_computed_field(*args, resources=None, **kw):

but the add_computed_field processor in datapackage_pipelines calls it like this:

def flow(parameters):
    return Flow(
        add_computed_field(
            parameters.get('fields', []),
            parameters.get('resources')
        ),
)

This PR correctly calls the add_computed_field flow using resource as a named parameter. Without this PR the add_computed_field processor does not work.

The function signature in dataflows was updated sometime between 0.0.44 and 0.0.48 but the function in datapackage_pipelines was not updated.

akariv commented 5 years ago

Thanks for reporting and fixing @cschloer !

I will make sure tests pass and then I'll merge the PR.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 1041


Totals Coverage Status
Change from base Build 1040: 8.5%
Covered Lines: 1698
Relevant Lines: 6666

💛 - Coveralls