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

Add "data" methods to Model #29

Closed
5 tasks done
pwalsh opened this issue Oct 19, 2015 · 0 comments
Closed
5 tasks done

Add "data" methods to Model #29

pwalsh opened this issue Oct 19, 2015 · 0 comments

Comments

@pwalsh
Copy link
Member

pwalsh commented Oct 19, 2015

Description

The model should be immediately usable for common data conversion. Add public methods that transform a stream/iterator, and a row of data.

For simplicity, the API expects a iterable of arrays (or an iterable which is a single row) where values are either:

  • a unicode string (string on Py3, unicode on Py2)
  • the type being cast to (already transformed)

A later iteration could accept a file path or a raw CSV stream, but to do this we should first solve the issue of a common tabular data reader that can be used in MessyTables or GoodTables (frictionlessdata/tabulator-py#1). Then, we can plug that in here.

Tasks

  • Method for converting a single row
  • Method for converting an iterable and yielding rows
  • Methods could support a strategy argument which is one of cast or test, which controls the response values as per the cast and test methods of types
  • The method that handles iterables should support a fail_fast boolean. If true, raise on first error, if false, collect errors and return an error iterator when iteration ends (@pudo mentions colander and its grouping of errors here... worth checking)
  • Tests
@pwalsh pwalsh added this to the Current milestone Oct 19, 2015
@pwalsh pwalsh closed this as completed Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants