From 3132e877323d00da987c95584da60615c595635a Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 16 Sep 2016 09:36:58 +0100 Subject: [PATCH] prepare for version 0.2.3 release --- doc/source/index.rst | 1 + pyexcel_io.yaml | 4 ++-- pyexcel_io/utils.py | 22 +++++++++++----------- setup.py | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index 4d3c8ae..f19c916 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -133,6 +133,7 @@ pass on "library" option to get_data and save_data. plaincsv pagination + renderer extendedcsv csvz sqlalchemy diff --git a/pyexcel_io.yaml b/pyexcel_io.yaml index 17d7d15..d9fc9f1 100644 --- a/pyexcel_io.yaml +++ b/pyexcel_io.yaml @@ -9,7 +9,7 @@ extra_dependencies: - xls: - pyexcel-xls>=0.2.0 - xlsx: - - pyexcel-xlsx>=0.1.0 + - pyexcel-xlsx>=0.2.0 - ods: - - pyexcel-ods3>=0.1.0 + - pyexcel-ods3>=0.2.0 description: A python library to read and write structured data in csv, zipped csv format and to/from databases diff --git a/pyexcel_io/utils.py b/pyexcel_io/utils.py index 65fdf02..ea26c0c 100644 --- a/pyexcel_io/utils.py +++ b/pyexcel_io/utils.py @@ -28,9 +28,19 @@ } +def _index_filter(current_index, start, limit=-1): + out_range = constants.SKIP_DATA + if current_index >= start: + out_range = constants.TAKE_DATA + if limit > 0 and out_range == constants.TAKE_DATA: + if current_index >= (start + limit): + out_range = constants.STOP_ITERATION + return out_range + + def from_query_sets(column_names, query_sets, row_renderer=None, - skip_row_func=None, start_row=0, row_limit=-1): + skip_row_func=_index_filter, start_row=0, row_limit=-1): """ Convert query sets into an array """ @@ -116,13 +126,3 @@ def resolve_missing_extensions(extension, available_list): raise NotImplementedError(message) else: raise NotImplementedError() - - -def _index_filter(current_index, start, limit=-1): - out_range = constants.SKIP_DATA - if current_index >= start: - out_range = constants.TAKE_DATA - if limit > 0 and out_range == constants.TAKE_DATA: - if current_index >= (start + limit): - out_range = constants.STOP_ITERATION - return out_range diff --git a/setup.py b/setup.py index aba7dea..4b926ff 100644 --- a/setup.py +++ b/setup.py @@ -54,8 +54,8 @@ PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests']) EXTRAS_REQUIRE = { 'xls': ['pyexcel-xls>=0.2.0'], - 'xlsx': ['pyexcel-xlsx>=0.1.0'], - 'ods': ['pyexcel-ods3>=0.1.0'], + 'xlsx': ['pyexcel-xlsx>=0.2.0'], + 'ods': ['pyexcel-ods3>=0.2.0'], }