Skip to content

Commit

Permalink
Merge 00f2711 into 62edc96
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Oct 16, 2018
2 parents 62edc96 + 00f2711 commit 9287928
Show file tree
Hide file tree
Showing 9 changed files with 1,190 additions and 456 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
dist: trusty
dist: xenial
sudo: required
language: python
python:
- 3.6
- 3.7
env:
matrix:
- TOXENV="py36-sqlite" DEPLOY=yes
- TOXENV="py36-plyvel" DEPLOY=no
- TOXENV="py37-sqlite" DEPLOY=yes
- TOXENV="py37-plyvel" DEPLOY=no
global:
- LANG=en_US.UTF-8
install:
- '[ "${TOXENV}" != "py36-plyvel" ] || sudo apt-get install libleveldb-dev libleveldb1'
- '[ "${TOXENV}" != "py37-plyvel" ] || sudo apt-get install libleveldb-dev libleveldb1v5'
- make install
- pip install coveralls
script:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ VERSION := $(shell head -n 1 $(PACKAGE)/VERSION)
all: list

install:
pip install --upgrade https://github.com/OriHoch/datapackage-py/archive/python-3.7-support.zip#egg=datapackage &&\
pip install --upgrade -e .[develop]

list:
Expand Down
20 changes: 20 additions & 0 deletions PROCESSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ def load(source, name=None, resources=None, **options):
#### printer
Just prints whatever it sees. Good for debugging.

```python
def printer(num_rows=10, last_rows=None, fields=None, resources=None,
header_print=_header_print, table_print=_table_print, **tabulate_kwargs):
pass
```

- `num_rows` - modify the number of rows to preview, printer will print multiple samples of this number of rows from different places in the stream
- `last_rows` - optional, defaults to the value of `num_rows`
- `fields` - optional, list of field names to preview
- `resources` - optional, allows to limit the printed resources, same semantics as `load` processor `resources` argument
- `header_print` - optional, callable used to print each resource header
- `table_print` - optional, callable used to print the table data
- `**tabulate_kwargs` - additional kwargs passed to [tabulate](https://bitbucket.org/astanin/python-tabulate), allows to customize the printed tables

If you are running from a [Jupyter](https://jupyter.org/) notebook, add `tablefmt='html'` to render an html table:

```
printer(tablefmt='html')
```

#### dump_to_path
Store the results to a specified path on disk, in a valid datapackage

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ Type "help", "copyright", "credits" or "license" for more information.

## Learn more

Dive into the [Tutorial](TUTORIAL.md) to get a deeper glimpse into everything that `dataflows` can do.
Dive into the [Tutorial](TUTORIAL.ipynb) to get a deeper glimpse into everything that `dataflows` can do.
Also review this list of [Built-in Processors](PROCESSORS.md), which also includes an API reference for each one of them.
Loading

0 comments on commit 9287928

Please sign in to comment.